diff --git a/modules/nf-core/chromap/chromap/main.nf b/modules/nf-core/chromap/chromap/main.nf index 1a00acbb6167..7d7484ba1839 100644 --- a/modules/nf-core/chromap/chromap/main.nf +++ b/modules/nf-core/chromap/chromap/main.nf @@ -9,7 +9,7 @@ process CHROMAP_CHROMAP { input: tuple val(meta), path(reads) - tuple val(meta2), path(fasta) + tuple val(meta2), path(fasta), path(fai) tuple val(meta3), path(index) path barcodes path whitelist @@ -21,7 +21,7 @@ process CHROMAP_CHROMAP { tuple val(meta), path("*.bam") , optional:true, emit: bam tuple val(meta), path("*.tagAlign.gz"), optional:true, emit: tagAlign tuple val(meta), path("*.pairs.gz") , optional:true, emit: pairs - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('chromap'), eval("chromap --version 2>&1"), topic: versions, emit: versions_chromap when: task.ext.when == null || task.ext.when @@ -65,12 +65,6 @@ process CHROMAP_CHROMAP { -o ${prefix}.${file_extension} $compression_cmds - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - chromap: \$(echo \$(chromap --version 2>&1)) - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ } else { """ @@ -84,12 +78,6 @@ process CHROMAP_CHROMAP { -o ${prefix}.${file_extension} $compression_cmds - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - chromap: \$(echo \$(chromap --version 2>&1)) - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ } @@ -100,11 +88,5 @@ process CHROMAP_CHROMAP { touch ${prefix}.bam echo "" | gzip > ${prefix}.tagAlign.gz echo "" | gzip > ${prefix}.pairs.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - chromap: \$(echo \$(chromap --version 2>&1)) - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/chromap/chromap/meta.yml b/modules/nf-core/chromap/chromap/meta.yml index f9ec083e4ac0..d950af2f0c59 100644 --- a/modules/nf-core/chromap/chromap/meta.yml +++ b/modules/nf-core/chromap/chromap/meta.yml @@ -20,7 +20,8 @@ tools: homepage: https://github.com/haowenz/chromap documentation: https://github.com/haowenz/chromap tool_dev_url: https://github.com/haowenz/chromap - licence: ["GPL v3"] + licence: + - "GPL v3" identifier: "" input: - - meta: @@ -44,6 +45,11 @@ input: description: | The fasta reference file. ontologies: [] + - fai: + type: file + description: | + The fasta reference file index. + ontologies: [] - - meta3: type: map description: | @@ -122,13 +128,27 @@ output: pattern: "*.pairs.gz" ontologies: - edam: http://edamontology.org/format_3989 # GZIP format + versions_chromap: + - - ${task.process}: + type: string + description: The name of the process + - chromap: + type: string + description: The name of the tool + - chromap --version 2>&1: + type: eval + description: The expression to obtain the version of the tool +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The name of the process + - chromap: + type: string + description: The name of the tool + - chromap --version 2>&1: + type: eval + description: The expression to obtain the version of the tool authors: - "@mahesh-panchal" - "@joseespinosa" diff --git a/modules/nf-core/chromap/chromap/tests/main.nf.test b/modules/nf-core/chromap/chromap/tests/main.nf.test index 1b0dcdcb863d..9c4d5e6ae9b9 100644 --- a/modules/nf-core/chromap/chromap/tests/main.nf.test +++ b/modules/nf-core/chromap/chromap/tests/main.nf.test @@ -38,7 +38,8 @@ nextflow_process { ] input[1] = [ [:], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ] input[2] = CHROMAP_INDEX.out.index input[3] = [] @@ -52,7 +53,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } @@ -71,7 +72,8 @@ nextflow_process { ] input[1] = [ [:], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ] input[2] = CHROMAP_INDEX.out.index input[3] = [] @@ -85,7 +87,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } @@ -108,7 +110,8 @@ nextflow_process { ] input[1] = [ [:], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ] input[2] = CHROMAP_INDEX.out.index input[3] = [] @@ -126,7 +129,7 @@ nextflow_process { assert snapshot( bam(process.out.bam[0][1]).getHeaderMD5(), bam(process.out.bam[0][1]).getReadsMD5(), - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ) } ) @@ -147,7 +150,8 @@ nextflow_process { ] input[1] = [ [:], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + [] ] input[2] = CHROMAP_INDEX.out.index input[3] = [] @@ -161,7 +165,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } diff --git a/modules/nf-core/chromap/chromap/tests/main.nf.test.snap b/modules/nf-core/chromap/chromap/tests/main.nf.test.snap index 1f06dc9e8371..26f341771fd8 100644 --- a/modules/nf-core/chromap/chromap/tests/main.nf.test.snap +++ b/modules/nf-core/chromap/chromap/tests/main.nf.test.snap @@ -2,27 +2,6 @@ "sarscov2 - single_end": { "content": [ { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.bed.gz:md5,b23aa9dae812fe84c308df6e18d850be" - ] - ], - "1": [ - - ], - "2": [ - - ], - "3": [ - - ], - "4": [ - "versions.yml:md5,e3ece11a3651bd28b0ea714f94f09da7" - ], "bam": [ ], @@ -41,41 +20,24 @@ "tagAlign": [ ], - "versions": [ - "versions.yml:md5,e3ece11a3651bd28b0ea714f94f09da7" + "versions_chromap": [ + [ + "CHROMAP_CHROMAP", + "chromap", + "0.2.6-r490" + ] ] } ], + "timestamp": "2026-03-23T20:43:54.016775225", "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-08-05T17:49:22.798324749" + "nf-test": "0.9.4", + "nextflow": "26.02.0" + } }, "sarscov2 - paired_end ": { "content": [ { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.bed.gz:md5,f658c1e94adef751ad08e132aac92712" - ] - ], - "1": [ - - ], - "2": [ - - ], - "3": [ - - ], - "4": [ - "versions.yml:md5,e3ece11a3651bd28b0ea714f94f09da7" - ], "bam": [ ], @@ -94,59 +56,24 @@ "tagAlign": [ ], - "versions": [ - "versions.yml:md5,e3ece11a3651bd28b0ea714f94f09da7" + "versions_chromap": [ + [ + "CHROMAP_CHROMAP", + "chromap", + "0.2.6-r490" + ] ] } ], + "timestamp": "2026-03-23T20:44:03.474089743", "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-08-05T17:49:29.530097947" + "nf-test": "0.9.4", + "nextflow": "26.02.0" + } }, "sarscov2 - single_end - stub": { "content": [ { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.bed.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": true - }, - "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": true - }, - "test.tagAlign.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": true - }, - "test.pairs.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "4": [ - "versions.yml:md5,e3ece11a3651bd28b0ea714f94f09da7" - ], "bam": [ [ { @@ -183,15 +110,19 @@ "test.tagAlign.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], - "versions": [ - "versions.yml:md5,e3ece11a3651bd28b0ea714f94f09da7" + "versions_chromap": [ + [ + "CHROMAP_CHROMAP", + "chromap", + "0.2.6-r490" + ] ] } ], + "timestamp": "2026-03-23T20:44:20.71658166", "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-08-05T17:49:42.086410229" + "nf-test": "0.9.4", + "nextflow": "26.02.0" + } } } \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_align_chromap/main.nf b/subworkflows/nf-core/fastq_align_chromap/main.nf index 488fc27fcbcc..f9d520eac0fd 100644 --- a/subworkflows/nf-core/fastq_align_chromap/main.nf +++ b/subworkflows/nf-core/fastq_align_chromap/main.nf @@ -16,13 +16,11 @@ workflow FASTQ_ALIGN_CHROMAP { ch_pairs_chr_order // channel (optional): [ pairs_chr_order ] main: - ch_versions = channel.empty() // // Map reads with CHROMAP // CHROMAP_CHROMAP(ch_reads, ch_fasta_fai, ch_index, ch_barcodes, ch_whitelist, ch_chr_order, ch_pairs_chr_order) - ch_versions = ch_versions.mix(CHROMAP_CHROMAP.out.versions) // // Sort, index BAM file and run samtools stats, flagstat and idxstats @@ -35,5 +33,4 @@ workflow FASTQ_ALIGN_CHROMAP { stats = BAM_SORT_STATS_SAMTOOLS.out.stats // channel: [ val(meta), [ stats ] ] flagstat = BAM_SORT_STATS_SAMTOOLS.out.flagstat // channel: [ val(meta), [ flagstat ] ] idxstats = BAM_SORT_STATS_SAMTOOLS.out.idxstats // channel: [ val(meta), [ idxstats ] ] - versions = ch_versions // path: versions.yml } diff --git a/subworkflows/nf-core/fastq_align_chromap/meta.yml b/subworkflows/nf-core/fastq_align_chromap/meta.yml index f0a9921faa7a..d2f3fac6d5d0 100644 --- a/subworkflows/nf-core/fastq_align_chromap/meta.yml +++ b/subworkflows/nf-core/fastq_align_chromap/meta.yml @@ -93,10 +93,6 @@ output: type: file description: File containing samtools idxstats output pattern: "*.{idxstats}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" authors: - "@JoseEspinosa" maintainers: diff --git a/subworkflows/nf-core/fastq_align_chromap/tests/main.nf.test b/subworkflows/nf-core/fastq_align_chromap/tests/main.nf.test index e63eeac30fb9..6ed6d04c1826 100644 --- a/subworkflows/nf-core/fastq_align_chromap/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_chromap/tests/main.nf.test @@ -11,6 +11,7 @@ nextflow_workflow { tag "chromap/chromap" tag "chromap/index" tag "fastq_align_chromap" + tag "bam_sort_stats_samtools" tag "subworkflows/fastq_align_chromap" tag "subworkflows/bam_sort_stats_samtools" @@ -19,7 +20,7 @@ nextflow_workflow { script "../../../../modules/nf-core/chromap/index/main.nf" process { """ - input[0] = Channel.of([ + input[0] = channel.of([ [id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists:true) ]) @@ -37,7 +38,7 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists:true) ] input[1] = CHROMAP_INDEX.out.index - input[2] = Channel.of([ + input[2] = channel.of([ [id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists:true), file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists:true) @@ -68,7 +69,7 @@ nextflow_workflow { ] ] input[1] = CHROMAP_INDEX.out.index - input[2] = Channel.of([ + input[2] = channel.of([ [id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists:true), file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists:true) @@ -101,7 +102,7 @@ nextflow_workflow { ] ] input[1] = CHROMAP_INDEX.out.index - input[2] = Channel.of([ + input[2] = channel.of([ [id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists:true), file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists:true) @@ -116,10 +117,7 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot( - workflow.out, - workflow.out.versions.collect{ path(it).yaml } - ).match() } + { assert snapshot(workflow.out).match() } ) } } diff --git a/subworkflows/nf-core/fastq_align_chromap/tests/main.nf.test.snap b/subworkflows/nf-core/fastq_align_chromap/tests/main.nf.test.snap index b045dc43df19..9a7aefb1cb52 100644 --- a/subworkflows/nf-core/fastq_align_chromap/tests/main.nf.test.snap +++ b/subworkflows/nf-core/fastq_align_chromap/tests/main.nf.test.snap @@ -8,7 +8,7 @@ "id": "test", "single_end": true }, - "test.sorted.bam:md5,d0621ccf4868d8db4975b3b565583ae7" + "test.sorted.bam:md5,9f9ace8d38ff8bb146f999b2cafc067c" ] ], "1": [ @@ -17,7 +17,7 @@ "id": "test", "single_end": true }, - "test.sorted.bam.bai:md5,9fcb4c0bf711694916e282e163fba868" + "test.sorted.bam.bai:md5,410ff7d49a4547efbc4d7d96a25485fb" ] ], "2": [ @@ -26,7 +26,7 @@ "id": "test", "single_end": true }, - "test.sorted.bam.stats:md5,a104f32983f5d8dae10290445898aeb8" + "test.sorted.bam.stats:md5,746dde58f858b3a504886f3c294f201a" ] ], "3": [ @@ -47,16 +47,13 @@ "test.sorted.bam.idxstats:md5,0ca8c5edb633a2f4c72fb3160cc25abf" ] ], - "5": [ - "versions.yml:md5,510f8807b7572d3ba4db55439fc53106" - ], "bam": [ [ { "id": "test", "single_end": true }, - "test.sorted.bam:md5,d0621ccf4868d8db4975b3b565583ae7" + "test.sorted.bam:md5,9f9ace8d38ff8bb146f999b2cafc067c" ] ], "flagstat": [ @@ -83,7 +80,7 @@ "id": "test", "single_end": true }, - "test.sorted.bam.bai:md5,9fcb4c0bf711694916e282e163fba868" + "test.sorted.bam.bai:md5,410ff7d49a4547efbc4d7d96a25485fb" ] ], "stats": [ @@ -92,19 +89,16 @@ "id": "test", "single_end": true }, - "test.sorted.bam.stats:md5,a104f32983f5d8dae10290445898aeb8" + "test.sorted.bam.stats:md5,746dde58f858b3a504886f3c294f201a" ] - ], - "versions": [ - "versions.yml:md5,510f8807b7572d3ba4db55439fc53106" ] } ], + "timestamp": "2026-03-23T20:57:30.746651374", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.4" - }, - "timestamp": "2026-03-13T11:24:01.018378" + "nf-test": "0.9.4", + "nextflow": "26.02.0" + } }, "test_fastq_align_chromap_paired_end": { "content": [ @@ -115,7 +109,7 @@ "id": "test", "single_end": false }, - "test.sorted.bam:md5,ea67924019a7749abeba05d4eac96462" + "test.sorted.bam:md5,220d3ea95b4303731e537debb02d395d" ] ], "1": [ @@ -124,7 +118,7 @@ "id": "test", "single_end": false }, - "test.sorted.bam.bai:md5,8084ffd06103a6d2cd66c4749d301b5c" + "test.sorted.bam.bai:md5,4d96c1aa2c545d09c914c37612a91905" ] ], "2": [ @@ -133,7 +127,7 @@ "id": "test", "single_end": false }, - "test.sorted.bam.stats:md5,25ff7668b67281c4bf2cd381bab99b76" + "test.sorted.bam.stats:md5,e7187e959c98eca8018ccef10b1d08ad" ] ], "3": [ @@ -154,16 +148,13 @@ "test.sorted.bam.idxstats:md5,1adb27b52d4d64b826f48b59d61dcd4d" ] ], - "5": [ - "versions.yml:md5,510f8807b7572d3ba4db55439fc53106" - ], "bam": [ [ { "id": "test", "single_end": false }, - "test.sorted.bam:md5,ea67924019a7749abeba05d4eac96462" + "test.sorted.bam:md5,220d3ea95b4303731e537debb02d395d" ] ], "flagstat": [ @@ -190,7 +181,7 @@ "id": "test", "single_end": false }, - "test.sorted.bam.bai:md5,8084ffd06103a6d2cd66c4749d301b5c" + "test.sorted.bam.bai:md5,4d96c1aa2c545d09c914c37612a91905" ] ], "stats": [ @@ -199,19 +190,16 @@ "id": "test", "single_end": false }, - "test.sorted.bam.stats:md5,25ff7668b67281c4bf2cd381bab99b76" + "test.sorted.bam.stats:md5,e7187e959c98eca8018ccef10b1d08ad" ] - ], - "versions": [ - "versions.yml:md5,510f8807b7572d3ba4db55439fc53106" ] } ], + "timestamp": "2026-03-23T20:57:43.195390996", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.4" - }, - "timestamp": "2026-03-13T14:25:28.998027" + "nf-test": "0.9.4", + "nextflow": "26.02.0" + } }, "test_fastq_align_chromap_paired_end -- stub": { "content": [ @@ -261,9 +249,6 @@ "test.sorted.bam.idxstats:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "5": [ - "versions.yml:md5,510f8807b7572d3ba4db55439fc53106" - ], "bam": [ [ { @@ -308,24 +293,13 @@ }, "test.sorted.bam.stats:md5,d41d8cd98f00b204e9800998ecf8427e" ] - ], - "versions": [ - "versions.yml:md5,510f8807b7572d3ba4db55439fc53106" ] - }, - [ - { - "FASTQ_ALIGN_CHROMAP:CHROMAP_CHROMAP": { - "chromap": "0.2.6-r490", - "samtools": 1.2 - } - } - ] + } ], + "timestamp": "2026-03-23T20:57:54.929874589", "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.4" - }, - "timestamp": "2026-03-13T11:26:10.754577" + "nf-test": "0.9.4", + "nextflow": "26.02.0" + } } } \ No newline at end of file