diff --git a/modules/nf-core/vcf2maf/main.nf b/modules/nf-core/vcf2maf/main.nf index 2bc4495d248d..8ff1d282fbff 100644 --- a/modules/nf-core/vcf2maf/main.nf +++ b/modules/nf-core/vcf2maf/main.nf @@ -16,7 +16,8 @@ process VCF2MAF { output: tuple val(meta), path("*.maf"), emit: maf - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('vcf2maf'), val("1.6.22"), emit: versions_vcf2maf, topic: versions + tuple val("${task.process}"), val('ensemblvep'), eval('vep --help 2>&1 | sed -n "s/^ ensembl-vep *: //p"'), emit: versions_ensemblvep, topic: versions when: task.ext.when == null || task.ext.when @@ -42,11 +43,6 @@ process VCF2MAF { --ref-fasta $fasta \\ --input-vcf $vcf \\ --output-maf ${prefix}.maf - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - vcf2maf: $VERSION\$VEP_VERSION - END_VERSIONS """ stub: @@ -60,10 +56,5 @@ process VCF2MAF { fi touch ${prefix}.maf - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - vcf2maf: $VERSION\$VEP_VERSION - END_VERSIONS """ } diff --git a/modules/nf-core/vcf2maf/meta.yml b/modules/nf-core/vcf2maf/meta.yml index a1a05128b854..02fc6b5fd268 100644 --- a/modules/nf-core/vcf2maf/meta.yml +++ b/modules/nf-core/vcf2maf/meta.yml @@ -47,13 +47,46 @@ output: description: MAF file produced from VCF pattern: "*.maf" ontologies: [] + versions_vcf2maf: + - - ${task.process}: + type: string + description: The name of the process + - vcf2maf: + type: string + description: The name of the tool + - "1.6.22": + type: string + description: The expression to obtain the version of the tool + versions_ensemblvep: + - - ${task.process}: + type: string + description: The name of the process + - ensemblvep: + type: string + description: The name of the tool + - 'vep --help 2>&1 | sed -n "s/^ ensembl-vep *: //p"': + 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 + - vcf2maf: + type: string + description: The name of the tool + - "1.6.22": + type: string + description: The expression to obtain the version of the tool + - - ${task.process}: + type: string + description: The name of the process + - ensemblvep: + type: string + description: The name of the tool + - 'vep --help 2>&1 | sed -n "s/^ ensembl-vep *: //p"': + type: eval + description: The expression to obtain the version of the tool authors: - "@adamrtalbot" maintainers: diff --git a/modules/nf-core/vcf2maf/tests/main.nf.test b/modules/nf-core/vcf2maf/tests/main.nf.test index 472e235e484e..3bbca1566e95 100644 --- a/modules/nf-core/vcf2maf/tests/main.nf.test +++ b/modules/nf-core/vcf2maf/tests/main.nf.test @@ -47,8 +47,7 @@ nextflow_process { { assert process.success }, { assert snapshot( path(process.out.maf[0][1]).readLines()[5..131], - process.out.versions, - path(process.out.versions[0]).readLines() + process.out.findAll { key, val -> key.startsWith('versions') } ).match() }, ) } @@ -78,7 +77,7 @@ nextflow_process { assertAll( { assert process.success }, { assert path(process.out.maf[0][1]).readLines().size() == 2 }, // no variants, only header lines - { assert snapshot(process.out.versions, path(process.out.versions[0]).readLines()).match() } + { assert snapshot(process.out.findAll { key, val -> key.startsWith('versions') }).match() } ) } } @@ -103,8 +102,7 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - process.out, - path(process.out.versions[0]).readLines() + sanitizeOutput(process.out) ).match() }, ) @@ -132,8 +130,7 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - process.out, - path(process.out.versions[0]).readLines() + sanitizeOutput(process.out) ).match() }, ) diff --git a/modules/nf-core/vcf2maf/tests/main.nf.test.snap b/modules/nf-core/vcf2maf/tests/main.nf.test.snap index f0062a0e2a2c..427978880fea 100644 --- a/modules/nf-core/vcf2maf/tests/main.nf.test.snap +++ b/modules/nf-core/vcf2maf/tests/main.nf.test.snap @@ -2,7 +2,7 @@ "Run with VEP - stub": { "content": [ { - "0": [ + "maf": [ [ { "id": "test" @@ -10,54 +10,57 @@ "test.maf:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "1": [ - "versions.yml:md5,999ed581957e1a97cf9a483e5cc65d05" - ], - "maf": [ + "versions_ensemblvep": [ [ - { - "id": "test" - }, - "test.maf:md5,d41d8cd98f00b204e9800998ecf8427e" + "VCF2MAF", + "ensemblvep", + "113.0" ] ], - "versions": [ - "versions.yml:md5,999ed581957e1a97cf9a483e5cc65d05" + "versions_vcf2maf": [ + [ + "VCF2MAF", + "vcf2maf", + "1.6.22" + ] ] - }, - [ - "\"VCF2MAF\":", - " vcf2maf: 1.6.22", - " ensemblvep: 113.0" - ] + } ], + "timestamp": "2026-07-31T16:35:17.149691833", "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" - }, - "timestamp": "2024-12-11T16:01:35.707312" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } }, "Run with VEP": { "content": [ - [ - "versions.yml:md5,999ed581957e1a97cf9a483e5cc65d05" - ], - [ - "\"VCF2MAF\":", - " vcf2maf: 1.6.22", - " ensemblvep: 113.0" - ] + { + "versions_ensemblvep": [ + [ + "VCF2MAF", + "ensemblvep", + "113.0" + ] + ], + "versions_vcf2maf": [ + [ + "VCF2MAF", + "vcf2maf", + "1.6.22" + ] + ] + } ], + "timestamp": "2026-07-31T15:38:16.241168051", "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.1" - }, - "timestamp": "2024-12-11T15:50:59.184221" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } }, "Run without VEP - stub": { "content": [ { - "0": [ + "maf": [ [ { "id": "test" @@ -65,31 +68,27 @@ "test.maf:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "1": [ - "versions.yml:md5,f3398fb1c4621649331dca91212dac23" - ], - "maf": [ + "versions_ensemblvep": [ [ - { - "id": "test" - }, - "test.maf:md5,d41d8cd98f00b204e9800998ecf8427e" + "VCF2MAF", + "ensemblvep", + "113.0" ] ], - "versions": [ - "versions.yml:md5,f3398fb1c4621649331dca91212dac23" + "versions_vcf2maf": [ + [ + "VCF2MAF", + "vcf2maf", + "1.6.22" + ] ] - }, - [ - "\"VCF2MAF\":", - " vcf2maf: 1.6.22" - ] + } ], + "timestamp": "2026-07-31T16:35:08.154659422", "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" - }, - "timestamp": "2024-12-11T15:49:39.498519" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } }, "Run without VEP": { "content": [ @@ -222,18 +221,27 @@ "Unknown\t0\t.\tGRCh38\tchr22\t4606\t4606\t+\tTargeted_Region\tINS\tT\tT\t\t\t\tTUMOR\tNORMAL\tT\tT\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\tGTC\t.\t.\t\t\t\t\t\t\t\t\t\t4606", "Unknown\t0\t.\tGRCh38\tchr22\t4608\t4608\t+\tTargeted_Region\tINS\tA\tA\t\t\t\tTUMOR\tNORMAL\tA\tA\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\tCAA\t.\t.\t\t\t\t\t\t\t\t\t\t4608" ], - [ - "versions.yml:md5,f3398fb1c4621649331dca91212dac23" - ], - [ - "\"VCF2MAF\":", - " vcf2maf: 1.6.22" - ] + { + "versions_ensemblvep": [ + [ + "VCF2MAF", + "ensemblvep", + "113.0" + ] + ], + "versions_vcf2maf": [ + [ + "VCF2MAF", + "vcf2maf", + "1.6.22" + ] + ] + } ], + "timestamp": "2026-07-31T15:38:06.822105654", "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" - }, - "timestamp": "2024-12-11T15:52:16.957598" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } } -} +} \ No newline at end of file