diff --git a/assets/samplesheet_test.csv b/assets/samplesheet_test.csv index 6c5eb8a..8e0c992 100644 --- a/assets/samplesheet_test.csv +++ b/assets/samplesheet_test.csv @@ -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,,,, diff --git a/assets/samplesheet_test_long.csv b/assets/samplesheet_test_long.csv new file mode 100644 index 0000000..e3c4f7b --- /dev/null +++ b/assets/samplesheet_test_long.csv @@ -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,,,, diff --git a/assets/schema_input.json b/assets/schema_input.json index 4df003e..83ae24a 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -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"] diff --git a/conf/modules.config b/conf/modules.config index d203d2b..65816b7 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -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 = [ diff --git a/conf/test.config b/conf/test.config index 989bf3a..00e70c1 100644 --- a/conf/test.config +++ b/conf/test.config @@ -12,8 +12,8 @@ process { resourceLimits = [ - cpus: 2, - memory: '15.GB', + cpus: 4, + memory: '12.GB', time: '1.h' ] } @@ -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" + } diff --git a/conf/test_long.config b/conf/test_long.config new file mode 100644 index 0000000..f893dc5 --- /dev/null +++ b/conf/test_long.config @@ -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, --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" + +} diff --git a/main.nf b/main.nf index 3cdb747..7c86ada 100644 --- a/main.nf +++ b/main.nf @@ -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') /* @@ -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 @@ -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 diff --git a/modules.json b/modules.json index 75fb70b..1f1da73 100644 --- a/modules.json +++ b/modules.json @@ -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", diff --git a/modules/nf-core/spaceranger/count/main.nf b/modules/nf-core/spaceranger/count/main.nf new file mode 100644 index 0000000..2436210 --- /dev/null +++ b/modules/nf-core/spaceranger/count/main.nf @@ -0,0 +1,76 @@ +process SPACERANGER_COUNT { + tag "$meta.id" + label 'process_high' + + container "nf-core/spaceranger:3.1.3" + + input: + tuple val(meta), path("fastqs/${meta.id}_S1_L001_R?_001.fastq.gz") + tuple val(meta2), path(image), val(slide), val(area), path(cytaimage), path(darkimage), path(colorizedimage), path(alignment), path(slidefile) + path(reference) + path(probeset) + + output: + tuple val(meta), path("outs/**"), emit: outs + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "SPACERANGER_COUNT module does not support Conda. Please use Docker / Singularity / Podman instead." + } + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + // Add flags for optional inputs on demand. + def probeset = probeset ? "--probe-set=\"${probeset}\"" : "" + def alignment = alignment ? "--loupe-alignment=\"${alignment}\"" : "" + def slidefile = slidefile ? "--slidefile=\"${slidefile}\"" : "" + def image = image ? "--image=\"${image}\"" : "" + def cytaimage = cytaimage ? "--cytaimage=\"${cytaimage}\"" : "" + def darkimage = darkimage ? "--darkimage=\"${darkimage}\"" : "" + def colorizedimage = colorizedimage ? "--colorizedimage=\"${colorizedimage}\"" : "" + if (slide.matches("visium-(.*)") && area == "" && slidefile == "") { + slide_and_area = "--unknown-slide=\"${slide}\"" + } else { + slide_and_area = "--slide=\"${slide}\" --area=\"${area}\"" + } + """ + spaceranger count \\ + --id="${prefix}" \\ + --sample="${meta.id}" \\ + --fastqs=fastqs \\ + --transcriptome="${reference}" \\ + --localcores=${task.cpus} \\ + --localmem=${task.memory.toGiga()} \\ + $image $cytaimage $darkimage $colorizedimage \\ + $slide_and_area \\ + $probeset \\ + $alignment \\ + $slidefile \\ + $args + mv ${prefix}/outs outs + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + spaceranger: \$(spaceranger -V | sed -e "s/spaceranger spaceranger-//g") + END_VERSIONS + """ + + stub: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "SPACERANGER_COUNT module does not support Conda. Please use Docker / Singularity / Podman instead." + } + """ + mkdir -p outs/ + touch outs/fake_file.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + spaceranger: \$(spaceranger -V | sed -e "s/spaceranger spaceranger-//g") + END_VERSIONS + """ +} diff --git a/modules/nf-core/spaceranger/count/meta.yml b/modules/nf-core/spaceranger/count/meta.yml new file mode 100644 index 0000000..cf6efb5 --- /dev/null +++ b/modules/nf-core/spaceranger/count/meta.yml @@ -0,0 +1,119 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json +name: "spaceranger_count" +description: Module to use the 10x Space Ranger pipeline to process 10x spatial transcriptomics + data +keywords: + - align + - count + - spatial + - spaceranger + - imaging +tools: + - "spaceranger": + description: | + Visium Spatial Gene Expression is a next-generation molecular profiling solution for classifying tissue + based on total mRNA. Space Ranger is a set of analysis pipelines that process Visium Spatial Gene Expression + data with brightfield and fluorescence microscope images. Space Ranger allows users to map the whole + transcriptome in formalin fixed paraffin embedded (FFPE) and fresh frozen tissues to discover novel + insights into normal development, disease pathology, and clinical translational research. Space Ranger provides + pipelines for end to end analysis of Visium Spatial Gene Expression experiments. + homepage: "https://support.10xgenomics.com/spatial-gene-expression/software/pipelines/latest/what-is-space-ranger" + documentation: "https://support.10xgenomics.com/spatial-gene-expression/software/pipelines/latest/what-is-space-ranger" + tool_dev_url: "https://support.10xgenomics.com/spatial-gene-expression/software/pipelines/latest/what-is-space-ranger" + licence: + - "10x Genomics EULA" + identifier: "" +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', slide:'10L13-020', area: 'B1'] + + `id`, `slide` and `area` are mandatory information! + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + pattern: "${Sample_Name}_S1_L00${Lane_Number}_${I1,I2,R1,R2}_001.fastq.gz" + ontologies: [] + - image: + type: file + description: Brightfield tissue H&E image in JPEG or TIFF format. + pattern: "*.{tif,tiff,jpg,jpeg}" + ontologies: [] + - slide: + type: string + description: Visium slide ID used for the sample. + - area: + type: string + description: Visium slide capture area used for the sample. + - cytaimage: + type: file + description: | + CytAssist instrument captured eosin stained Brightfield tissue image with fiducial + frame in TIFF format. The size of this image is set at 3k in both dimensions and this image should + not be modified any way before passing it as input to either Space Ranger or Loupe Browser. + pattern: "*.{tif,tiff}" + ontologies: [] + - darkimage: + type: file + description: | + Optional for dark background fluorescence microscope image input. Multi-channel, dark-background fluorescence + image as either a single, multi-layer TIFF file or as multiple TIFF or JPEG files. + pattern: "*.{tif,tiff,jpg,jpeg}" + ontologies: [] + - colorizedimage: + type: file + description: | + Required for color composite fluorescence microscope image input. + A color composite of one or more fluorescence image channels saved as a single-page, + single-file color TIFF or JPEG. + pattern: "*.{tif,tiff,jpg,jpeg}" + ontologies: [] + - alignment: + type: file + description: OPTIONAL - Path to manual image alignment. + pattern: "*.json" + ontologies: + - edam: http://edamontology.org/format_3464 # JSON + - slidefile: + type: file + description: OPTIONAL - Path to slide specifications. + pattern: "*.json" + ontologies: + - edam: http://edamontology.org/format_3464 # JSON + - reference: + type: directory + description: Folder containing all the reference indices needed by Space Ranger + - probeset: + type: file + description: OPTIONAL - Probe set specification. + pattern: "*.csv" + ontologies: + - edam: http://edamontology.org/format_3752 # CSV +output: + outs: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - outs/**: + type: file + description: Files containing the outputs of Space Ranger, see official 10X + Genomics documentation for a complete list + pattern: "outs/*" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML +authors: + - "@grst" +maintainers: + - "@grst" diff --git a/modules/nf-core/spaceranger/count/spaceranger-count.diff b/modules/nf-core/spaceranger/count/spaceranger-count.diff new file mode 100644 index 0000000..9829a15 --- /dev/null +++ b/modules/nf-core/spaceranger/count/spaceranger-count.diff @@ -0,0 +1,29 @@ +Changes in component 'nf-core/spaceranger/count' +'modules/nf-core/spaceranger/count/meta.yml' is unchanged +Changes in 'spaceranger/count/main.nf': +--- modules/nf-core/spaceranger/count/main.nf ++++ modules/nf-core/spaceranger/count/main.nf +@@ -5,7 +5,8 @@ + container "nf-core/spaceranger:3.1.3" + + input: +- tuple val(meta), path(reads), path(image), val(slide), val(area), path(cytaimage), path(darkimage), path(colorizedimage), path(alignment), path(slidefile) ++ tuple val(meta), path("fastqs/${meta.id}_S1_L001_R?_001.fastq.gz") ++ tuple val(meta2), path(image), val(slide), val(area), path(cytaimage), path(darkimage), path(colorizedimage), path(alignment), path(slidefile) + path(reference) + path(probeset) + +@@ -40,7 +41,7 @@ + spaceranger count \\ + --id="${prefix}" \\ + --sample="${meta.id}" \\ +- --fastqs=. \\ ++ --fastqs=fastqs \\ + --transcriptome="${reference}" \\ + --localcores=${task.cpus} \\ + --localmem=${task.memory.toGiga()} \\ + +'modules/nf-core/spaceranger/count/tests/nextflow.config' is unchanged +'modules/nf-core/spaceranger/count/tests/main.nf.test.snap' is unchanged +'modules/nf-core/spaceranger/count/tests/main.nf.test' is unchanged +************************************************************ diff --git a/modules/nf-core/spaceranger/count/tests/main.nf.test b/modules/nf-core/spaceranger/count/tests/main.nf.test new file mode 100644 index 0000000..3d65e68 --- /dev/null +++ b/modules/nf-core/spaceranger/count/tests/main.nf.test @@ -0,0 +1,228 @@ +nextflow_process { + + name "Test Process SPACERANGER_COUNT" + script "../main.nf" + config "./nextflow.config" + process "SPACERANGER_COUNT" + + tag "modules" + tag "modules_nfcore" + tag "spaceranger" + tag "spaceranger/count" + tag "spaceranger/mkgtf" + tag "spaceranger/mkref" + + test("spaceranger v1 - homo_sapiens - fasta - gtf - fastq - tif - csv") { + + setup { + run("SPACERANGER_MKGTF") { + script "../../mkgtf/main.nf" + process { + """ + input[0] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) + """ + } + } + } + + setup { + run("SPACERANGER_MKREF") { + script "../../mkref/main.nf" + process { + """ + input[0] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) + input[2] = 'homo_sapiens_chr22_reference' + """ + } + } + } + + when { + process { + """ + input[0] = [ + [ + id: 'Visium_FFPE_Human_Ovarian_Cancer' + ], // Meta map + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/10xgenomics/spaceranger/human-ovarian-cancer-1-standard_v1_ffpe/Visium_FFPE_Human_Ovarian_Cancer_S1_L001_R1_001.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/10xgenomics/spaceranger/human-ovarian-cancer-1-standard_v1_ffpe/Visium_FFPE_Human_Ovarian_Cancer_S1_L001_R2_001.fastq.gz', checkIfExists: true) + ], // Reads + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/10xgenomics/spaceranger/human-ovarian-cancer-1-standard_v1_ffpe/Visium_FFPE_Human_Ovarian_Cancer_image.jpg', checkIfExists: true), // Image + 'V10L13-020', // Slide + 'D1', // Area + [], // Cytaimage + [], // Darkimage + [], // Colorizedimage + [], // Manual alignment (default: automatic alignment) + [], // Slide specification (default: automatic download) + ] + input[1] = SPACERANGER_MKREF.out.reference // Reference + input[2] = [] // Probeset (default: use the one included with Space Ranger) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.versions, + process.out.outs.get(0).get(1).findAll { file(it).name !in [ + 'web_summary.html', + 'scalefactors_json.json', + 'barcodes.tsv.gz', + 'features.tsv.gz', + 'matrix.mtx.gz' + ]} + ).match() + }, + { assert file(process.out.outs.get(0).get(1).find { file(it).name == 'web_summary.html' }).exists() }, + { assert file(process.out.outs.get(0).get(1).find { file(it).name == 'scalefactors_json.json' }).exists() }, + { assert file(process.out.outs.get(0).get(1).find { file(it).name == 'barcodes.tsv.gz' }).exists() }, + { assert file(process.out.outs.get(0).get(1).find { file(it).name == 'features.tsv.gz' }).exists() }, + { assert file(process.out.outs.get(0).get(1).find { file(it).name == 'matrix.mtx.gz' }).exists() } + ) + } + } + + test("spaceranger v1 (stub) - homo_sapiens - fasta - gtf - fastq - tif - csv") { + + setup { + run("SPACERANGER_MKGTF") { + script "../../mkgtf/main.nf" + process { + """ + input[0] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) + """ + } + } + } + + setup { + run("SPACERANGER_MKREF") { + script "../../mkref/main.nf" + process { + """ + input[0] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) + input[2] = 'homo_sapiens_chr22_reference' + """ + } + } + } + + options "-stub" + + when { + process { + """ + input[0] = [ + [ + id: 'Visium_FFPE_Human_Ovarian_Cancer' + ], // Meta map + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/10xgenomics/spaceranger/human-ovarian-cancer-1-standard_v1_ffpe/Visium_FFPE_Human_Ovarian_Cancer_S1_L001_R1_001.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/10xgenomics/spaceranger/human-ovarian-cancer-1-standard_v1_ffpe/Visium_FFPE_Human_Ovarian_Cancer_S1_L001_R2_001.fastq.gz', checkIfExists: true) + ], // Reads + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/10xgenomics/spaceranger/human-ovarian-cancer-1-standard_v1_ffpe/Visium_FFPE_Human_Ovarian_Cancer_image.jpg', checkIfExists: true), // Image + 'V10L13-020', // Slide + 'D1', // Area + [], // Cytaimage + [], // Darkimage + [], // Colorizedimage + [], // Manual alignment (default: automatic alignment) + [], // Slide specification (default: automatic download) + ] + input[1] = SPACERANGER_MKREF.out.reference // Reference + input[2] = [] // Probeset (default: use the one included with Space Ranger) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match() }, + ) + } + } + + test("spaceranger v2 - homo_sapiens - fasta - gtf - fastq - tif - csv") { + setup { + run("SPACERANGER_MKGTF") { + script "../../mkgtf/main.nf" + process { + """ + input[0] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) + """ + } + } + } + + setup { + run("SPACERANGER_MKREF") { + script "../../mkref/main.nf" + process { + """ + input[0] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) + input[2] = 'homo_sapiens_chr22_reference' + """ + } + } + } + + when { + process { + """ + input[0] = [ + [ + id: 'CytAssist_11mm_FFPE_Human_Glioblastoma_2' + ], // Meta map + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/10xgenomics/spaceranger/human-brain-cancer-11-mm-capture-area-ffpe-2-standard_v2_ffpe_cytassist/CytAssist_11mm_FFPE_Human_Glioblastoma_2_S1_L001_R1_001.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/10xgenomics/spaceranger/human-brain-cancer-11-mm-capture-area-ffpe-2-standard_v2_ffpe_cytassist/CytAssist_11mm_FFPE_Human_Glioblastoma_2_S1_L001_R2_001.fastq.gz', checkIfExists: true) + ], // Reads + [], // Image + 'V52Y10-317', // Slide + 'B1', // Area + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/10xgenomics/spaceranger/human-brain-cancer-11-mm-capture-area-ffpe-2-standard_v2_ffpe_cytassist/CytAssist_11mm_FFPE_Human_Glioblastoma_image.tif', checkIfExists: true), // Cytaimage + [], // Darkimage + [], // Colorizedimage + [], // Manual alignment (default: automatic alignment) + file('https://s3.us-west-2.amazonaws.com/10x.spatial-slides/gpr/V52Y10/V52Y10-317.gpr') // Slide specification (default: automatic download) + ] + input[1] = SPACERANGER_MKREF.out.reference // Reference + input[2] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/10xgenomics/spaceranger/human-brain-cancer-11-mm-capture-area-ffpe-2-standard_v2_ffpe_cytassist/CytAssist_11mm_FFPE_Human_Glioblastoma_probe_set.csv', checkIfExists: true) // Probeset (default: use the one included with Space Ranger) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.versions, + process.out.outs.get(0).get(1).findAll { file(it).name !in [ + 'web_summary.html', + 'scalefactors_json.json', + 'molecule_info.h5', + 'barcodes.tsv.gz', + 'features.tsv.gz', + 'matrix.mtx.gz', + 'cloupe.cloupe' + ]} + ).match() + }, + { assert file(process.out.outs.get(0).get(1).find { file(it).name == 'web_summary.html' }).exists() }, + { assert file(process.out.outs.get(0).get(1).find { file(it).name == 'scalefactors_json.json' }).exists() }, + { assert file(process.out.outs.get(0).get(1).find { file(it).name == 'molecule_info.h5' }).exists() }, + { assert file(process.out.outs.get(0).get(1).find { file(it).name == 'barcodes.tsv.gz' }).exists() }, + { assert file(process.out.outs.get(0).get(1).find { file(it).name == 'features.tsv.gz' }).exists() }, + { assert file(process.out.outs.get(0).get(1).find { file(it).name == 'matrix.mtx.gz' }).exists() } + ) + } + } +} \ No newline at end of file diff --git a/modules/nf-core/spaceranger/count/tests/main.nf.test.snap b/modules/nf-core/spaceranger/count/tests/main.nf.test.snap new file mode 100644 index 0000000..dbfaadf --- /dev/null +++ b/modules/nf-core/spaceranger/count/tests/main.nf.test.snap @@ -0,0 +1,90 @@ +{ + "spaceranger v1 (stub) - homo_sapiens - fasta - gtf - fastq - tif - csv": { + "content": [ + [ + "versions.yml:md5,4abe169f33d7f99d5d9876b189060aae" + ] + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.4" + }, + "timestamp": "2025-02-13T09:02:47.710975472" + }, + "spaceranger v2 - homo_sapiens - fasta - gtf - fastq - tif - csv": { + "content": [ + [ + "versions.yml:md5,4abe169f33d7f99d5d9876b189060aae" + ], + [ + "clusters.csv:md5,221a4554e62ea94b0df8dbf637d2c13c", + "clusters.csv:md5,53ee76645943b5562392aac51d2d9f3f", + "clusters.csv:md5,b791359469683ad19cdb8d1af3de5705", + "clusters.csv:md5,9a4f9148e0e834c1127bf8393ece6330", + "clusters.csv:md5,c11bcc64f870469ab2f136d9272a7a6d", + "clusters.csv:md5,488846bbb469365e199928c7a440320a", + "clusters.csv:md5,5941f7e847d35a4f06d3631e21d2eb9d", + "clusters.csv:md5,d244d405c32766339d2b7a3fa8bf8cee", + "clusters.csv:md5,981386408cd953548994c31253e787de", + "clusters.csv:md5,24c4f13449e5362fcbcd41b9ff413992", + "differential_expression.csv:md5,589c1bd4529f092bb1d332e7da561dad", + "differential_expression.csv:md5,d9d978b398b33ac9687b44531909e0cd", + "differential_expression.csv:md5,4edbc893280f9d03c3de00a503e86f8c", + "differential_expression.csv:md5,316181d501c495384016227309856b09", + "differential_expression.csv:md5,dae49941396609fb08df13b82fe89151", + "differential_expression.csv:md5,4a13ae44c8454dbcb0298eb63df8b8e8", + "differential_expression.csv:md5,eeb02c4afe1f49d5502fb024b25b2c38", + "differential_expression.csv:md5,9a456828fe5d762e6e07383da5c2791d", + "differential_expression.csv:md5,bcbd1504976824e9f4d20a8dd36e2a1f", + "differential_expression.csv:md5,3ad93fc4d52950cfede885dc58cd2823", + "components.csv:md5,811a32dce6c795e958dc4bc635ee53be", + "dispersion.csv:md5,64c2e57ef0ca9a80cce8b952c81b62f5", + "features_selected.csv:md5,bd0c0a20b0b0009df796e8a755d028c1", + "projection.csv:md5,e530c925a185965514fa82f4da83fa81", + "variance.csv:md5,4159711ab5d64e97737fad9d75d945b3", + "projection.csv:md5,ce729f7e237df4570ac3e4a79251df24", + "projection.csv:md5,fa7bdefa8424b233fe6461129ab76d57", + "filtered_feature_bc_matrix.h5:md5,704256e5150522d9cf2e75e7e47221b6", + "metrics_summary.csv:md5,5ece84f5f8e08839749b1c8f2bff6701", + "probe_set.csv:md5,5bfb8f12319be1b2b6c14142537c3804", + "raw_feature_bc_matrix.h5:md5,ac24486662643ea68562c1a51cbbb2bd", + "raw_probe_bc_matrix.h5:md5,8ab08437814506f98e3f10107cfc38ac", + "aligned_fiducials.jpg:md5,51dcc3a32d3d5ca4704f664c8ede81ef", + "cytassist_image.tiff:md5,0fb04a55e5658f4d158d986a334b034d", + "detected_tissue_image.jpg:md5,11c9fa90913b5c6e93cecdb8f53d58db", + "spatial_enrichment.csv:md5,4379bc4fef891b45ff9264ee8c408bd0", + "tissue_hires_image.png:md5,834706fff299024fab48e6366afc9cb9", + "tissue_lowres_image.png:md5,8c1fcb378f7f886301f49ffc4f84360a", + "tissue_positions.csv:md5,930aeb2b790032337d91dd27cc70f135" + ] + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.4" + }, + "timestamp": "2025-02-12T11:24:51.984883864" + }, + "spaceranger v1 - homo_sapiens - fasta - gtf - fastq - tif - csv": { + "content": [ + [ + "versions.yml:md5,4abe169f33d7f99d5d9876b189060aae" + ], + [ + "filtered_feature_bc_matrix.h5:md5,649ac955bcb372b0b767013071cca72c", + "metrics_summary.csv:md5,38774fc5f54873d711b4898a2dd50e72", + "molecule_info.h5:md5,88bb948a426041165b2cc5fe8b180c21", + "raw_feature_bc_matrix.h5:md5,63324ae38fbf28bcc2114f170e0fde5d", + "aligned_fiducials.jpg:md5,f6217ddd707bb189e665f56b130c3da8", + "detected_tissue_image.jpg:md5,c1c7e8741701a576c1ec103c1aaf98ea", + "tissue_hires_image.png:md5,d91f8f176ae35ab824ede87117ac0889", + "tissue_lowres_image.png:md5,475a04208d193191c84d7a3b5d4eb287", + "tissue_positions.csv:md5,7f9cb407b3dd69726a12967b979a5624" + ] + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.4" + }, + "timestamp": "2025-02-12T11:08:30.165324139" + } +} \ No newline at end of file diff --git a/modules/nf-core/spaceranger/count/tests/nextflow.config b/modules/nf-core/spaceranger/count/tests/nextflow.config new file mode 100644 index 0000000..fe9d61a --- /dev/null +++ b/modules/nf-core/spaceranger/count/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: SPACERANGER_COUNT { + ext.args = '--create-bam false' + } +} diff --git a/modules/nf-core/spaceranger/mkgtf/main.nf b/modules/nf-core/spaceranger/mkgtf/main.nf new file mode 100644 index 0000000..86e05cc --- /dev/null +++ b/modules/nf-core/spaceranger/mkgtf/main.nf @@ -0,0 +1,51 @@ +process SPACERANGER_MKGTF { + tag "$gtf" + label 'process_low' + + container "nf-core/spaceranger:3.1.3" + + input: + path gtf + + output: + path "*.gtf" , emit: gtf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "SPACERANGER_MKGTF module does not support Conda. Please use Docker / Singularity / Podman instead." + } + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${gtf.baseName}.filtered" + """ + spaceranger \\ + mkgtf \\ + $gtf \\ + ${prefix}.gtf \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + spaceranger: \$(spaceranger -V | sed -e "s/spaceranger spaceranger-//g") + END_VERSIONS + """ + + stub: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "SPACERANGER_COUNT module does not support Conda. Please use Docker / Singularity / Podman instead." + } + def prefix = task.ext.prefix ?: "${gtf.baseName}.filtered" + """ + touch ${prefix}.gtf + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + spaceranger: \$(spaceranger -V | sed -e "s/spaceranger spaceranger-//g") + END_VERSIONS + """ +} diff --git a/modules/nf-core/spaceranger/mkgtf/meta.yml b/modules/nf-core/spaceranger/mkgtf/meta.yml new file mode 100644 index 0000000..e68c4af --- /dev/null +++ b/modules/nf-core/spaceranger/mkgtf/meta.yml @@ -0,0 +1,47 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json +name: "spaceranger_mkgtf" +description: Module to build a filtered GTF needed by the 10x Genomics Space Ranger + tool. Uses the spaceranger mkgtf command. +keywords: + - reference + - mkref + - index + - spaceranger +tools: + - "spaceranger": + description: | + Visium Spatial Gene Expression is a next-generation molecular profiling solution for classifying tissue + based on total mRNA. Space Ranger is a set of analysis pipelines that process Visium Spatial Gene Expression + data with brightfield and fluorescence microscope images. Space Ranger allows users to map the whole + transcriptome in formalin fixed paraffin embedded (FFPE) and fresh frozen tissues to discover novel + insights into normal development, disease pathology, and clinical translational research. Space Ranger provides + pipelines for end to end analysis of Visium Spatial Gene Expression experiments. + homepage: "https://support.10xgenomics.com/spatial-gene-expression/software/pipelines/latest/what-is-space-ranger" + documentation: "https://support.10xgenomics.com/spatial-gene-expression/software/pipelines/latest/what-is-space-ranger" + tool_dev_url: "https://support.10xgenomics.com/spatial-gene-expression/software/pipelines/latest/what-is-space-ranger" + licence: + - "10x Genomics EULA" + identifier: "" +input: + - gtf: + type: file + description: The reference GTF transcriptome file + pattern: "*.gtf" + ontologies: [] +output: + gtf: + - "*.gtf": + type: directory + description: The filtered GTF transcriptome file + pattern: "*.filtered.gtf" + versions: + - versions.yml: + type: file + description: File containing software version + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML +authors: + - "@grst" +maintainers: + - "@grst" diff --git a/modules/nf-core/spaceranger/mkgtf/tests/main.nf.test b/modules/nf-core/spaceranger/mkgtf/tests/main.nf.test new file mode 100644 index 0000000..7091e0a --- /dev/null +++ b/modules/nf-core/spaceranger/mkgtf/tests/main.nf.test @@ -0,0 +1,59 @@ +nextflow_process { + + name "Test Process SPACERANGER_MKGTF" + script "../main.nf" + process "SPACERANGER_MKGTF" + + tag "modules" + tag "modules_nfcore" + tag "spaceranger" + tag "spaceranger/mkgtf" + + test("homo_sapiens - gtf") { + + when { + process { + """ + input[0] = [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.gtf, + process.out.versions, + ).match() } + ) + } + + } + + test("homo_sapiens (stub) - gtf") { + + options "-stub" + + when { + process { + """ + input[0] = [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match() }, + ) + } + + } + +} \ No newline at end of file diff --git a/modules/nf-core/spaceranger/mkgtf/tests/main.nf.test.snap b/modules/nf-core/spaceranger/mkgtf/tests/main.nf.test.snap new file mode 100644 index 0000000..138a739 --- /dev/null +++ b/modules/nf-core/spaceranger/mkgtf/tests/main.nf.test.snap @@ -0,0 +1,29 @@ +{ + "homo_sapiens - gtf": { + "content": [ + [ + "genome.filtered.gtf:md5,50fc877b1c53b36b3b413aff88bda48c" + ], + [ + "versions.yml:md5,2f6c2b1181d43aea5c3fd8095cb181b6" + ] + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.4" + }, + "timestamp": "2025-02-12T16:06:15.384050292" + }, + "homo_sapiens (stub) - gtf": { + "content": [ + [ + "versions.yml:md5,2f6c2b1181d43aea5c3fd8095cb181b6" + ] + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.4" + }, + "timestamp": "2025-02-12T16:43:38.384121778" + } +} \ No newline at end of file diff --git a/nextflow.config b/nextflow.config index 44b6c82..8b3b04d 100644 --- a/nextflow.config +++ b/nextflow.config @@ -17,6 +17,8 @@ params { genome = null igenomes_base = 's3://ngi-igenomes/igenomes/' igenomes_ignore = false + reference_name = null + probeset = null // MultiQC options multiqc_config = null @@ -167,6 +169,7 @@ profiles { singularity.runOptions = '--nv' } test { includeConfig 'conf/test.config' } + test_long { includeConfig 'conf/test_long.config' } test_full { includeConfig 'conf/test_full.config' } } diff --git a/nextflow_schema.json b/nextflow_schema.json index b919498..1efea2f 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -62,9 +62,42 @@ "mimetype": "text/plain", "pattern": "^\\S+\\.fn?a(sta)?(\\.gz)?$", "description": "Path to FASTA genome file.", - "help_text": "This parameter is *mandatory* if `--genome` is not specified. If you don't have a BWA index available this will be generated for you automatically. Combine with `--save_reference` to save BWA index for future runs.", + "help_text": "This parameter is *mandatory* if `--genome` or `--spaceranger_index` are not specified. If you don't have a Space Ranger index available this will be generated for you automatically.", "fa_icon": "far fa-file-code" }, + "gtf": { + "type": "string", + "format": "file-path", + "exists": true, + "mimetype": "text/plain", + "pattern": "^\\S+\\.gtf(\\.gz)?$", + "description": "Path to GTF annotation file.", + "help_text": "This parameter is mandatory if `--genome` or `--spaceranger_index` are not specified. If you don't have a Space Ranger index available this will be generated for you automatically.", + "errorMessage": "The GTF file must have a .gtf or .gtf.gz extension, must not contain spaces, and must exist.", + "fa_icon": "fas fa-code-branch" + }, + "spaceranger_index": { + "type": "string", + "format": "path", + "description": "Path to a Space Ranger reference folder. Can alternatively be provided as `tar.gz` archive.", + "help_text": "Please see the [10x website](https://support.10xgenomics.com/spatial-gene-expression/software/downloads/latest) to download either of the supported human or mouse references.", + "fa_icon": "fas fa-folder-open", + "exists": true + }, + "reference_name": { + "type": "string", + "fa_icon": "fas fa-book", + "description": "Genome assembly label that will be used to name a new index built from fasta and gft files with spaceranger mkref." + }, + "probeset": { + "type": "string", + "format": "file-path", + "mimetype": "text/csv", + "pattern": "^\\S+\\.csv$", + "description": "Location of Space Ranger probeset file.", + "fa_icon": "fas fa-file-csv", + "exists": true + }, "igenomes_ignore": { "type": "boolean", "description": "Do not load the iGenomes reference config.", diff --git a/subworkflows/local/prepare_ref/main.nf b/subworkflows/local/prepare_ref/main.nf index 6660156..32edef5 100644 --- a/subworkflows/local/prepare_ref/main.nf +++ b/subworkflows/local/prepare_ref/main.nf @@ -5,8 +5,9 @@ include { GUNZIP as GUNZIP_FASTA } from '../../../modules/nf-core/gunzip' include { GUNZIP as GUNZIP_GTF } from '../../../modules/nf-core/gunzip' include { GUNZIP as GUNZIP_GFF } from '../../../modules/nf-core/gunzip' -include { UNTAR as UNTAR_STAR_INDEX } from '../../../modules/nf-core/untar' +include { UNTAR as UNTAR_SPACERANGER_REF } from "../../../modules/nf-core/untar" include { GFFREAD } from '../../../modules/nf-core/gffread' +include { SPACERANGER_MKGTF } from '../../../modules/nf-core/spaceranger/mkgtf' include { SPACERANGER_MKREF } from '../../../modules/nf-core/spaceranger/mkref' workflow PREPARE_REF { @@ -16,6 +17,7 @@ workflow PREPARE_REF { gtf // file: /path/to/genome.gtf gff // file: /path/to/genome.gff spaceranger_index // directory: /path/to/spaceranger/index/ (optional!) + reference_name // string: name for the new reference (if building new index) main: @@ -23,13 +25,28 @@ workflow PREPARE_REF { "Must provide a the spaceranger index (--spaceranger_index) \ or a fasta file ('--fasta') and a gtf/gff file ('--gtf'/'--gff') if no index is given!" + assert (params.spaceranger_index) || (reference_name): + "Must provide a reference name (--reference_name) when building a new spaceranger index!" + // Versions collector ch_versions = Channel.empty() if (params.spaceranger_index) { + ch_fasta = Channel.empty() + ch_gtf = Channel.empty() + // Define spaceranger index channel from the user-provided one - ch_spaceranger_index = spaceranger_index + if (params.spaceranger_index ==~ /.*\.tar\.gz$/) { + UNTAR_SPACERANGER_REF ([ + ["id": params.spaceranger_index.tokenize('/').last().replaceAll(/\.(tar)(\.gz)?$/, '')], + spaceranger_index + ]) + ch_spaceranger_index = UNTAR_SPACERANGER_REF.out.untar.map{ it[1] } + ch_versions = ch_versions.mix(UNTAR_SPACERANGER_REF.out.versions) + } else { + ch_spaceranger_index = spaceranger_index + } } else { @@ -65,14 +82,24 @@ workflow PREPARE_REF { ch_fasta = fasta } + // + // Prepare gft file by keeping specific biotypes + // + SPACERANGER_MKGTF( + ch_gtf, + ) + ch_versions = ch_versions.mix(SPACERANGER_MKGTF.out.versions) + ch_gtf_filtered = SPACERANGER_MKGTF.out.gtf + // // Create Spacer Ranger reference // SPACERANGER_MKREF( ch_fasta, - ch_gtf, - file(params.fasta).name.replaceAll(/\.(fa|fasta)(\.gz)?$/, '') + ch_gtf_filtered, + reference_name ) + ch_versions = ch_versions.mix(SPACERANGER_MKREF.out.versions) // Channel to handle SPACERANGER_MKREF output ch_spaceranger_index = SPACERANGER_MKREF.out.reference.ifEmpty { diff --git a/tests/.nftignore b/tests/.nftignore index e128a12..d62a97a 100644 --- a/tests/.nftignore +++ b/tests/.nftignore @@ -10,3 +10,6 @@ multiqc/multiqc_plots/{svg,pdf,png}/*.{svg,pdf,png} multiqc/multiqc_report.html fastqc/*_fastqc.{html,zip} pipeline_info/*.{html,json,txt,yml} +count/**.cloupe +count/*/molecule_info.h5 +count/**web_summary.html diff --git a/tests/default.nf.test.snap b/tests/default.nf.test.snap index 0eab4d0..782279a 100644 --- a/tests/default.nf.test.snap +++ b/tests/default.nf.test.snap @@ -11,21 +11,209 @@ "FQ_LINT": { "fq": "0.12.0 (2024-07-08)" }, + "SPACERANGER_COUNT": { + "spaceranger": "3.1.3" + }, + "UNTAR_SPACERANGER_REF": { + "untar": 1.34 + }, "Workflow": { "nfdata-omics/spatialomics": "v0.0.1dev" } }, [ - "cat", - "cat/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_1.merged.fastq.gz", - "cat/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_2.merged.fastq.gz", + "count", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/filtered_feature_bc_matrix", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/filtered_feature_bc_matrix.h5", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/filtered_feature_bc_matrix/barcodes.tsv.gz", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/filtered_feature_bc_matrix/features.tsv.gz", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/filtered_feature_bc_matrix/matrix.mtx.gz", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/raw_feature_bc_matrix", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/raw_feature_bc_matrix.h5", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/raw_feature_bc_matrix/barcodes.tsv.gz", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/raw_feature_bc_matrix/features.tsv.gz", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/raw_feature_bc_matrix/matrix.mtx.gz", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/raw_probe_bc_matrix.h5", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/spatial", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/spatial/aligned_fiducials.jpg", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/spatial/aligned_tissue_image.jpg", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/spatial/cytassist_image.tiff", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/spatial/detected_tissue_image.jpg", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/spatial/scalefactors_json.json", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/spatial/tissue_hires_image.png", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/spatial/tissue_lowres_image.png", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_002um/spatial/tissue_positions.parquet", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_graphclust", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_graphclust/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_kmeans_10_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_kmeans_10_clusters/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_kmeans_2_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_kmeans_2_clusters/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_kmeans_3_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_kmeans_3_clusters/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_kmeans_4_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_kmeans_4_clusters/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_kmeans_5_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_kmeans_5_clusters/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_kmeans_6_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_kmeans_6_clusters/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_kmeans_7_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_kmeans_7_clusters/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_kmeans_8_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_kmeans_8_clusters/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_kmeans_9_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/clustering/gene_expression_kmeans_9_clusters/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_graphclust", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_graphclust/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_kmeans_10_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_kmeans_10_clusters/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_kmeans_2_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_kmeans_2_clusters/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_kmeans_3_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_kmeans_3_clusters/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_kmeans_4_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_kmeans_4_clusters/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_kmeans_5_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_kmeans_5_clusters/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_kmeans_6_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_kmeans_6_clusters/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_kmeans_7_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_kmeans_7_clusters/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_kmeans_8_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_kmeans_8_clusters/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_kmeans_9_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/diffexp/gene_expression_kmeans_9_clusters/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/pca", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/pca/gene_expression_10_components", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/pca/gene_expression_10_components/components.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/pca/gene_expression_10_components/dispersion.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/pca/gene_expression_10_components/features_selected.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/pca/gene_expression_10_components/projection.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/pca/gene_expression_10_components/variance.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/umap", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/umap/gene_expression_2_components", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/analysis/umap/gene_expression_2_components/projection.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/cloupe.cloupe", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/filtered_feature_bc_matrix", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/filtered_feature_bc_matrix.h5", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/filtered_feature_bc_matrix/barcodes.tsv.gz", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/filtered_feature_bc_matrix/features.tsv.gz", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/filtered_feature_bc_matrix/matrix.mtx.gz", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/raw_feature_bc_matrix", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/raw_feature_bc_matrix.h5", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/raw_feature_bc_matrix/barcodes.tsv.gz", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/raw_feature_bc_matrix/features.tsv.gz", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/raw_feature_bc_matrix/matrix.mtx.gz", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/spatial", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/spatial/aligned_fiducials.jpg", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/spatial/aligned_tissue_image.jpg", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/spatial/cytassist_image.tiff", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/spatial/detected_tissue_image.jpg", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/spatial/scalefactors_json.json", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/spatial/tissue_hires_image.png", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/spatial/tissue_lowres_image.png", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_008um/spatial/tissue_positions.parquet", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_graphclust", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_graphclust/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_kmeans_10_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_kmeans_10_clusters/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_kmeans_2_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_kmeans_2_clusters/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_kmeans_3_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_kmeans_3_clusters/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_kmeans_4_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_kmeans_4_clusters/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_kmeans_5_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_kmeans_5_clusters/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_kmeans_6_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_kmeans_6_clusters/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_kmeans_7_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_kmeans_7_clusters/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_kmeans_8_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_kmeans_8_clusters/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_kmeans_9_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/clustering/gene_expression_kmeans_9_clusters/clusters.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_graphclust", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_graphclust/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_kmeans_10_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_kmeans_10_clusters/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_kmeans_2_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_kmeans_2_clusters/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_kmeans_3_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_kmeans_3_clusters/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_kmeans_4_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_kmeans_4_clusters/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_kmeans_5_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_kmeans_5_clusters/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_kmeans_6_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_kmeans_6_clusters/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_kmeans_7_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_kmeans_7_clusters/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_kmeans_8_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_kmeans_8_clusters/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_kmeans_9_clusters", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/diffexp/gene_expression_kmeans_9_clusters/differential_expression.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/pca", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/pca/gene_expression_10_components", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/pca/gene_expression_10_components/components.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/pca/gene_expression_10_components/dispersion.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/pca/gene_expression_10_components/features_selected.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/pca/gene_expression_10_components/projection.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/pca/gene_expression_10_components/variance.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/umap", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/umap/gene_expression_2_components", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/analysis/umap/gene_expression_2_components/projection.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/filtered_feature_bc_matrix", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/filtered_feature_bc_matrix.h5", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/filtered_feature_bc_matrix/barcodes.tsv.gz", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/filtered_feature_bc_matrix/features.tsv.gz", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/filtered_feature_bc_matrix/matrix.mtx.gz", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/raw_feature_bc_matrix", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/raw_feature_bc_matrix.h5", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/raw_feature_bc_matrix/barcodes.tsv.gz", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/raw_feature_bc_matrix/features.tsv.gz", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/raw_feature_bc_matrix/matrix.mtx.gz", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/spatial", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/spatial/aligned_fiducials.jpg", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/spatial/aligned_tissue_image.jpg", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/spatial/cytassist_image.tiff", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/spatial/detected_tissue_image.jpg", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/spatial/scalefactors_json.json", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/spatial/tissue_hires_image.png", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/spatial/tissue_lowres_image.png", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/binned_outputs/square_016um/spatial/tissue_positions.parquet", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/cloupe_008um.cloupe", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/feature_slice.h5", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/metrics_summary.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/molecule_info.h5", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/possorted_genome_bam.bam", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/possorted_genome_bam.bam.bai", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/probe_set.csv", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/spatial", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/spatial/aligned_fiducials.jpg", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/spatial/aligned_tissue_image.jpg", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/spatial/cytassist_image.tiff", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/spatial/detected_tissue_image.jpg", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/spatial/tissue_hires_image.png", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/spatial/tissue_lowres_image.png", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2/web_summary.html", + "count/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_web_summary.html", "fastqc", "fastqc/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_1_fastqc.html", "fastqc/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_1_fastqc.zip", "fastqc/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_2_fastqc.html", "fastqc/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_2_fastqc.zip", - "fq", - "fq/Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2.fq_lint.txt", "multiqc", "multiqc/multiqc_data", "multiqc/multiqc_data/fastqc-status-check-heatmap.txt", @@ -86,36 +274,121 @@ "multiqc/multiqc_plots/svg/fastqc_top_overrepresented_sequences_table.svg", "multiqc/multiqc_report.html", "pipeline_info", - "pipeline_info/spatialomics_software_mqc_versions.yml", - "spaceranger", - "spaceranger/GRCh38_chr21", - "spaceranger/GRCh38_chr21/fasta", - "spaceranger/GRCh38_chr21/fasta/genome.fa", - "spaceranger/GRCh38_chr21/fasta/genome.fa.fai", - "spaceranger/GRCh38_chr21/genes", - "spaceranger/GRCh38_chr21/genes/genes.gtf.gz", - "spaceranger/GRCh38_chr21/reference.json", - "spaceranger/GRCh38_chr21/star", - "spaceranger/GRCh38_chr21/star/Genome", - "spaceranger/GRCh38_chr21/star/SA", - "spaceranger/GRCh38_chr21/star/SAindex", - "spaceranger/GRCh38_chr21/star/chrLength.txt", - "spaceranger/GRCh38_chr21/star/chrName.txt", - "spaceranger/GRCh38_chr21/star/chrNameLength.txt", - "spaceranger/GRCh38_chr21/star/chrStart.txt", - "spaceranger/GRCh38_chr21/star/exonGeTrInfo.tab", - "spaceranger/GRCh38_chr21/star/exonInfo.tab", - "spaceranger/GRCh38_chr21/star/geneInfo.tab", - "spaceranger/GRCh38_chr21/star/genomeParameters.txt", - "spaceranger/GRCh38_chr21/star/sjdbInfo.txt", - "spaceranger/GRCh38_chr21/star/sjdbList.fromGTF.out.tab", - "spaceranger/GRCh38_chr21/star/sjdbList.out.tab", - "spaceranger/GRCh38_chr21/star/transcriptInfo.tab" + "pipeline_info/spatialomics_software_mqc_versions.yml" ], [ - "Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_1.merged.fastq.gz:md5,ffa0655a818f9c2e1a0d7bc7aa789d56", - "Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2_2.merged.fastq.gz:md5,23d07d8f5333d96fed828203c2d1c840", - "Visium_HD_Human_Lung_Cancer_HD_Only_Experiment2.fq_lint.txt:md5,6515137146b3e44204efea56d4a5d9c9", + "filtered_feature_bc_matrix.h5:md5,0c04bf2ea059df078bec3e765b1f3105", + "barcodes.tsv.gz:md5,b24a9f7bb39f2dcd4e662cbe1eaf7763", + "features.tsv.gz:md5,53092c021f35473a120886f08871c246", + "matrix.mtx.gz:md5,d1ecd2fb7cf480e5bfc3414e6c7b1de1", + "raw_feature_bc_matrix.h5:md5,cc100e1940be13298e293960cf2b1fa5", + "barcodes.tsv.gz:md5,789306c4252f46be30e2dcc9ebfe91a9", + "features.tsv.gz:md5,cf40b533d41bbb2f197ed8d75b3a9a67", + "matrix.mtx.gz:md5,1f130be805f03ee6cd6dcd094fee14d2", + "raw_probe_bc_matrix.h5:md5,24b422f16dd3ee066996545141d16316", + "aligned_fiducials.jpg:md5,edde03debc796feed00857c268c6f917", + "aligned_tissue_image.jpg:md5,aa844ffd606a7070c5d0de847c723b76", + "cytassist_image.tiff:md5,1328dd8ea02922375719f38e3de516ca", + "detected_tissue_image.jpg:md5,d4ba1f337bbf9a6d4028139b8acb2411", + "scalefactors_json.json:md5,6c3cc8f4a05b2d6a23e1e20ee0a01a19", + "tissue_hires_image.png:md5,e86177781b07119c5a680ea4af1d1d0d", + "tissue_lowres_image.png:md5,9aad2a56128c450c76fabbb44fb4c85a", + "tissue_positions.parquet:md5,f2c8f9936e5228ff2039aef143ea88e9", + "clusters.csv:md5,d4d0ca34ccd1259963b74a76bdf9b0f3", + "clusters.csv:md5,474edba1d0ea761243ea8a11dacffbd3", + "clusters.csv:md5,7bdd979786bf8d3e604b46df7639529e", + "clusters.csv:md5,3eb561e3800ad198c138deda84d389d1", + "clusters.csv:md5,d22c14592230fa3c438b3c4eb5e8a4da", + "clusters.csv:md5,9c6b5209737c23afa9ca7f4d32fb72fe", + "clusters.csv:md5,fe1056a04988d5f775d97c9e6d35ce74", + "clusters.csv:md5,2784e4e76ac20f912dec24e2c362d214", + "clusters.csv:md5,4f5fa1622a41fccb3a36167963247875", + "clusters.csv:md5,4877555fb827480317cdca9f85309d67", + "differential_expression.csv:md5,f14db6a829c7b65a5652e387f81801b8", + "differential_expression.csv:md5,9117294c879f9047452e1296f13221ee", + "differential_expression.csv:md5,06746aa3c918d0b9f715591bf6bb940a", + "differential_expression.csv:md5,5ad1bf02052f07618ee7ed4c842e7a94", + "differential_expression.csv:md5,483808c3b3a6cdad274ca795616be715", + "differential_expression.csv:md5,893e66660bd50c1bb78fb5d34f46a4be", + "differential_expression.csv:md5,31167d10756517bd7a19c1602efd6597", + "differential_expression.csv:md5,6ef899cb4dd1f2f424d9c52293b9b88a", + "differential_expression.csv:md5,32c54cd9fefe50c5cbb305c6f87232ee", + "differential_expression.csv:md5,03a1c90d247012bc695391ebb57b1757", + "components.csv:md5,c0fa4e916f7c7f5e2a994c7ce0e2926c", + "dispersion.csv:md5,825408c9678100049f0244361138a844", + "features_selected.csv:md5,7fcad5f834af732ca287ad6ce3901b37", + "projection.csv:md5,cf8f37dcfe6c718b28a8c13c9eca6dc6", + "variance.csv:md5,fc0451575fe03683e19bfc7e1981be3c", + "projection.csv:md5,61af621c1e89a2d8d67c74f2d412d548", + "filtered_feature_bc_matrix.h5:md5,6363415f0bfdbdae9a3eab5c8d838ae8", + "barcodes.tsv.gz:md5,2f707eec36c8c8478071836e375c589d", + "features.tsv.gz:md5,53092c021f35473a120886f08871c246", + "matrix.mtx.gz:md5,a127fb34124de78334c89568f9cb0f6e", + "raw_feature_bc_matrix.h5:md5,9bf24de28e22e54c325cbc678c1c2bf0", + "barcodes.tsv.gz:md5,a957a85f886ee2faa4c3c9b7283390d7", + "features.tsv.gz:md5,cf40b533d41bbb2f197ed8d75b3a9a67", + "matrix.mtx.gz:md5,a9d3761e7a168aaf8c9acae92c649c60", + "aligned_fiducials.jpg:md5,edde03debc796feed00857c268c6f917", + "aligned_tissue_image.jpg:md5,aa844ffd606a7070c5d0de847c723b76", + "cytassist_image.tiff:md5,1328dd8ea02922375719f38e3de516ca", + "detected_tissue_image.jpg:md5,d4ba1f337bbf9a6d4028139b8acb2411", + "scalefactors_json.json:md5,4ce0b83ceb37ea83dfa9546f46512fd0", + "tissue_hires_image.png:md5,e86177781b07119c5a680ea4af1d1d0d", + "tissue_lowres_image.png:md5,9aad2a56128c450c76fabbb44fb4c85a", + "tissue_positions.parquet:md5,7da6c10b7858c1b7eef4412e9418a81c", + "clusters.csv:md5,33e68b2ac4f23b949f6e06065bac5e13", + "clusters.csv:md5,2bdb92f776afbb8d16fd05cbb7642ac9", + "clusters.csv:md5,cacfbe32cdd8bfa4ff4f43afbbadd2bd", + "clusters.csv:md5,23a5200080ffc313c226598cc9ebc013", + "clusters.csv:md5,28bd7a610bc231179044d4f803e03c83", + "clusters.csv:md5,28a973fba1b2e537b2ed329d307f96d8", + "clusters.csv:md5,4d3f82fc468cc2f66c5cba9f99644d0d", + "clusters.csv:md5,4a6a4eb5b1e7347e879a75e620207399", + "clusters.csv:md5,b72fba5accda209349a74161cd80b66e", + "clusters.csv:md5,56e786b7caf256f3fdae080599b9df19", + "differential_expression.csv:md5,e88934c82df8feda578464705407d6a1", + "differential_expression.csv:md5,f86baad8d3b85c9a662df80566114b4b", + "differential_expression.csv:md5,1ec1a899a52b55bf76cf2e8642f7f87e", + "differential_expression.csv:md5,326a23b2785d65689865e4cad56bf85f", + "differential_expression.csv:md5,8e0b189ad6685485927bc13388722eff", + "differential_expression.csv:md5,797413d66d7a14e09e750dfae793ab47", + "differential_expression.csv:md5,006b412987feecd73ab1e322869489b0", + "differential_expression.csv:md5,dfb5f98340cba636ca16f236603dbef4", + "differential_expression.csv:md5,b304a7500e32f090e7705f730a10e2b0", + "differential_expression.csv:md5,fb3f5bc3776ac2e6d67decdcb32dcd24", + "components.csv:md5,1df663a266f1a2fd0796862148aba19b", + "dispersion.csv:md5,7a3d38d43bc8d6b328de90cfbe90660c", + "features_selected.csv:md5,708baf61d4532a9aab66d2446475ab7c", + "projection.csv:md5,cee8321db30438b58cd200d78dea2647", + "variance.csv:md5,a0c5fe923c91ac9b51dfa4fb9f570500", + "projection.csv:md5,7dc88f726fbde3712f11ea02f057f6ac", + "filtered_feature_bc_matrix.h5:md5,5c1578fe690b046a2335e864312fca41", + "barcodes.tsv.gz:md5,ec696f2a78ecb6aa4ff17afad0ebe075", + "features.tsv.gz:md5,53092c021f35473a120886f08871c246", + "matrix.mtx.gz:md5,8c9e0abfb0426a48db10062fd7344cbd", + "raw_feature_bc_matrix.h5:md5,8902051359ec4289f646d928fb544c82", + "barcodes.tsv.gz:md5,9513855a385313d295d275f0caaa63e6", + "features.tsv.gz:md5,cf40b533d41bbb2f197ed8d75b3a9a67", + "matrix.mtx.gz:md5,adf9f0f95131da595d6fb640e4b227ca", + "aligned_fiducials.jpg:md5,edde03debc796feed00857c268c6f917", + "aligned_tissue_image.jpg:md5,aa844ffd606a7070c5d0de847c723b76", + "cytassist_image.tiff:md5,1328dd8ea02922375719f38e3de516ca", + "detected_tissue_image.jpg:md5,d4ba1f337bbf9a6d4028139b8acb2411", + "scalefactors_json.json:md5,82571fd942409abcfb7b0bd17fa63faf", + "tissue_hires_image.png:md5,e86177781b07119c5a680ea4af1d1d0d", + "tissue_lowres_image.png:md5,9aad2a56128c450c76fabbb44fb4c85a", + "tissue_positions.parquet:md5,36c859a18ff9c86cd1279ac96c433627", + "feature_slice.h5:md5,3be11985be80bee6bae0ec7721280c8a", + "metrics_summary.csv:md5,bade113e17b62be4e41cd3c98b6e1c81", + "possorted_genome_bam.bam:md5,c9e1bfe554e6762bae55bf733cb9f221", + "possorted_genome_bam.bam.bai:md5,76e1653a2f2620e3e6dfb4fee4d4171d", + "probe_set.csv:md5,a74f1583689de3c9f95164b2fc090194", + "aligned_fiducials.jpg:md5,edde03debc796feed00857c268c6f917", + "aligned_tissue_image.jpg:md5,aa844ffd606a7070c5d0de847c723b76", + "cytassist_image.tiff:md5,1328dd8ea02922375719f38e3de516ca", + "detected_tissue_image.jpg:md5,d4ba1f337bbf9a6d4028139b8acb2411", + "tissue_hires_image.png:md5,e86177781b07119c5a680ea4af1d1d0d", + "tissue_lowres_image.png:md5,9aad2a56128c450c76fabbb44fb4c85a", "fastqc-status-check-heatmap.txt:md5,4310b189f786b63e554e1db93160a108", "fastqc_overrepresented_sequences_plot.txt:md5,29526e23692ce67f210bebbbc649b78c", "fastqc_per_base_n_content_plot.txt:md5,60c30869b5226368bf9e42881e1f06b8", @@ -127,32 +400,13 @@ "fastqc_sequence_duplication_levels_plot.txt:md5,b0bb0df056d4a31dcaec480e98d94939", "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f", "multiqc_fastqc.txt:md5,6c8ca51029ac53d1eb6d9ea10817f8bc", - "multiqc_general_stats.txt:md5,cf51b986de00e0ef3a35b82d16c5e504", - "genome.fa:md5,c675070fcf168d7b64cfadc30b5d7b4d", - "genome.fa.fai:md5,6ea51e1c1231da5e49212ea9f493d703", - "genes.gtf.gz:md5,0f7fd0379e0fc70735f971377b13e50c", - "reference.json:md5,359fd1bfe2b4b01ab3037ac04d1610bf", - "Genome:md5,612664e3cfde5e1b73ad541d93752b31", - "SA:md5,074ae54177bb7b9cb981382f043f36e5", - "SAindex:md5,24ce0c200405447cb9dec1714618e92f", - "chrLength.txt:md5,b0be0a56ddefa84552742c72d4859eac", - "chrName.txt:md5,e99d7d1051eee43ceab5563c2d09fcee", - "chrNameLength.txt:md5,c985a141685e8431ec27c782816cb744", - "chrStart.txt:md5,6925b594ea2eeb964ba87cd6d42ab98f", - "exonGeTrInfo.tab:md5,a36b92eeceaaf921b9d19cd8e806a98e", - "exonInfo.tab:md5,bb892190d1ebdd59bf55652916121479", - "geneInfo.tab:md5,4303e97d841035b5c0fcc3686b2f5a36", - "genomeParameters.txt:md5,1efd18b59cae82e3cc63f9ffc25ff85b", - "sjdbInfo.txt:md5,12fb05dc7cea89735a0c19e1c0df61cb", - "sjdbList.fromGTF.out.tab:md5,d9e4a184cde15a5ab282ff66e740a4a2", - "sjdbList.out.tab:md5,766fbca932681f8666b3a9e5fb3640bd", - "transcriptInfo.tab:md5,ad9baa68c5432908b42693edb9aed02a" + "multiqc_general_stats.txt:md5,cf51b986de00e0ef3a35b82d16c5e504" ] ], "meta": { "nf-test": "0.9.2", "nextflow": "25.04.8" }, - "timestamp": "2025-10-20T14:57:14.219336507" + "timestamp": "2025-11-05T15:21:34.914957103" } } \ No newline at end of file diff --git a/workflows/spatialomics.nf b/workflows/spatialomics.nf index a6763a6..4d848ce 100644 --- a/workflows/spatialomics.nf +++ b/workflows/spatialomics.nf @@ -5,12 +5,15 @@ */ include { FASTQC } from '../modules/nf-core/fastqc/main' include { MULTIQC } from '../modules/nf-core/multiqc/main' +include { SPACERANGER_COUNT } from '../modules/nf-core/spaceranger/count/main' + +include { PREPARE_REF } from '../subworkflows/local/prepare_ref' +include { PREPARE_FASTQ } from '../subworkflows/local/prepare_fastq' + include { paramsSummaryMap } from 'plugin/nf-schema' include { paramsSummaryMultiqc } from '../subworkflows/nf-core/utils_nfcore_pipeline' include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' include { methodsDescriptionText } from '../subworkflows/local/utils_nfcore_spatialomics_pipeline' -include { PREPARE_REF } from '../subworkflows/local/prepare_ref' -include { PREPARE_FASTQ } from '../subworkflows/local/prepare_fastq' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -26,6 +29,7 @@ workflow SPATIALOMICS { ch_gtf // value channel: path(gtf) ch_gff // value channel: path(gff) ch_spaceranger_index // value channel: path(spaceranger_index) + ch_probeset // value channel: path(probeset) (optional) main: @@ -40,6 +44,7 @@ workflow SPATIALOMICS { ch_gtf, ch_gff, ch_spaceranger_index, + params.reference_name ) ch_versions = ch_versions.mix(PREPARE_REF.out.versions) @@ -53,6 +58,24 @@ workflow SPATIALOMICS { ch_versions = ch_versions.mix(PREPARE_FASTQ.out.versions) ch_multiqc_files = ch_multiqc_files.mix(PREPARE_FASTQ.out.multiqc_files) + ch_reads + .multiMap { meta, fastq -> + reads: [ ["id": meta.id], fastq ] + slide_and_img: [ ["id": meta.id], meta.image, meta.slide, meta.area, meta.cytaimage, meta.darkimage, meta.colorizedimage, meta.alignment, meta.slidefile ] + } + .set { ch_reads_with_meta } + + // + // MODULE: Align and quantify with Space Ranger + // + SPACERANGER_COUNT( + ch_reads_with_meta.reads, + ch_reads_with_meta.slide_and_img, + PREPARE_REF.out.spaceranger_index, + ch_probeset + ) + ch_versions = ch_versions.mix(SPACERANGER_COUNT.out.versions) + // // Collate and save software versions //