diff --git a/CHANGELOG.md b/CHANGELOG.md index 44a03835..b13558eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [[#405]](https://github.com/nf-core/smrnaseq/pull/405) - Fix [Umicollapse algo wrong set](https://github.com/nf-core/smrnaseq/issues/404) - Fix potential bug in Umicollapse (not effective as we do not allow PE data in smrnaseq - but for consistency) - [[#420]](https://github.com/nf-core/smrnaseq/pull/420) - Fix [mirTrace produces an error in test nextflex](https://github.com/nf-core/smrnaseq/issues/419) - Allow config mode to be used in mirtrace/qc - [[#425]](https://github.com/nf-core/smrnaseq/pull/425) - Raise [minimum required NXF version for pipeline](https://github.com/nf-core/smrnaseq/issues/424) - usage of `arity` in some modules now requires this +- [[#426]](https://github.com/nf-core/smrnaseq/pull/426) - Add [nf-core mirtop](https://github.com/nf-core/smrnaseq/issues/426) - replace local for nf-core `mirtop` ## v2.3.1 - 2024-04-18 - Gray Zinc Dalmation Patch diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 2b3c2bd9..c2cf38c6 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -31,3 +31,6 @@ module_order: info: "This section of the report shows FastQC results after UMI-based deduplication." path_filters: - "**/*.deduplicated_fastqc.zip" +sp: + mirtop: + fn: mirtop_stats.log diff --git a/conf/modules.config b/conf/modules.config index f1992ea2..877f997f 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -337,6 +337,29 @@ process { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } + + // Mirtop + + withName: 'NFCORE_SMRNASEQ:MIRNA_QUANT:BAM_STATS_MIRNA_MIRTOP:.*' { + publishDir = [ + path: { "${params.outdir}/mirna_quant/mirtop" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: 'MIRTOP_COUNTS' { + ext.args = '--add-extra' + } + + withName: 'MIRTOP_GFF' { + publishDir = [ + path: { "${params.outdir}/mirna_quant/mirtop/gff" }, + mode: params.publish_dir_mode, + ] + } + + withName: 'NFCORE_SMRNASEQ:MIRNA_QUANT:TABLE_MERGE' { publishDir = [ path: { "${params.outdir}/mirna_quant/mirtop" }, @@ -346,6 +369,7 @@ process { } + // // GENOME_QUANT // diff --git a/modules.json b/modules.json index 5d7f9eeb..5fe46b1b 100644 --- a/modules.json +++ b/modules.json @@ -35,6 +35,26 @@ "git_sha": "cf3ed075695639b0a0924eb0901146df1996dc08", "installed_by": ["modules"] }, + "mirtop/counts": { + "branch": "master", + "git_sha": "43b2b702abd8ab2cb1aa1365763f518413ad5721", + "installed_by": ["bam_stats_mirna_mirtop"] + }, + "mirtop/export": { + "branch": "master", + "git_sha": "43b2b702abd8ab2cb1aa1365763f518413ad5721", + "installed_by": ["bam_stats_mirna_mirtop"] + }, + "mirtop/gff": { + "branch": "master", + "git_sha": "43b2b702abd8ab2cb1aa1365763f518413ad5721", + "installed_by": ["bam_stats_mirna_mirtop"] + }, + "mirtop/stats": { + "branch": "master", + "git_sha": "43b2b702abd8ab2cb1aa1365763f518413ad5721", + "installed_by": ["bam_stats_mirna_mirtop"] + }, "mirtrace/qc": { "branch": "master", "git_sha": "6dd363c9b9b7cf30c4418597d20b6861848f0475", @@ -105,6 +125,11 @@ "git_sha": "46eca555142d6e597729fcb682adcc791796f514", "installed_by": ["subworkflows"] }, + "bam_stats_mirna_mirtop": { + "branch": "master", + "git_sha": "43b2b702abd8ab2cb1aa1365763f518413ad5721", + "installed_by": ["subworkflows"] + }, "bam_stats_samtools": { "branch": "master", "git_sha": "0eacd714effe5aac1c1de26593873960b3346cab", diff --git a/modules/nf-core/mirtop/counts/environment.yml b/modules/nf-core/mirtop/counts/environment.yml new file mode 100644 index 00000000..ed1198d8 --- /dev/null +++ b/modules/nf-core/mirtop/counts/environment.yml @@ -0,0 +1,9 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - "bioconda::mirtop=0.4.25" + - "conda-forge::r-base=4.1.1" + - "conda-forge::r-data.table=1.14.2" diff --git a/modules/nf-core/mirtop/counts/main.nf b/modules/nf-core/mirtop/counts/main.nf new file mode 100644 index 00000000..9b623bff --- /dev/null +++ b/modules/nf-core/mirtop/counts/main.nf @@ -0,0 +1,53 @@ +process MIRTOP_COUNTS { + tag "$meta.id" + label 'process_single' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-0c13ef770dd7cc5c76c2ce23ba6669234cf03385:63be019f50581cc5dfe4fc0f73ae50f2d4d661f7-0' : + 'biocontainers/mulled-v2-0c13ef770dd7cc5c76c2ce23ba6669234cf03385:63be019f50581cc5dfe4fc0f73ae50f2d4d661f7-0' }" + + input: + tuple val(meta), path(mirtop_gff) + tuple val(meta2), path(hairpin) + tuple val(meta3), path(gtf), val(species) + + output: + tuple val(meta), path("counts/*.tsv"), emit: tsv + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + mirtop \\ + counts \\ + $args \\ + --hairpin $hairpin \\ + --gtf $gtf \\ + --sps $species \\ + --gff $mirtop_gff \\ + -o counts + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mirtop: \$(echo \$(mirtop --version 2>&1) | sed 's/^.*mirtop //') + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + mkdir counts + touch counts/mirtop.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mirtop: \$(echo \$(mirtop --version 2>&1) | sed 's/^.*mirtop //') + END_VERSIONS + """ +} diff --git a/modules/nf-core/mirtop/counts/meta.yml b/modules/nf-core/mirtop/counts/meta.yml new file mode 100644 index 00000000..904dbd31 --- /dev/null +++ b/modules/nf-core/mirtop/counts/meta.yml @@ -0,0 +1,57 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: "mirtop_counts" +description: mirtop counts generates a file with the minimal information about each sequence and the count data in columns for each samples. +keywords: + - mirna + - isomir + - gff +tools: + - "mirtop": + description: "Small RNA-seq annotation" + homepage: "https://github.com/miRTop/mirtop" + documentation: "https://mirtop.readthedocs.io/en/latest/" + tool_dev_url: "https://github.com/miRTop/mirtop" + licence: ["MIT License"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - mirtop_gff: + type: file + description: GFF file + pattern: "*.{gff}" + - hairpin: + type: file + description: Hairpin file + pattern: "*.{fa,fasta}" + - gtf: + type: file + description: GTF file + pattern: "*.{gtf}" + - species: + type: string + description: Species name of the GTF file + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - tsv: + type: file + description: TSV file + pattern: "*.{tsv}" + +authors: + - "@atrigila" +maintainers: + - "@atrigila" diff --git a/modules/nf-core/mirtop/counts/tests/main.nf.test b/modules/nf-core/mirtop/counts/tests/main.nf.test new file mode 100644 index 00000000..52b31db1 --- /dev/null +++ b/modules/nf-core/mirtop/counts/tests/main.nf.test @@ -0,0 +1,97 @@ +nextflow_process { + + name "Test Process MIRTOP_COUNTS" + script "../main.nf" + config "./nextflow.config" + process "MIRTOP_COUNTS" + + tag "modules" + tag "modules_nfcore" + tag "mirtop" + tag "mirtop/gff" + tag "mirtop/counts" + + setup { + run("MIRTOP_GFF") { + script "../../gff/main.nf" + process { + """ + input[0] = [ + [ id:'sample_sim_isomir_bam'], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/sim_isomir_sort.bam", checkIfExists: true), + ] + input[1] = [ + [ id:'hairpin'], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/hairpin_mirtop.fa", checkIfExists: true), + ] + input[2] = [ + [ id:'hsa' ], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/hsa.gff3", checkIfExists: true), + "hsa"] + """ + } + } + } + + test("isomir - bam") { + + when { + process { + """ + input[0] = MIRTOP_GFF.out.gff + input[1] = [ + [ id:'hairpin'], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/hairpin_mirtop.fa", checkIfExists: true), + ] + input[2] = [ + [ id:'hsa' ], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/hsa.gff3", checkIfExists: true), + "hsa"] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.versions + ).match() + }, + // md5sum is not stable, order of elements in column "variant" change + { assert file(process.out.tsv[0][1]).readLines().findAll { it.contains("iso-22-I0S21NSLN") }} + ) + } + + } + + test("isomir - bam - stub") { + + options "-stub" + + when { + process { + """ + input[0] = MIRTOP_GFF.out.gff + input[1] = [ + [ id:'hairpin'], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/hairpin_mirtop.fa", checkIfExists: true), + ] + input[2] = [ + [ id:'hsa' ], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/hsa.gff3", checkIfExists: true), + "hsa"] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/mirtop/counts/tests/main.nf.test.snap b/modules/nf-core/mirtop/counts/tests/main.nf.test.snap new file mode 100644 index 00000000..d05798b0 --- /dev/null +++ b/modules/nf-core/mirtop/counts/tests/main.nf.test.snap @@ -0,0 +1,47 @@ +{ + "isomir - bam - stub": { + "content": [ + { + "0": [ + [ + { + "id": "sample_sim_isomir_bam" + }, + "mirtop.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,16430682c2080d67387e7d5e9caf69a7" + ], + "tsv": [ + [ + { + "id": "sample_sim_isomir_bam" + }, + "mirtop.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,16430682c2080d67387e7d5e9caf69a7" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-03T13:24:41.148536938" + }, + "isomir - bam": { + "content": [ + [ + "versions.yml:md5,16430682c2080d67387e7d5e9caf69a7" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T18:39:50.607483472" + } +} \ No newline at end of file diff --git a/modules/nf-core/mirtop/counts/tests/nextflow.config b/modules/nf-core/mirtop/counts/tests/nextflow.config new file mode 100644 index 00000000..83d77e20 --- /dev/null +++ b/modules/nf-core/mirtop/counts/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: 'MIRTOP_COUNTS' { + ext.args = '--add-extra' + } +} diff --git a/modules/nf-core/mirtop/export/environment.yml b/modules/nf-core/mirtop/export/environment.yml new file mode 100644 index 00000000..4b5ae03a --- /dev/null +++ b/modules/nf-core/mirtop/export/environment.yml @@ -0,0 +1,10 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - "bioconda::mirtop=0.4.25" + - "bioconda::samtools=1.15.1" + - "conda-forge::r-base=4.1.1" + - "conda-forge::r-data.table=1.14.2" diff --git a/modules/nf-core/mirtop/export/main.nf b/modules/nf-core/mirtop/export/main.nf new file mode 100644 index 00000000..33f6c303 --- /dev/null +++ b/modules/nf-core/mirtop/export/main.nf @@ -0,0 +1,57 @@ +process MIRTOP_EXPORT { + tag "$meta.id" + label 'process_single' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-0c13ef770dd7cc5c76c2ce23ba6669234cf03385:63be019f50581cc5dfe4fc0f73ae50f2d4d661f7-0' : + 'biocontainers/mulled-v2-0c13ef770dd7cc5c76c2ce23ba6669234cf03385:63be019f50581cc5dfe4fc0f73ae50f2d4d661f7-0' }" + + input: + tuple val(meta), path(mirtop_gff) + tuple val(meta2), path(hairpin) + tuple val(meta3), path(gtf), val(species) + + output: + tuple val(meta), path("export/*_rawData.tsv") , emit: tsv, optional: true + tuple val(meta), path("export/*.fasta") , emit: fasta, optional: true + tuple val(meta), path("export/*.vcf*") , emit: vcf , optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '--format isomir' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + mirtop \\ + export \\ + $args \\ + --hairpin $hairpin\\ + --gtf $gtf \\ + --sps $species \\ + -o export \\ + $mirtop_gff + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mirtop: \$(echo \$(mirtop --version 2>&1) | sed 's/^.*mirtop //') + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + mkdir export + touch export/${prefix}.fasta + touch export/${prefix}.vcf + touch export/${prefix}.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mirtop: \$(echo \$(mirtop --version 2>&1) | sed 's/^.*mirtop //') + END_VERSIONS + """ +} diff --git a/modules/nf-core/mirtop/export/meta.yml b/modules/nf-core/mirtop/export/meta.yml new file mode 100644 index 00000000..d797f783 --- /dev/null +++ b/modules/nf-core/mirtop/export/meta.yml @@ -0,0 +1,65 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: "mirtop_export" +description: mirtop export generates files such as fasta, vcf or compatible with isomiRs bioconductor package +keywords: + - mirna + - isomir + - gff +tools: + - "mirtop": + description: "Small RNA-seq annotation" + homepage: "https://github.com/miRTop/mirtop" + documentation: "https://mirtop.readthedocs.io/en/latest/" + tool_dev_url: "https://github.com/miRTop/mirtop" + licence: ["MIT License"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - mirtop_gff: + type: file + description: GFF file + pattern: "*.{gff}" + - hairpin: + type: file + description: Hairpin file + pattern: "*.{fa,fasta}" + - gtf: + type: file + description: GTF file + pattern: "*.{gtf}" + - species: + type: string + description: Species name of the GTF file + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - tsv: + type: file + description: TSV file + pattern: "*.{tsv}" + - fasta: + type: file + description: FASTA file + pattern: "*.{fasta,fa}" + - vcf: + type: file + description: VCF file + pattern: "*.{vcf,vcf.gz}" + +authors: + - "@atrigila" +maintainers: + - "@atrigila" diff --git a/modules/nf-core/mirtop/export/tests/main.nf.test b/modules/nf-core/mirtop/export/tests/main.nf.test new file mode 100644 index 00000000..234caf57 --- /dev/null +++ b/modules/nf-core/mirtop/export/tests/main.nf.test @@ -0,0 +1,92 @@ +nextflow_process { + + name "Test Process MIRTOP_EXPORT" + script "../main.nf" + process "MIRTOP_EXPORT" + + tag "modules" + tag "modules_nfcore" + tag "mirtop" + tag "mirtop/gff" + tag "mirtop/export" + + setup { + run("MIRTOP_GFF") { + script "../../gff/main.nf" + process { + """ + input[0] = [ + [ id:'sample_sim_isomir_bam'], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/sim_isomir_sort.bam", checkIfExists: true), + ] + input[1] = [ + [ id:'hairpin'], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/hairpin_mirtop.fa", checkIfExists: true), + ] + input[2] = [ + [ id:'hsa' ], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/hsa.gff3", checkIfExists: true), + "hsa"] + """ + } + } + } + + test("isomir - bam") { + + when { + process { + """ + input[0] = MIRTOP_GFF.out.gff + input[1] = [ + [ id:'hairpin'], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/hairpin_mirtop.fa", checkIfExists: true), + ] + input[2] = [ + [ id:'hsa' ], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/hsa.gff3", checkIfExists: true), + "hsa"] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("isomir - bam - stub") { + + options "-stub" + + when { + process { + """ + input[0] = MIRTOP_GFF.out.gff + input[1] = [ + [ id:'hairpin'], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/hairpin_mirtop.fa", checkIfExists: true), + ] + input[2] = [ + [ id:'hsa' ], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/hsa.gff3", checkIfExists: true), + "hsa"] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + +} diff --git a/modules/nf-core/mirtop/export/tests/main.nf.test.snap b/modules/nf-core/mirtop/export/tests/main.nf.test.snap new file mode 100644 index 00000000..f8c668a6 --- /dev/null +++ b/modules/nf-core/mirtop/export/tests/main.nf.test.snap @@ -0,0 +1,102 @@ +{ + "isomir - bam - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "sample_sim_isomir_bam" + }, + "sample_sim_isomir_bam.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "sample_sim_isomir_bam" + }, + "sample_sim_isomir_bam.vcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,2dbbe262efcd19a681b803812d0e4c8c" + ], + "fasta": [ + [ + { + "id": "sample_sim_isomir_bam" + }, + "sample_sim_isomir_bam.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tsv": [ + + ], + "vcf": [ + [ + { + "id": "sample_sim_isomir_bam" + }, + "sample_sim_isomir_bam.vcf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,2dbbe262efcd19a681b803812d0e4c8c" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-03T15:25:40.531010949" + }, + "isomir - bam": { + "content": [ + { + "0": [ + [ + { + "id": "sample_sim_isomir_bam" + }, + "sample_sim_isomir_bam_mirtop_rawData.tsv:md5,efbcbe67716a4a56f89e538af2251dcc" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,2dbbe262efcd19a681b803812d0e4c8c" + ], + "fasta": [ + + ], + "tsv": [ + [ + { + "id": "sample_sim_isomir_bam" + }, + "sample_sim_isomir_bam_mirtop_rawData.tsv:md5,efbcbe67716a4a56f89e538af2251dcc" + ] + ], + "vcf": [ + + ], + "versions": [ + "versions.yml:md5,2dbbe262efcd19a681b803812d0e4c8c" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-12T23:12:49.612315132" + } +} \ No newline at end of file diff --git a/modules/nf-core/mirtop/gff/environment.yml b/modules/nf-core/mirtop/gff/environment.yml new file mode 100644 index 00000000..6e57308a --- /dev/null +++ b/modules/nf-core/mirtop/gff/environment.yml @@ -0,0 +1,8 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - "bioconda::mirtop=0.4.25" + - "bioconda::samtools=1.15.1" diff --git a/modules/nf-core/mirtop/gff/main.nf b/modules/nf-core/mirtop/gff/main.nf new file mode 100644 index 00000000..453b624b --- /dev/null +++ b/modules/nf-core/mirtop/gff/main.nf @@ -0,0 +1,55 @@ +process MIRTOP_GFF { + tag "$meta.id" + label 'process_single' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-0c13ef770dd7cc5c76c2ce23ba6669234cf03385:63be019f50581cc5dfe4fc0f73ae50f2d4d661f7-0' : + 'biocontainers/mulled-v2-0c13ef770dd7cc5c76c2ce23ba6669234cf03385:63be019f50581cc5dfe4fc0f73ae50f2d4d661f7-0' }" + + input: + tuple val(meta), path(bam, arity:'1..*') + tuple val(meta2), path(hairpin) + tuple val(meta3), path(gtf), val(species) + + output: + tuple val(meta), path("mirtop/*mirtop.gff") , emit: gff + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + mirtop \\ + gff \\ + $args \\ + --sps $species \\ + --hairpin $hairpin \\ + --gtf $gtf \\ + -o mirtop \\ + $bam + + mv mirtop/mirtop.gff mirtop/${prefix}_mirtop.gff + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mirtop: \$(echo \$(mirtop --version 2>&1) | sed 's/^.*mirtop //') + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + mkdir mirtop + touch mirtop/mirtop.gff + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mirtop: \$(echo \$(mirtop --version 2>&1) | sed 's/^.*mirtop //') + END_VERSIONS + """ +} diff --git a/modules/nf-core/mirtop/gff/meta.yml b/modules/nf-core/mirtop/gff/meta.yml new file mode 100644 index 00000000..454d5edf --- /dev/null +++ b/modules/nf-core/mirtop/gff/meta.yml @@ -0,0 +1,57 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: "mirtop_gff" +description: mirtop gff generates the GFF3 adapter format to capture miRNA variations +keywords: + - mirna + - isomir + - gff +tools: + - "mirtop": + description: "Small RNA-seq annotation" + homepage: "https://github.com/miRTop/mirtop" + documentation: "https://mirtop.readthedocs.io/en/latest/" + tool_dev_url: "https://github.com/miRTop/mirtop" + licence: ["MIT License"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - bam: + type: file + description: Sorted BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - hairpin: + type: file + description: Hairpin file + pattern: "*.{fa,fasta}" + - gtf: + type: file + description: GTF file + pattern: "*.{gtf}" + - species: + type: string + description: Species name of the GTF file + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - gff: + type: file + description: GFF file + pattern: "*.{gff}" + +authors: + - "@atrigila" +maintainers: + - "@atrigila" diff --git a/modules/nf-core/mirtop/gff/tests/main.nf.test b/modules/nf-core/mirtop/gff/tests/main.nf.test new file mode 100644 index 00000000..3ce7ef85 --- /dev/null +++ b/modules/nf-core/mirtop/gff/tests/main.nf.test @@ -0,0 +1,80 @@ +nextflow_process { + + name "Test Process MIRTOP_GFF" + script "../main.nf" + process "MIRTOP_GFF" + + tag "modules" + tag "modules_nfcore" + tag "mirtop" + tag "mirtop/gff" + + test("isomir - bam") { + + when { + process { + """ + input[0] = [ + [ id:'sample_sim_isomir_bam'], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/sim_isomir_sort.bam", checkIfExists: true), + ] + input[1] = [ + [ id:'hairpin'], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/hairpin_mirtop.fa", checkIfExists: true), + ] + input[2] = [ + [ id:'hsa' ], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/hsa.gff3", checkIfExists: true), + "hsa"] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.bam, + process.out.versions, + ).match() + }, + // md5sum is not stable, order of elements in section "variant" may change + { assert file(process.out.gff[0][1]).readLines().findAll { it.contains("iso-24-5URPV39QFB") }} + ) + } + + } + + test("isomir - bam - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'sample_sim_isomir_bam'], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/sim_isomir_sort.bam", checkIfExists: true), + ] + input[1] = [ + [ id:'hairpin'], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/hairpin_mirtop.fa", checkIfExists: true), + ] + input[2] = [ + [ id:'hsa' ], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/mirtop/hsa.gff3", checkIfExists: true), + "hsa"] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/mirtop/gff/tests/main.nf.test.snap b/modules/nf-core/mirtop/gff/tests/main.nf.test.snap new file mode 100644 index 00000000..a9e6f852 --- /dev/null +++ b/modules/nf-core/mirtop/gff/tests/main.nf.test.snap @@ -0,0 +1,48 @@ +{ + "isomir - bam - stub": { + "content": [ + { + "0": [ + [ + { + "id": "sample_sim_isomir_bam" + }, + "mirtop.gff:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,d16ade25d46f8d12e200e124205afefc" + ], + "gff": [ + [ + { + "id": "sample_sim_isomir_bam" + }, + "mirtop.gff:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,d16ade25d46f8d12e200e124205afefc" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-12T22:40:30.542921953" + }, + "isomir - bam": { + "content": [ + null, + [ + "versions.yml:md5,d16ade25d46f8d12e200e124205afefc" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-12T22:38:09.903017316" + } +} \ No newline at end of file diff --git a/modules/nf-core/mirtop/stats/environment.yml b/modules/nf-core/mirtop/stats/environment.yml new file mode 100644 index 00000000..3c24c43e --- /dev/null +++ b/modules/nf-core/mirtop/stats/environment.yml @@ -0,0 +1,8 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - "bioconda::mirtop=0.4.25" + - "conda-forge::pandas=1.3.5" diff --git a/modules/nf-core/mirtop/stats/main.nf b/modules/nf-core/mirtop/stats/main.nf new file mode 100644 index 00000000..51d33019 --- /dev/null +++ b/modules/nf-core/mirtop/stats/main.nf @@ -0,0 +1,51 @@ + +process MIRTOP_STATS { + tag "$meta.id" + label 'process_single' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-0c13ef770dd7cc5c76c2ce23ba6669234cf03385:63be019f50581cc5dfe4fc0f73ae50f2d4d661f7-0' : + 'biocontainers/mulled-v2-0c13ef770dd7cc5c76c2ce23ba6669234cf03385:63be019f50581cc5dfe4fc0f73ae50f2d4d661f7-0' }" + + input: + tuple val(meta), path(mirtop_gff) + + output: + tuple val(meta), path("stats/*.txt") , emit: txt + tuple val(meta), path("stats/*_stats.log") , emit: log + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + mirtop \\ + stats \\ + $args \\ + --out stats \\ + $mirtop_gff + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mirtop: \$(echo \$(mirtop --version 2>&1) | sed 's/^.*mirtop //') + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + mkdir stats + touch stats/${prefix}.txt + touch stats/${prefix}_stats.log + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mirtop: \$(echo \$(mirtop --version 2>&1) | sed 's/^.*mirtop //') + END_VERSIONS + """ +} diff --git a/modules/nf-core/mirtop/stats/meta.yml b/modules/nf-core/mirtop/stats/meta.yml new file mode 100644 index 00000000..1bcd2248 --- /dev/null +++ b/modules/nf-core/mirtop/stats/meta.yml @@ -0,0 +1,50 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: "mirtop_stats" +description: mirtop gff gets the number of isomiRs and miRNAs annotated in the GFF file by isomiR category. +keywords: + - mirna + - isomir + - gff +tools: + - "mirtop": + description: "Small RNA-seq annotation" + homepage: "https://github.com/miRTop/mirtop" + documentation: "https://mirtop.readthedocs.io/en/latest/" + tool_dev_url: "https://github.com/miRTop/mirtop" + licence: ["MIT License"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - mirtop_gff: + type: file + description: Mirtop GFF file obtained with mirtop_gff + pattern: "*.{gff}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - txt: + type: file + description: TXT file with stats + pattern: "*.{txt}" + - log: + type: file + description: log file with stats + pattern: "*.{log}" + +authors: + - "@atrigila" +maintainers: + - "@atrigila" diff --git a/modules/nf-core/mirtop/stats/tests/main.nf.test b/modules/nf-core/mirtop/stats/tests/main.nf.test new file mode 100644 index 00000000..e9d16cdc --- /dev/null +++ b/modules/nf-core/mirtop/stats/tests/main.nf.test @@ -0,0 +1,58 @@ + +nextflow_process { + + name "Test Process MIRTOP_STATS" + script "../main.nf" + process "MIRTOP_STATS" + + tag "modules" + tag "modules_nfcore" + tag "mirtop" + tag "mirtop/stats" + + test("isomir - bam") { + + when { + process { + """ + input[0] = [ + [ id:'mirtop_gff_sample1'], // meta map + file("https://github.com/miRTop/mirtop/raw/master/data/examples/gff/correct_file.gff", checkIfExists: true), + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("isomir - bam - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'mirtop_gff_sample1'], // meta map + file("https://github.com/miRTop/mirtop/raw/master/data/examples/gff/correct_file.gff", checkIfExists: true), + ] """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/mirtop/stats/tests/main.nf.test.snap b/modules/nf-core/mirtop/stats/tests/main.nf.test.snap new file mode 100644 index 00000000..ba9633d1 --- /dev/null +++ b/modules/nf-core/mirtop/stats/tests/main.nf.test.snap @@ -0,0 +1,100 @@ +{ + "isomir - bam - stub": { + "content": [ + { + "0": [ + [ + { + "id": "mirtop_gff_sample1" + }, + "mirtop_gff_sample1.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "mirtop_gff_sample1" + }, + "mirtop_gff_sample1_stats.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,53f4ce15bd9c3321676f960d89a30aca" + ], + "log": [ + [ + { + "id": "mirtop_gff_sample1" + }, + "mirtop_gff_sample1_stats.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "txt": [ + [ + { + "id": "mirtop_gff_sample1" + }, + "mirtop_gff_sample1.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,53f4ce15bd9c3321676f960d89a30aca" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-03T17:49:32.73944037" + }, + "isomir - bam": { + "content": [ + { + "0": [ + [ + { + "id": "mirtop_gff_sample1" + }, + "mirtop_stats.txt:md5,952f4face50f16ae54bc17eeba787535" + ] + ], + "1": [ + [ + { + "id": "mirtop_gff_sample1" + }, + "mirtop_stats.log:md5,c5ecfb62e732021795df17306a0fb99b" + ] + ], + "2": [ + "versions.yml:md5,53f4ce15bd9c3321676f960d89a30aca" + ], + "log": [ + [ + { + "id": "mirtop_gff_sample1" + }, + "mirtop_stats.log:md5,c5ecfb62e732021795df17306a0fb99b" + ] + ], + "txt": [ + [ + { + "id": "mirtop_gff_sample1" + }, + "mirtop_stats.txt:md5,952f4face50f16ae54bc17eeba787535" + ] + ], + "versions": [ + "versions.yml:md5,53f4ce15bd9c3321676f960d89a30aca" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-03T17:47:39.121648755" + } +} \ No newline at end of file diff --git a/subworkflows/local/mirna_quant.nf b/subworkflows/local/mirna_quant.nf index bccc9837..e8a99a4c 100644 --- a/subworkflows/local/mirna_quant.nf +++ b/subworkflows/local/mirna_quant.nf @@ -22,6 +22,7 @@ include { SEQCLUSTER_COLLAPSE } from '../../modules/nf-core/seqcluster/collapse include { MIRTOP_QUANT } from '../../modules/local/mirtop_quant.nf' include { TABLE_MERGE } from '../../modules/local/datatable_merge/datatable_merge.nf' include { EDGER_QC } from '../../modules/local/edger_qc/edger_qc.nf' +include { BAM_STATS_MIRNA_MIRTOP } from '../../subworkflows/nf-core/bam_stats_mirna_mirtop/main' workflow MIRNA_QUANT { take: @@ -92,11 +93,27 @@ workflow MIRNA_QUANT { ch_versions = ch_versions.mix(BOWTIE_MAP_SEQCLUSTER.out.versions) ch_mirtop_logs = Channel.empty() - //Block wont run if ch_mirtrace_species is emtpy, no need for conditional statement, TODO remove - MIRTOP_QUANT ( BOWTIE_MAP_SEQCLUSTER.out.bam.collect{it[1]}, FORMAT_HAIRPIN.out.formatted_fasta.collect{it[1]}, ch_mirna_gtf, ch_mirtrace_species ) - ch_mirtop_logs = MIRTOP_QUANT.out.logs - ch_versions = ch_versions.mix(MIRTOP_QUANT.out.versions) - TABLE_MERGE ( MIRTOP_QUANT.out.mirtop_table ) + + // nf-core/mirtop + + ch_bams = BOWTIE_MAP_SEQCLUSTER.out.bam + .collect{it[1]} + .map{it -> return [[id:"bams"], it]} + + ch_mirna_gtf_species = ch_mirna_gtf + .combine(ch_mirtrace_species) + .map{ gtf, species -> [ [id:species.toString()], gtf, species ] } + .collect() + + BAM_STATS_MIRNA_MIRTOP( + ch_bams, // TODO: Parallelize by running each BOWTIE_MAP_SEQCLUSTER.out.bam separately when mirtop solves this issue: https://github.com/miRTop/mirtop/issues/83 + FORMAT_HAIRPIN.out.formatted_fasta, + ch_mirna_gtf_species ) + + ch_mirtop_logs = BAM_STATS_MIRNA_MIRTOP.out.stats_log + ch_versions = ch_versions.mix(BAM_STATS_MIRNA_MIRTOP.out.versions) + + TABLE_MERGE ( BAM_STATS_MIRNA_MIRTOP.out.counts.map{ id, tsv -> [tsv] } ) ch_versions = ch_versions.mix(TABLE_MERGE.out.versions) ch_reads_genome = BOWTIE_MAP_HAIRPIN.out.unmapped @@ -108,7 +125,7 @@ workflow MIRNA_QUANT { unmapped = ch_reads_genome // channel: [ val(meta), path(bam) ] mature_stats = BAM_STATS_MATURE.out.stats //TODO not used for antything, should we remove them? hairpin_stats = BAM_STATS_HAIRPIN.out.stats //TODO not used for antything, should we remove them? - mirtop_logs = ch_mirtop_logs //TODO not used for antything, should we remove them? + mirtop_logs = ch_mirtop_logs // channel: [ val(meta), path(log) ] versions = ch_versions } diff --git a/subworkflows/local/prepare_genome/main.nf b/subworkflows/local/prepare_genome/main.nf index 086c860e..9c1906ea 100644 --- a/subworkflows/local/prepare_genome/main.nf +++ b/subworkflows/local/prepare_genome/main.nf @@ -33,7 +33,7 @@ workflow PREPARE_GENOME { bool_has_fasta = val_fasta ? true : false ch_mirtrace_species = val_mirtrace_species ? Channel.value(val_mirtrace_species) : Channel.empty() - mirna_gtf_from_species = val_mirtrace_species ? (val_mirtrace_species == 'hsa' ? "https://github.com/nf-core/test-datasets/raw/smrnaseq/miRBase/hsa.gff3" : "https://mirbase.org/download/CURRENT/genomes/${val_mirtrace_species}.gff3") : false + mirna_gtf_from_species = val_mirtrace_species ? (val_mirtrace_species == 'hsa' ? "https://raw.githubusercontent.com/nf-core/test-datasets/smrnaseq/reference/hsa.gff3" : "https://mirbase.org/download/CURRENT/genomes/${val_mirtrace_species}.gff3") : false ch_mirna_gtf = val_mirna_gtf ? Channel.fromPath(val_mirna_gtf, checkIfExists: true) : ( mirna_gtf_from_species ? Channel.fromPath(mirna_gtf_from_species, checkIfExists: true).collect() : Channel.empty() ) ch_mirna_adapters = params.with_umi ? [] : Channel.fromPath(val_fastp_known_mirna_adapters, checkIfExists: true).collect() diff --git a/subworkflows/nf-core/bam_stats_mirna_mirtop/main.nf b/subworkflows/nf-core/bam_stats_mirna_mirtop/main.nf new file mode 100644 index 00000000..ac9393f4 --- /dev/null +++ b/subworkflows/nf-core/bam_stats_mirna_mirtop/main.nf @@ -0,0 +1,37 @@ +include { MIRTOP_GFF } from '../../../modules/nf-core/mirtop/gff' +include { MIRTOP_COUNTS } from '../../../modules/nf-core/mirtop/counts' +include { MIRTOP_EXPORT } from '../../../modules/nf-core/mirtop/export' +include { MIRTOP_STATS } from '../../../modules/nf-core/mirtop/stats' + + +workflow BAM_STATS_MIRNA_MIRTOP { + + take: + ch_bam // channel: [ val(meta), [ bam ] ] + ch_hairpin // channel: [ val(meta), [ hairpin ] ] + ch_gtf_species // channel: [ val(meta), [ gtf ], val(species) ] + + main: + + ch_versions = Channel.empty() + + MIRTOP_GFF ( ch_bam, ch_hairpin, ch_gtf_species ) + ch_versions = ch_versions.mix(MIRTOP_GFF.out.versions) + + MIRTOP_COUNTS ( MIRTOP_GFF.out.gff, ch_hairpin, ch_gtf_species ) + ch_versions = ch_versions.mix(MIRTOP_COUNTS.out.versions) + + MIRTOP_EXPORT ( MIRTOP_GFF.out.gff, ch_hairpin, ch_gtf_species ) + ch_versions = ch_versions.mix(MIRTOP_EXPORT.out.versions) + + MIRTOP_STATS ( MIRTOP_GFF.out.gff ) + ch_versions = ch_versions.mix(MIRTOP_STATS.out.versions) + + emit: + isomirs = MIRTOP_EXPORT.out.tsv // channel: [ val(meta), [ tsv ] ] + counts = MIRTOP_COUNTS.out.tsv // channel: [ val(meta), [ tsv ] ] + stats_txt = MIRTOP_STATS.out.txt // channel: [ val(meta), [ txt ] ] + stats_log = MIRTOP_STATS.out.log // channel: [ val(meta), [ log ] ] + versions = ch_versions // channel: [ versions.yml ] +} + diff --git a/subworkflows/nf-core/bam_stats_mirna_mirtop/meta.yml b/subworkflows/nf-core/bam_stats_mirna_mirtop/meta.yml new file mode 100644 index 00000000..e7cf4e73 --- /dev/null +++ b/subworkflows/nf-core/bam_stats_mirna_mirtop/meta.yml @@ -0,0 +1,61 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "bam_stats_mirna_mirtop" +description: mirtop is a command line tool to annotate miRNAs and isomiRs and compute general statistics using the mirGFF3 format. +keywords: + - miRNA + - isomirs + - bam + - stats +components: + - mirtop/gff + - mirtop/counts + - mirtop/export + - mirtop/stats +input: + - ch_bam: + type: file + description: | + The input channel containing the BAM/CRAM/SAM files + Structure: [ val(meta), path(bam) ] + pattern: "*.{bam/cram/sam}" + - ch_hairpin: + type: file + description: | + Input channel containing the hairpin fasta file + Structure: [ val(meta), path(fasta) ] + pattern: "*.{fasta,fa}" + - ch_gtf_species: + type: file + description: | + Input channel containing the species gtf and the name of species in miRbase format + Structure: [ val(meta), path(gtf), val(species)] + pattern: "*.{gtf}" +output: + - rawdata_tsv: + type: file + description: | + Channel containing isomiRs compatible files + Structure: [ val(meta), path(tsv) ] + pattern: "*.tsv" + - stats_txt: + type: file + description: | + Channel containing TXT file with a table with different statistics for each type of isomiRs: total counts, average counts, total sequences. + Structure: [ val(meta), path(txt) ] + pattern: "*.txt" + - stats_log: + type: file + description: | + Channel containing log files in JSON format with the same information as stats_txt + Structure: [ val(meta), path(log) ] + pattern: "*.log" + - versions: + type: file + description: | + File containing software versions + Structure: [ path(versions.yml) ] + pattern: "versions.yml" +authors: + - "@atrigila" +maintainers: + - "@atrigila" diff --git a/subworkflows/nf-core/bam_stats_mirna_mirtop/tests/main.nf.test b/subworkflows/nf-core/bam_stats_mirna_mirtop/tests/main.nf.test new file mode 100644 index 00000000..604c747b --- /dev/null +++ b/subworkflows/nf-core/bam_stats_mirna_mirtop/tests/main.nf.test @@ -0,0 +1,50 @@ + +nextflow_workflow { + + name "Test Subworkflow BAM_STATS_MIRNA_MIRTOP" + script "../main.nf" + workflow "BAM_STATS_MIRNA_MIRTOP" + + tag "subworkflows" + tag "subworkflows_nfcore" + tag "subworkflows/bam_stats_mirna_mirtop" + tag "mirtop" + tag "mirtop/gff" + tag "mirtop/export" + tag "mirtop/stats" + tag "mirtop/counts" + + test("isomir - bam") { + + when { + workflow { + """ + input[0] = [ + [ id:'sample_sim_isomir_bam'], // meta map + file("https://github.com/nf-core/test-datasets/raw/smrnaseq/nf-test_data/mirtop/SRX8195117_SRR11631013_seqcluster.bam", checkIfExists: true), + ] + input[1] = [ + [ id:'hairpin'], // meta map + file("https://github.com/nf-core/test-datasets/raw/smrnaseq/reference/hairpin.fa", checkIfExists: true), + ] + input[2] = [ + [ id:'hsa' ], // meta map + file("https://github.com/nf-core/test-datasets/raw/smrnaseq/reference/hsa.gff3", checkIfExists: true), + "hsa"] + """ + } + } + + then { + assertAll( + { assert workflow.success}, + { assert snapshot( + workflow.out.isomirs, + workflow.out.stats_txt, + workflow.out.stats_log, + workflow.out.versions).match() }, + { assert path("${workflow.out.counts[0][1]}").exists() } + ) + } + } +} diff --git a/subworkflows/nf-core/bam_stats_mirna_mirtop/tests/main.nf.test.snap b/subworkflows/nf-core/bam_stats_mirna_mirtop/tests/main.nf.test.snap new file mode 100644 index 00000000..2a0e41a3 --- /dev/null +++ b/subworkflows/nf-core/bam_stats_mirna_mirtop/tests/main.nf.test.snap @@ -0,0 +1,41 @@ +{ + "isomir - bam": { + "content": [ + [ + [ + { + "id": "sample_sim_isomir_bam" + }, + "sample_sim_isomir_bam_mirtop_rawData.tsv:md5,4a065e444c54b0e816352bf1640594dd" + ] + ], + [ + [ + { + "id": "sample_sim_isomir_bam" + }, + "mirtop_stats.txt:md5,e89c014047ffffed65f1ec4fb328e3bc" + ] + ], + [ + [ + { + "id": "sample_sim_isomir_bam" + }, + "mirtop_stats.log:md5,49b85517828253858cc60a0390567585" + ] + ], + [ + "versions.yml:md5,04fed9539a0164a116d37bf090613d42", + "versions.yml:md5,13a50e3cef16f8bb981197bbc9a46d8e", + "versions.yml:md5,5f6bea8a46cdfec82b3d8f1b6c906ac7", + "versions.yml:md5,976382d50b05cded89483e2415fde415" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-12T23:13:48.308574263" + } +} \ No newline at end of file diff --git a/subworkflows/nf-core/bam_stats_mirna_mirtop/tests/nextflow.config b/subworkflows/nf-core/bam_stats_mirna_mirtop/tests/nextflow.config new file mode 100644 index 00000000..83d77e20 --- /dev/null +++ b/subworkflows/nf-core/bam_stats_mirna_mirtop/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: 'MIRTOP_COUNTS' { + ext.args = '--add-extra' + } +} diff --git a/tests/test_contamination_tech_reps.nf.test b/tests/test_contamination_tech_reps.nf.test index a580583e..f10bccef 100644 --- a/tests/test_contamination_tech_reps.nf.test +++ b/tests/test_contamination_tech_reps.nf.test @@ -19,7 +19,7 @@ nextflow_pipeline { assertAll( { assert workflow.success }, { assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("software_versions") }, - { assert workflow.trace.succeeded().size() == 79 }, + { assert workflow.trace.succeeded().size() == 82 }, { assert snapshot( path("$outputDir/contaminant_filter/filter/Clone1_N1_trimmed.contamination_mqc.yaml").exists(), //TODO see if we can make these deterministic or why they are non-deterministic @@ -68,9 +68,9 @@ nextflow_pipeline { ).match("mirna_quant_edger_qc") }, { assert snapshot( - path("$outputDir/mirna_quant/mirtop/mirtop.gff").exists(), - path("$outputDir/mirna_quant/mirtop/mirtop_rawData.tsv").exists(), - path("$outputDir/mirna_quant/mirtop/mirtop.tsv").exists(), + path("$outputDir/mirna_quant/mirtop/mirtop/bams_mirtop.gff").exists(), + path("$outputDir/mirna_quant/mirtop/counts/bams_mirtop.tsv").exists(), + path("$outputDir/mirna_quant/mirtop/export/bams_mirtop_rawData.tsv").exists(), path("$outputDir/mirna_quant/mirtop/mirna.tsv").exists(), path("$outputDir/mirna_quant/mirtop/stats/mirtop_stats.txt").exists() ).match("mirna_quant_mirtop") }, diff --git a/tests/test_contamination_tech_reps.nf.test.snap b/tests/test_contamination_tech_reps.nf.test.snap index 19b5ad3d..044b7928 100644 --- a/tests/test_contamination_tech_reps.nf.test.snap +++ b/tests/test_contamination_tech_reps.nf.test.snap @@ -34,13 +34,13 @@ }, "software_versions": { "content": [ - "{BLAT_CDNA={blat=36}, BLAT_NCRNA={blat=36}, BOWTIE_MAP_HAIRPIN={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_MATURE={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_SEQCLUSTER={bowtie=1.3.1, samtools=1.14}, CAT_FASTQ={cat=8.3}, FASTP={fastp=0.23.4}, FILTER_STATS={BusyBox=1.32.1}, FORMAT_HAIRPIN={fastx_toolkit=0.0.14}, FORMAT_MATURE={fastx_toolkit=0.0.14}, GAWK_CDNA={gawk=5.3.0}, GAWK_NCRNA={gawk=5.3.0}, INDEX_CDNA={bowtie2=2.4.5}, INDEX_HAIRPIN={bowtie=1.3.1}, INDEX_MATURE={bowtie=1.3.1}, INDEX_NCRNA={bowtie2=2.4.5}, INDEX_TRNA={bowtie2=2.4.5}, MAP_CDNA={bowtie2=2.4.5}, MAP_NCRNA={bowtie2=2.4.5}, MAP_TRNA={bowtie2=2.4.5}, MIRTOP_QUANT={mirtop=0.4.25}, MIRTRACE_QC={mirtrace=1.0.1}, PARSE_HAIRPIN={seqkit=2.6.1}, PARSE_MATURE={seqkit=2.6.1}, SAMTOOLS_FLAGSTAT={samtools=1.2}, SAMTOOLS_IDXSTATS={samtools=1.2}, SAMTOOLS_INDEX={samtools=1.2}, SAMTOOLS_SORT={samtools=1.2}, SAMTOOLS_STATS={samtools=1.2}, SEQCLUSTER_COLLAPSE={seqcluster=1.2.9}, SEQKIT_GREP_CDNA={seqkit=2.8.0}, SEQKIT_GREP_NCRNA={seqkit=2.8.0}, TABLE_MERGE={r-base=3.6.2}, Workflow={nf-core/smrnaseq=v2.3.2dev}}" + "{BLAT_CDNA={blat=36}, BLAT_NCRNA={blat=36}, BOWTIE_MAP_HAIRPIN={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_MATURE={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_SEQCLUSTER={bowtie=1.3.1, samtools=1.14}, CAT_FASTQ={cat=8.3}, FASTP={fastp=0.23.4}, FILTER_STATS={BusyBox=1.32.1}, FORMAT_HAIRPIN={fastx_toolkit=0.0.14}, FORMAT_MATURE={fastx_toolkit=0.0.14}, GAWK_CDNA={gawk=5.3.0}, GAWK_NCRNA={gawk=5.3.0}, INDEX_CDNA={bowtie2=2.4.5}, INDEX_HAIRPIN={bowtie=1.3.1}, INDEX_MATURE={bowtie=1.3.1}, INDEX_NCRNA={bowtie2=2.4.5}, INDEX_TRNA={bowtie2=2.4.5}, MAP_CDNA={bowtie2=2.4.5}, MAP_NCRNA={bowtie2=2.4.5}, MAP_TRNA={bowtie2=2.4.5}, MIRTOP_COUNTS={mirtop=0.4.25}, MIRTOP_EXPORT={mirtop=0.4.25}, MIRTOP_GFF={mirtop=0.4.25}, MIRTOP_STATS={mirtop=0.4.25}, MIRTRACE_QC={mirtrace=1.0.1}, PARSE_HAIRPIN={seqkit=2.6.1}, PARSE_MATURE={seqkit=2.6.1}, SAMTOOLS_FLAGSTAT={samtools=1.2}, SAMTOOLS_IDXSTATS={samtools=1.2}, SAMTOOLS_INDEX={samtools=1.2}, SAMTOOLS_SORT={samtools=1.2}, SAMTOOLS_STATS={samtools=1.2}, SEQCLUSTER_COLLAPSE={seqcluster=1.2.9}, SEQKIT_GREP_CDNA={seqkit=2.8.0}, SEQKIT_GREP_NCRNA={seqkit=2.8.0}, TABLE_MERGE={r-base=3.6.2}, Workflow={nf-core/smrnaseq=v2.3.2dev}}" ], "meta": { "nf-test": "0.8.4", "nextflow": "24.04.4" }, - "timestamp": "2024-09-10T14:18:29.433016549" + "timestamp": "2024-09-13T22:46:41.301985198" }, "mirna_quant_bam": { "content": [ diff --git a/tests/test_nextflex.nf.test b/tests/test_nextflex.nf.test index ddb1a9e3..55a5e6d5 100644 --- a/tests/test_nextflex.nf.test +++ b/tests/test_nextflex.nf.test @@ -19,7 +19,7 @@ nextflow_pipeline { assertAll( { assert workflow.success }, { assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("software_versions") }, - { assert workflow.trace.succeeded().size() == 67 }, + { assert workflow.trace.succeeded().size() == 70 }, { assert snapshot( path("$outputDir/mirna_quant/bam/mature/sample2_mature.sorted.idxstats"), diff --git a/tests/test_nextflex.nf.test.snap b/tests/test_nextflex.nf.test.snap index a9d40dee..52417e6b 100644 --- a/tests/test_nextflex.nf.test.snap +++ b/tests/test_nextflex.nf.test.snap @@ -34,13 +34,13 @@ }, "software_versions": { "content": [ - "{BOWTIE_MAP_HAIRPIN={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_MATURE={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_SEQCLUSTER={bowtie=1.3.1, samtools=1.14}, FASTP={fastp=0.23.4}, FASTQC_RAW={fastqc=0.12.1}, FASTQC_TRIM={fastqc=0.12.1}, FORMAT_HAIRPIN={fastx_toolkit=0.0.14}, FORMAT_MATURE={fastx_toolkit=0.0.14}, INDEX_HAIRPIN={bowtie=1.3.1}, INDEX_MATURE={bowtie=1.3.1}, MIRTOP_QUANT={mirtop=0.4.25}, MIRTRACE_QC={mirtrace=1.0.1}, PARSE_HAIRPIN={seqkit=2.6.1}, PARSE_MATURE={seqkit=2.6.1}, SAMTOOLS_FLAGSTAT={samtools=1.2}, SAMTOOLS_IDXSTATS={samtools=1.2}, SAMTOOLS_INDEX={samtools=1.2}, SAMTOOLS_SORT={samtools=1.2}, SAMTOOLS_STATS={samtools=1.2}, SEQCLUSTER_COLLAPSE={seqcluster=1.2.9}, TABLE_MERGE={r-base=3.6.2}, Workflow={nf-core/smrnaseq=v2.3.2dev}}" + "{BOWTIE_MAP_HAIRPIN={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_MATURE={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_SEQCLUSTER={bowtie=1.3.1, samtools=1.14}, FASTP={fastp=0.23.4}, FASTQC_RAW={fastqc=0.12.1}, FASTQC_TRIM={fastqc=0.12.1}, FORMAT_HAIRPIN={fastx_toolkit=0.0.14}, FORMAT_MATURE={fastx_toolkit=0.0.14}, INDEX_HAIRPIN={bowtie=1.3.1}, INDEX_MATURE={bowtie=1.3.1}, MIRTOP_COUNTS={mirtop=0.4.25}, MIRTOP_EXPORT={mirtop=0.4.25}, MIRTOP_GFF={mirtop=0.4.25}, MIRTOP_STATS={mirtop=0.4.25}, MIRTRACE_QC={mirtrace=1.0.1}, PARSE_HAIRPIN={seqkit=2.6.1}, PARSE_MATURE={seqkit=2.6.1}, SAMTOOLS_FLAGSTAT={samtools=1.2}, SAMTOOLS_IDXSTATS={samtools=1.2}, SAMTOOLS_INDEX={samtools=1.2}, SAMTOOLS_SORT={samtools=1.2}, SAMTOOLS_STATS={samtools=1.2}, SEQCLUSTER_COLLAPSE={seqcluster=1.2.9}, TABLE_MERGE={r-base=3.6.2}, Workflow={nf-core/smrnaseq=v2.3.2dev}}" ], "meta": { "nf-test": "0.8.4", "nextflow": "24.04.4" }, - "timestamp": "2024-09-11T19:57:12.807246956" + "timestamp": "2024-09-13T22:28:10.896353531" }, "mirna_quant_bam": { "content": [ @@ -109,7 +109,7 @@ "fastp-seq-content-n-plot_Read_1_Before_filtering.txt:md5,bd72bc8bfc907c6aab72f315917ab280", "fastqc_sequence_duplication_levels_plot-1.txt:md5,a53f959bf59ad69d3bcbc53e8fe609b3", "fastqc_per_base_sequence_quality_plot-1.txt:md5,2f85a658bcb8261328449f1642688086", - "multiqc_general_stats.txt:md5,463205a2b7c8e8f825a2105798ea1271", + "multiqc_general_stats.txt:md5,7157c8b8ac91021d1635e52d04bab58c", "fastqc_per_base_n_content_plot-1.txt:md5,e3b4bb3ed98e87f2d8acb0c009485ecd", "fastqc_per_base_n_content_plot.txt:md5,48710007bb055bae6f35f2fa8ea8f42b", "fastp-seq-quality-plot_Read_1_After_filtering.txt:md5,2956382a3f2e855a4dce8e8246a57add", @@ -140,6 +140,6 @@ "nf-test": "0.8.4", "nextflow": "24.04.4" }, - "timestamp": "2024-09-11T19:57:13.007264593" + "timestamp": "2024-09-13T22:28:11.011206343" } } \ No newline at end of file diff --git a/tests/test_skipfastp.nf.test b/tests/test_skipfastp.nf.test index 3eb81835..8c29a9bf 100644 --- a/tests/test_skipfastp.nf.test +++ b/tests/test_skipfastp.nf.test @@ -19,12 +19,12 @@ nextflow_pipeline { assertAll( { assert workflow.success }, { assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("software_versions") }, - { assert workflow.trace.succeeded().size() == 55 }, + { assert workflow.trace.succeeded().size() == 58 }, { assert snapshot( - path("$outputDir/mirna_quant/mirtop/mirtop.gff").exists(), - path("$outputDir/mirna_quant/mirtop/mirtop_rawData.tsv").exists(), - path("$outputDir/mirna_quant/mirtop/mirtop.tsv").exists(), + path("$outputDir/mirna_quant/mirtop/mirtop/bams_mirtop.gff").exists(), + path("$outputDir/mirna_quant/mirtop/counts/bams_mirtop.tsv").exists(), + path("$outputDir/mirna_quant/mirtop/export/bams_mirtop_rawData.tsv").exists(), path("$outputDir/mirna_quant/mirtop/mirna.tsv").exists(), path("$outputDir/mirna_quant/mirtop/stats/mirtop_stats.txt").exists() ).match("mirna_quant_mirtop") }, diff --git a/tests/test_skipfastp.nf.test.snap b/tests/test_skipfastp.nf.test.snap index 620f0390..23cee2db 100644 --- a/tests/test_skipfastp.nf.test.snap +++ b/tests/test_skipfastp.nf.test.snap @@ -41,13 +41,13 @@ }, "software_versions": { "content": [ - "{BOWTIE_MAP_GENOME={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_HAIRPIN={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_MATURE={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_SEQCLUSTER={bowtie=1.3.1, samtools=1.14}, FASTQC_RAW={fastqc=0.12.1}, FORMAT_HAIRPIN={fastx_toolkit=0.0.14}, FORMAT_MATURE={fastx_toolkit=0.0.14}, INDEX_HAIRPIN={bowtie=1.3.1}, INDEX_MATURE={bowtie=1.3.1}, MIRTOP_QUANT={mirtop=0.4.25}, MIRTRACE_QC={mirtrace=1.0.1}, PARSE_HAIRPIN={seqkit=2.6.1}, PARSE_MATURE={seqkit=2.6.1}, SAMTOOLS_FLAGSTAT={samtools=1.2}, SAMTOOLS_IDXSTATS={samtools=1.2}, SAMTOOLS_INDEX={samtools=1.2}, SAMTOOLS_SORT={samtools=1.2}, SAMTOOLS_STATS={samtools=1.2}, SEQCLUSTER_COLLAPSE={seqcluster=1.2.9}, TABLE_MERGE={r-base=3.6.2}, Workflow={nf-core/smrnaseq=v2.3.2dev}}" + "{BOWTIE_MAP_GENOME={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_HAIRPIN={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_MATURE={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_SEQCLUSTER={bowtie=1.3.1, samtools=1.14}, FASTQC_RAW={fastqc=0.12.1}, FORMAT_HAIRPIN={fastx_toolkit=0.0.14}, FORMAT_MATURE={fastx_toolkit=0.0.14}, INDEX_HAIRPIN={bowtie=1.3.1}, INDEX_MATURE={bowtie=1.3.1}, MIRTOP_COUNTS={mirtop=0.4.25}, MIRTOP_EXPORT={mirtop=0.4.25}, MIRTOP_GFF={mirtop=0.4.25}, MIRTOP_STATS={mirtop=0.4.25}, MIRTRACE_QC={mirtrace=1.0.1}, PARSE_HAIRPIN={seqkit=2.6.1}, PARSE_MATURE={seqkit=2.6.1}, SAMTOOLS_FLAGSTAT={samtools=1.2}, SAMTOOLS_IDXSTATS={samtools=1.2}, SAMTOOLS_INDEX={samtools=1.2}, SAMTOOLS_SORT={samtools=1.2}, SAMTOOLS_STATS={samtools=1.2}, SEQCLUSTER_COLLAPSE={seqcluster=1.2.9}, TABLE_MERGE={r-base=3.6.2}, Workflow={nf-core/smrnaseq=v2.3.2dev}}" ], "meta": { "nf-test": "0.8.4", "nextflow": "24.04.4" }, - "timestamp": "2024-09-10T13:31:01.195435949" + "timestamp": "2024-09-13T22:24:37.39903141" }, "mirna_quant_bam": { "content": [ diff --git a/tests/test_umi.nf.test b/tests/test_umi.nf.test index 72876890..18fdd089 100644 --- a/tests/test_umi.nf.test +++ b/tests/test_umi.nf.test @@ -19,7 +19,7 @@ nextflow_pipeline { assertAll( { assert workflow.success }, { assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("software_versions") }, - { assert workflow.trace.succeeded().size() == 65 }, + { assert workflow.trace.succeeded().size() == 68 }, { assert snapshot( path("$outputDir/mirna_quant/bam/mature/SRX8195118_SRR11631014_mature.sorted.stats"), @@ -50,9 +50,9 @@ nextflow_pipeline { ).match("mirna_quant_edger_qc") }, { assert snapshot( - path("$outputDir/mirna_quant/mirtop/mirtop.gff").exists(), - path("$outputDir/mirna_quant/mirtop/mirtop.tsv").exists(), - path("$outputDir/mirna_quant/mirtop/mirtop_rawData.tsv").exists(), + path("$outputDir/mirna_quant/mirtop/mirtop/bams_mirtop.gff").exists(), + path("$outputDir/mirna_quant/mirtop/counts/bams_mirtop.tsv").exists(), + path("$outputDir/mirna_quant/mirtop/export/bams_mirtop_rawData.tsv").exists(), path("$outputDir/mirna_quant/mirtop/mirna.tsv").exists(), path("$outputDir/mirna_quant/mirtop/stats/mirtop_stats.txt").exists() ).match("mirna_quant_mirtop") }, diff --git a/tests/test_umi.nf.test.snap b/tests/test_umi.nf.test.snap index b226ed5b..eba77428 100644 --- a/tests/test_umi.nf.test.snap +++ b/tests/test_umi.nf.test.snap @@ -41,13 +41,13 @@ }, "software_versions": { "content": [ - "{BOWTIE_MAP_GENOME={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_HAIRPIN={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_MATURE={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_SEQCLUSTER={bowtie=1.3.1, samtools=1.14}, FASTP={fastp=0.23.4}, FASTP_LENGTH_FILTER={fastp=0.23.4}, FASTQC_RAW={fastqc=0.12.1}, FASTQC_TRIM={fastqc=0.12.1}, FORMAT_HAIRPIN={fastx_toolkit=0.0.14}, FORMAT_MATURE={fastx_toolkit=0.0.14}, INDEX_HAIRPIN={bowtie=1.3.1}, INDEX_MATURE={bowtie=1.3.1}, MIRTOP_QUANT={mirtop=0.4.25}, MIRTRACE_QC={mirtrace=1.0.1}, PARSE_HAIRPIN={seqkit=2.6.1}, PARSE_MATURE={seqkit=2.6.1}, SAMTOOLS_FLAGSTAT={samtools=1.2}, SAMTOOLS_IDXSTATS={samtools=1.2}, SAMTOOLS_INDEX={samtools=1.2}, SAMTOOLS_SORT={samtools=1.2}, SAMTOOLS_STATS={samtools=1.2}, SEQCLUSTER_COLLAPSE={seqcluster=1.2.9}, TABLE_MERGE={r-base=3.6.2}, UMICOLLAPSE_FASTQ={umicollapse=1.0.0-1}, Workflow={nf-core/smrnaseq=v2.3.2dev}}" + "{BOWTIE_MAP_GENOME={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_HAIRPIN={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_MATURE={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_SEQCLUSTER={bowtie=1.3.1, samtools=1.14}, FASTP={fastp=0.23.4}, FASTP_LENGTH_FILTER={fastp=0.23.4}, FASTQC_RAW={fastqc=0.12.1}, FASTQC_TRIM={fastqc=0.12.1}, FORMAT_HAIRPIN={fastx_toolkit=0.0.14}, FORMAT_MATURE={fastx_toolkit=0.0.14}, INDEX_HAIRPIN={bowtie=1.3.1}, INDEX_MATURE={bowtie=1.3.1}, MIRTOP_COUNTS={mirtop=0.4.25}, MIRTOP_EXPORT={mirtop=0.4.25}, MIRTOP_GFF={mirtop=0.4.25}, MIRTOP_STATS={mirtop=0.4.25}, MIRTRACE_QC={mirtrace=1.0.1}, PARSE_HAIRPIN={seqkit=2.6.1}, PARSE_MATURE={seqkit=2.6.1}, SAMTOOLS_FLAGSTAT={samtools=1.2}, SAMTOOLS_IDXSTATS={samtools=1.2}, SAMTOOLS_INDEX={samtools=1.2}, SAMTOOLS_SORT={samtools=1.2}, SAMTOOLS_STATS={samtools=1.2}, SEQCLUSTER_COLLAPSE={seqcluster=1.2.9}, TABLE_MERGE={r-base=3.6.2}, UMICOLLAPSE_FASTQ={umicollapse=1.0.0-1}, Workflow={nf-core/smrnaseq=v2.3.2dev}}" ], "meta": { "nf-test": "0.8.4", "nextflow": "24.04.4" }, - "timestamp": "2024-09-10T13:26:12.664220062" + "timestamp": "2024-09-13T22:21:28.19095018" }, "mirna_quant_bam": { "content": [ @@ -103,7 +103,7 @@ "fastp-seq-content-n-plot_Read_1_Before_filtering.txt:md5,dfdb23f41359b8a6b84d6626a0474d02", "fastqc_sequence_duplication_levels_plot-1.txt:md5,b5ae95ecd73055798ed70947dda3747c", "fastqc_per_base_sequence_quality_plot-1.txt:md5,89adfa92b1cde0ad4e401b430bbc68ce", - "multiqc_general_stats.txt:md5,d71c6e8ae53b82fbd220c6a54cb24cb1", + "multiqc_general_stats.txt:md5,77248c05a5e2f0e16616603dd77dc73c", "fastqc_per_base_n_content_plot-1.txt:md5,db081d3aa63007e5a78113f0fc26f27d", "fastqc_per_base_n_content_plot.txt:md5,5b5b8cee3162d092c0bcddffbd000f34", "fastp-seq-quality-plot_Read_1_After_filtering.txt:md5,66a47c7ce00ede2053f8e6eb20ec3417", @@ -118,10 +118,10 @@ "fastp-seq-quality-plot_Read_1_Before_filtering.txt:md5,f36b7cfd3057b26281367397db45033a", "samtools_alignment_plot.txt:md5,5e828961dbd55a6d6872221c49dfdc59", "fastqc_per_base_sequence_quality_plot.txt:md5,e2e187bc0b0c1f0d1abb3b666945c7b3", - "mirtop_read_count_plot.txt:md5,5f2ef354f45930b2f82515a82dc40342", + "mirtop_read_count_plot.txt:md5,4c8069a2123e23ece79dcc93d97f5bc4", "fastp-seq-content-n-plot_Read_1_After_filtering.txt:md5,bbad2035ada86867c4ed579a93b78d64", - "mirtop_unique_read_count_plot.txt:md5,2915bda64fbf0017c0261fa98c0646d5", - "mirtop_mean_read_count_plot.txt:md5,d61d3cf683a251d83283443e478e4d71", + "mirtop_unique_read_count_plot.txt:md5,12ddd823066b8218e9bf9fbac471a0b1", + "mirtop_mean_read_count_plot.txt:md5,b2a73544ddafa79e0c39879b95b62736", "mirtrace_contamination_check_plot.txt:md5,7f12917ce506127a729edb733fdda511", "fastqc_adapter_content_plot.txt:md5,de1d7324ff5146b49fc9a2e6d4633962", "fastqc_sequence_duplication_levels_plot.txt:md5,fe7598e49f93bb980a7675a2bb4bd3b5", @@ -137,7 +137,7 @@ "nf-test": "0.8.4", "nextflow": "24.04.4" }, - "timestamp": "2024-09-11T20:03:41.24999389" + "timestamp": "2024-09-13T22:21:28.306265591" }, "multiqc": { "content": [ @@ -158,9 +158,9 @@ true ], "meta": { - "nf-test": "0.9.0", - "nextflow": "23.10.0" + "nf-test": "0.8.4", + "nextflow": "24.04.4" }, - "timestamp": "2024-08-30T20:47:03.92977678" + "timestamp": "2024-09-13T21:33:55.981422488" } } \ No newline at end of file diff --git a/workflows/smrnaseq.nf b/workflows/smrnaseq.nf index 3fce830c..8855c34c 100644 --- a/workflows/smrnaseq.nf +++ b/workflows/smrnaseq.nf @@ -297,7 +297,7 @@ workflow NFCORE_SMRNASEQ { ch_multiqc_files = ch_multiqc_files.mix(genome_stats.collect({it[1]}).ifEmpty([])) ch_multiqc_files = ch_multiqc_files.mix(MIRNA_QUANT.out.mature_stats.collect({it[1]}).ifEmpty([])) ch_multiqc_files = ch_multiqc_files.mix(MIRNA_QUANT.out.hairpin_stats.collect({it[1]}).ifEmpty([])) - ch_multiqc_files = ch_multiqc_files.mix(MIRNA_QUANT.out.mirtop_logs.collect().ifEmpty([])) + ch_multiqc_files = ch_multiqc_files.mix(MIRNA_QUANT.out.mirtop_logs.collect({it[1]}).ifEmpty([])) if (has_mirtrace_species){ ch_multiqc_files = ch_multiqc_files.mix(MIRTRACE_QC.out.html.collect({it[1]}).ifEmpty([])) ch_multiqc_files = ch_multiqc_files.mix(MIRTRACE_QC.out.json.collect({it[1]}).ifEmpty([]))