Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions assets/samplesheet_test.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sample,fastq_1,fastq_2
Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2,https://raw.githubusercontent.com/nf-core/test-datasets/spatialvi/testdata/human-lung-cancer-post-xenium_hd_ffpe/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_S1_L001_R1_001.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/spatialvi/testdata/human-lung-cancer-post-xenium_hd_ffpe/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_S1_L001_R2_001.fastq.gz
Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2,https://raw.githubusercontent.com/nf-core/test-datasets/spatialvi/testdata/human-lung-cancer-post-xenium_hd_ffpe/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_S1_L002_R1_001.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/spatialvi/testdata/human-lung-cancer-post-xenium_hd_ffpe/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_S1_L002_R2_001.fastq.gz
sample,fastq_1,fastq_2,image,cytaimage,slide,area,darkimage,colorizedimage,manual_alignment,slidefile
Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2,https://raw.githubusercontent.com/nf-core/test-datasets/spatialvi/testdata/human-lung-cancer-post-xenium_hd_ffpe/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_S1_L001_R1_001.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/spatialvi/testdata/human-lung-cancer-post-xenium_hd_ffpe/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_S1_L001_R2_001.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/spatialvi/testdata/human-lung-cancer-post-xenium_hd_ffpe/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_tissue_image.btf,https://raw.githubusercontent.com/nf-core/test-datasets/spatialvi/testdata/human-lung-cancer-post-xenium_hd_ffpe/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_image.tif,H1-84QJZFR,D1,,,,
Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2,https://raw.githubusercontent.com/nf-core/test-datasets/spatialvi/testdata/human-lung-cancer-post-xenium_hd_ffpe/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_S1_L002_R1_001.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/spatialvi/testdata/human-lung-cancer-post-xenium_hd_ffpe/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_S1_L002_R2_001.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/spatialvi/testdata/human-lung-cancer-post-xenium_hd_ffpe/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_tissue_image.btf,https://raw.githubusercontent.com/nf-core/test-datasets/spatialvi/testdata/human-lung-cancer-post-xenium_hd_ffpe/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_image.tif,H1-84QJZFR,D1,,,,
2 changes: 2 additions & 0 deletions assets/samplesheet_test_long.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sample,fastq_1,fastq_2,image,cytaimage,slide,area,darkimage,colorizedimage,manual_alignment,slidefile
Visium_HD_Human_Colon_Cancer,https://raw.githubusercontent.com/nfdata-omics/test-datasets/spatialomics/Visium_HD_Human_Colon_Cancer/Visium_HD_Human_Colon_Cancer_chr21_sub40000_P2_S2_L001_R1_001.fastq.gz,https://raw.githubusercontent.com/nfdata-omics/test-datasets/spatialomics/Visium_HD_Human_Colon_Cancer/Visium_HD_Human_Colon_Cancer_chr21_sub40000_P2_S2_L001_R2_001.fastq.gz,,https://raw.githubusercontent.com/nfdata-omics/test-datasets/spatialomics/Visium_HD_Human_Colon_Cancer/Visium_HD_Human_Colon_Cancer_P2_image.tif,H1-VM2JXXK,A1,,,,
42 changes: 42 additions & 0 deletions assets/schema_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,48 @@
"exists": true,
"pattern": "^([\\S\\s]*\\/)?[^\\s\\/]+\\.f(ast)?q\\.gz$",
"errorMessage": "FastQ file for reads 2 cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'"
},
"image": {
"type": "string",
"format": "file-path",
"exists": true,
"meta": ["image"]
},
"cytaimage": {
"type": "string",
"format": "file-path",
"exists": true,
"meta": ["cytaimage"]
},
"slide": {
"type": "string",
"meta": ["slide"]
},
"area": {
"type": "string",
"meta": ["area"]
},
"darkimage": {
"type": "string",
"format": "file-path",
"exists": true,
"meta": ["darkimage"]
},
"colorizedimage": {
"type": "string",
"format": "file-path",
"exists": true,
"meta": ["colorizedimage"]
},
"manual_alignment": {
"type": "string",
"meta": ["alignment"]
},
"slidefile": {
"type": "string",
"format": "file-path",
"exists": true,
"meta": ["slidefile"]
}
},
"required": ["sample", "fastq_1"]
Expand Down
94 changes: 94 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,104 @@ process {
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]

withName: 'GUNZIP_FASTA' {
publishDir = [
enabled: false
]
}

withName: 'GUNZIP_GTF' {
publishDir = [
enabled: false
]
}

withName: 'GUNZIP_GFF' {
publishDir = [
enabled: false
]
}

withName: 'UNTAR_SPACERANGER_REF' {
publishDir = [
enabled: false
]
}

withName: 'GFFREAD' {
publishDir = [
enabled: false
]
}

