diff --git a/modules/nf-core/samtools/mpileup/main.nf b/modules/nf-core/samtools/mpileup/main.nf index 59bf8d12771a..c33eacec9c19 100644 --- a/modules/nf-core/samtools/mpileup/main.nf +++ b/modules/nf-core/samtools/mpileup/main.nf @@ -13,7 +13,7 @@ process SAMTOOLS_MPILEUP { output: tuple val(meta), path("*.mpileup.gz"), emit: mpileup - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('samtools'), eval('samtools --version | head -1 | sed -e "s/samtools //"'), emit: versions_samtools, topic: versions when: task.ext.when == null || task.ext.when @@ -31,21 +31,11 @@ process SAMTOOLS_MPILEUP { $intervals_cmd \\ $input bgzip ${prefix}.mpileup - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ stub: def prefix = task.ext.prefix ?: "${meta.id}" """ echo | gzip > ${prefix}.mpileup.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/samtools/mpileup/meta.yml b/modules/nf-core/samtools/mpileup/meta.yml index e809fec40eb0..4203f2313999 100644 --- a/modules/nf-core/samtools/mpileup/meta.yml +++ b/modules/nf-core/samtools/mpileup/meta.yml @@ -54,16 +54,31 @@ output: description: mpileup file pattern: "*.{mpileup}" ontologies: [] + versions_samtools: + - - ${task.process}: + type: string + description: Name of the process + - samtools: + type: string + description: Name of the tool + - samtools --version | head -1 | sed -e "s/samtools //": + 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: Name of the process + - samtools: + type: string + description: Name of the tool + - samtools --version | head -1 | sed -e "s/samtools //": + type: eval + description: The expression to obtain the version of the tool + authors: - "@drpatelh" - "@joseespinosa" maintainers: - - "@drpatelh" - "@joseespinosa" diff --git a/modules/nf-core/samtools/mpileup/tests/main.nf.test b/modules/nf-core/samtools/mpileup/tests/main.nf.test index c4b9f6dfe7f8..1650df7a2d93 100644 --- a/modules/nf-core/samtools/mpileup/tests/main.nf.test +++ b/modules/nf-core/samtools/mpileup/tests/main.nf.test @@ -27,10 +27,7 @@ nextflow_process { then { assert process.success assertAll( - { assert snapshot( - process.out, - path(process.out.versions[0]).yaml - ).match() } + { assert snapshot(process.out).match()} ) } } @@ -56,10 +53,7 @@ nextflow_process { then { assert process.success assertAll( - { assert snapshot( - process.out, - path(process.out.versions[0]).yaml - ).match() } + { assert snapshot(process.out).match()} ) } } @@ -82,10 +76,7 @@ nextflow_process { then { assert process.success assertAll( - { assert snapshot( - process.out, - path(process.out.versions[0]).yaml - ).match() } + { assert snapshot(process.out).match()} ) } } diff --git a/modules/nf-core/samtools/mpileup/tests/main.nf.test.snap b/modules/nf-core/samtools/mpileup/tests/main.nf.test.snap index 4d08c2f9cc47..0d44126e4d86 100644 --- a/modules/nf-core/samtools/mpileup/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/mpileup/tests/main.nf.test.snap @@ -11,7 +11,11 @@ ] ], "1": [ - "versions.yml:md5,e5a70b6d7e2c2ff0c2c63b66b7adb281" + [ + "SAMTOOLS_MPILEUP", + "samtools", + "1.22.1" + ] ], "mpileup": [ [ @@ -21,21 +25,20 @@ "test.mpileup.gz:md5,72340047c1feda82fa632d1762080bd8" ] ], - "versions": [ - "versions.yml:md5,e5a70b6d7e2c2ff0c2c63b66b7adb281" + "versions_samtools": [ + [ + "SAMTOOLS_MPILEUP", + "samtools", + "1.22.1" + ] ] - }, - { - "SAMTOOLS_MPILEUP": { - "samtools": "1.22.1" - } } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-10T14:39:24.687853" + "timestamp": "2025-12-22T08:56:18.583305677" }, "bam_bed --stub": { "content": [ @@ -49,7 +52,11 @@ ] ], "1": [ - "versions.yml:md5,e5a70b6d7e2c2ff0c2c63b66b7adb281" + [ + "SAMTOOLS_MPILEUP", + "samtools", + "1.22.1" + ] ], "mpileup": [ [ @@ -59,21 +66,20 @@ "test.mpileup.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], - "versions": [ - "versions.yml:md5,e5a70b6d7e2c2ff0c2c63b66b7adb281" + "versions_samtools": [ + [ + "SAMTOOLS_MPILEUP", + "samtools", + "1.22.1" + ] ] - }, - { - "SAMTOOLS_MPILEUP": { - "samtools": "1.22.1" - } } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-10T14:39:35.387828" + "timestamp": "2025-12-22T08:54:55.388446375" }, "bam_bed_fasta": { "content": [ @@ -87,7 +93,11 @@ ] ], "1": [ - "versions.yml:md5,e5a70b6d7e2c2ff0c2c63b66b7adb281" + [ + "SAMTOOLS_MPILEUP", + "samtools", + "1.22.1" + ] ], "mpileup": [ [ @@ -97,20 +107,19 @@ "test.mpileup.gz:md5,958e6bead4103d72026f80153b6b5150" ] ], - "versions": [ - "versions.yml:md5,e5a70b6d7e2c2ff0c2c63b66b7adb281" + "versions_samtools": [ + [ + "SAMTOOLS_MPILEUP", + "samtools", + "1.22.1" + ] ] - }, - { - "SAMTOOLS_MPILEUP": { - "samtools": "1.22.1" - } } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-10T14:39:29.744452" + "timestamp": "2025-12-22T08:56:25.883836102" } } \ No newline at end of file