withName: SPACERANGER_MKGTF {
publishDir = [
path: "${params.outdir}/reference/mkgtf",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
ext.args = "--attribute=gene_biotype:protein_coding \
--attribute=gene_biotype:lincRNA \
--attribute=gene_biotype:antisense \
--attribute=gene_biotype:IG_LV_gene \
--attribute=gene_biotype:IG_V_gene \
--attribute=gene_biotype:IG_V_pseudogene \
--attribute=gene_biotype:IG_D_gene \
--attribute=gene_biotype:IG_J_gene \
--attribute=gene_biotype:IG_J_pseudogene \
--attribute=gene_biotype:IG_C_gene \
--attribute=gene_biotype:IG_C_pseudogene \
--attribute=gene_biotype:TR_V_gene \
--attribute=gene_biotype:TR_V_pseudogene \
--attribute=gene_biotype:TR_D_gene \
--attribute=gene_biotype:TR_J_gene \
--attribute=gene_biotype:TR_J_pseudogene \
--attribute=gene_biotype:TR_C_gene"
}

withName: SPACERANGER_MKREF {
publishDir = [
path: "${params.outdir}/reference/mkref",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'CAT_FASTQ' {
publishDir = [
enabled: false
]
}

withName: 'FQ_LINT' {
publishDir = [
enabled: false
]
}

withName: FASTQC {
ext.args = '--quiet'
}

withName: SPACERANGER_COUNT {
publishDir = [
[
path: { "${params.outdir}/count/" },
mode: params.publish_dir_mode,
pattern: "outs/web_summary.html",
saveAs: { "${meta.id}_web_summary.html" }
],
[
path: { "${params.outdir}/count/${meta.id}" },
mode: params.publish_dir_mode,
pattern: "outs/**",
saveAs: { filename -> filename.contains('/') ? filename.substring(filename.indexOf('/') + 1) : filename }
]
]
ext.args = "--create-bam true"
time = { 240.h * task.attempt }
}

withName: 'MULTIQC' {
ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' }
publishDir = [
Expand Down
13 changes: 7 additions & 6 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

process {
resourceLimits = [
cpus: 2,
memory: '15.GB',
cpus: 4,
memory: '12.GB',
time: '1.h'
]
}
Expand All @@ -22,8 +22,9 @@ params {
config_profile_name = 'Test profile'
config_profile_description = 'Minimal test dataset to check pipeline function'

// Input and output
input = "${projectDir}/assets/samplesheet_test.csv"
fasta = "https://raw.githubusercontent.com/nf-core/test-datasets/references/references/GRCh38_chr21/GRCh38_chr21.fa"
gtf = "https://raw.githubusercontent.com/nf-core/test-datasets/references/references/GRCh38_chr21/GRCh38_chr21.gtf"
// Input
input = "${projectDir}/assets/samplesheet_test.csv"
probeset = "https://raw.githubusercontent.com/nf-core/test-datasets/spatialvi/testdata/human-lung-cancer-post-xenium_hd_ffpe/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_probe_set.csv"
spaceranger_index = "https://raw.githubusercontent.com/nf-core/test-datasets/spatialvi/testdata/GRCh38.tar.gz"

}
32 changes: 32 additions & 0 deletions conf/test_long.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.

Use as follows:
nextflow run nfdata-omics/spatialomics -profile test_long,<docker/singularity> --outdir <OUTDIR>

----------------------------------------------------------------------------------------
*/

process {
resourceLimits = [
cpus: 2,
memory: '15.GB',
time: '1.h'
]
}

params {
config_profile_name = 'Long Test profile'
config_profile_description = 'Minimal test dataset to check pipeline function, with full chromosome and ref building'

// Input
input = "${projectDir}/assets/samplesheet_test_long.csv"
probeset = "https://raw.githubusercontent.com/nfdata-omics/test-datasets/spatialomics/Visium_HD_Human_Colon_Cancer/GSM8594568_P2CRC_probe_set.csv"
fasta = "https://raw.githubusercontent.com/nfdata-omics/test-datasets/refs/chr21-cellranger/chr21.fa.gz"
gtf = "https://raw.githubusercontent.com/nfdata-omics/test-datasets/refs/chr21-cellranger/chr21.gtf.gz"
reference_name = "GRCh38"

}
8 changes: 5 additions & 3 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ include { getGenomeAttribute } from './subworkflows/local/utils_nfcore_spat
*/

params.fasta = getGenomeAttribute('fasta')
params.gft = getGenomeAttribute('gtf')
params.gtf = getGenomeAttribute('gtf')
params.spaceranger_index = getGenomeAttribute('spaceranger_index')

/*
Expand All @@ -48,7 +48,8 @@ workflow NFDATAOMICS_SPATIALOMICS {
ch_fasta = params.fasta ? Channel.value(file(params.fasta, checkIfExists: true)) : Channel.empty()
ch_gtf = params.gtf ? Channel.value(file(params.gtf, checkIfExists: true)) : Channel.empty()
ch_gff = params.gff ? Channel.value(file(params.gff, checkIfExists: true)) : Channel.empty()
ch_spaceranger_index = params.spaceranger_index ? Channel.value(file(params.spaceranger_index, checkIfExists: true)) : Channel.empty()
ch_spaceranger_index = params.spaceranger_index ? file(params.spaceranger_index, checkIfExists: true) : Channel.empty()
ch_probeset = params.probeset ? Channel.value(file(params.probeset, checkIfExists: true)) : Channel.empty()

//
// WORKFLOW: Run pipeline
Expand All @@ -58,7 +59,8 @@ workflow NFDATAOMICS_SPATIALOMICS {
ch_fasta,
ch_gtf,
ch_gff,
ch_spaceranger_index
ch_spaceranger_index,
ch_probeset
)
emit:
multiqc_report = SPATIALOMICS.out.multiqc_report // channel: /path/to/multiqc_report.html
Expand Down
11 changes: 11 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@
"git_sha": "e10b76ca0c66213581bec2833e30d31f239dec0b",
"installed_by": ["modules"]
},
"spaceranger/count": {
"branch": "master",
"git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46",
"installed_by": ["modules"],
"patch": "modules/nf-core/spaceranger/count/spaceranger-count.diff"
},
"spaceranger/mkgtf": {
"branch": "master",
"git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46",
"installed_by": ["modules"]
},
"spaceranger/mkref": {
"branch": "master",
"git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46",
Expand Down
76 changes: 76 additions & 0 deletions modules/nf-core/spaceranger/count/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading