diff --git a/modules/nf-core/ectyper/tests/main.nf.test.snap b/modules/nf-core/ectyper/tests/main.nf.test.snap index a56521e58f9f..1b946fe3e2b6 100644 --- a/modules/nf-core/ectyper/tests/main.nf.test.snap +++ b/modules/nf-core/ectyper/tests/main.nf.test.snap @@ -21,5 +21,21 @@ "nextflow": "24.04.4" }, "timestamp": "2024-08-28T12:49:29.892782" + }, + "versions": { + "content": [ + [ + [ + "ECTYPER", + "ectyper", + "1.0.0" + ] + ] + ], + "timestamp": "2024-08-28T12:49:29.892782", + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + } } -} \ No newline at end of file +} diff --git a/modules/nf-core/maltextract/main.nf b/modules/nf-core/maltextract/main.nf index 386d64ffdfd0..2b27c62722c8 100644 --- a/modules/nf-core/maltextract/main.nf +++ b/modules/nf-core/maltextract/main.nf @@ -14,7 +14,7 @@ process MALTEXTRACT { output: tuple val(meta), path("results") , emit: results - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('maltextract'), eval('MaltExtract --help | head -n 2 | tail -n 1 | sed \'s/MaltExtract version//\''), emit: versions_maltextract, topic: versions when: task.ext.when == null || task.ext.when @@ -30,10 +30,10 @@ process MALTEXTRACT { -r $ncbi_dir \\ -o results/ \\ $args + """ - cat <<-END_VERSIONS > versions.yml - "${task.process}": - maltextract: \$(MaltExtract --help | head -n 2 | tail -n 1 | sed 's/MaltExtract version//') - END_VERSIONS + stub: + """ + mkdir -p results """ } diff --git a/modules/nf-core/maltextract/meta.yml b/modules/nf-core/maltextract/meta.yml index d19900c5c066..247dda223b57 100644 --- a/modules/nf-core/maltextract/meta.yml +++ b/modules/nf-core/maltextract/meta.yml @@ -1,6 +1,6 @@ name: maltextract -description: Tool for evaluation of MALT results for true positives of ancient metagenomic - taxonomic screening +description: Tool for evaluation of MALT results for true positives of ancient + metagenomic taxonomic screening keywords: - malt - MaltExtract @@ -22,7 +22,8 @@ tools: documentation: https://github.com/rhuebler/hops tool_dev_url: https://github.com/rhuebler/hops doi: "10.1186/s13059-019-1903-0" - licence: ["GPL 3"] + licence: + - "GPL 3" identifier: "" input: - - meta: @@ -54,13 +55,28 @@ output: type: directory description: Directory containing MaltExtract text results files pattern: "results/" + + versions_maltextract: + - - ${task.process}: + type: string + description: The name of the process + - maltextract: + type: string + description: The name of the tool + - MaltExtract --help | head -n 2 | tail -n 1 | sed 's/MaltExtract version//': + 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 + - maltextract: + type: string + description: The name of the tool + - MaltExtract --help | head -n 2 | tail -n 1 | sed 's/MaltExtract version//': + type: eval + description: The expression to obtain the version of the tool authors: - "@jfy133" maintainers: diff --git a/modules/nf-core/maltextract/tests/main.nf.test b/modules/nf-core/maltextract/tests/main.nf.test index c7ef7d19325d..fdf3f4988e72 100644 --- a/modules/nf-core/maltextract/tests/main.nf.test +++ b/modules/nf-core/maltextract/tests/main.nf.test @@ -37,9 +37,36 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - process.out.versions, - path("${process.out.results.get(0).get(1)}/ScanSummary.txt") - ).match() }, + path("${process.out.results.get(0).get(1)}/ScanSummary.txt"), + path("${process.out.results.get(0).get(1)}/error.txt").text == "", + path("${process.out.results.get(0).get(1)}/log.txt"), + process.out.versions_maltextract + ).match() } + ) + } + } + + test("test_maltextract - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ [], // meta map + file(params.modules_testdata_base_path + 'delete_me/malt/test.rma6') + ] + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/db/maltextract/taxon_list.txt') + input[2] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() }, + { assert snapshot(process.out.versions_maltextract).match("versions") } ) } } diff --git a/modules/nf-core/maltextract/tests/main.nf.test.snap b/modules/nf-core/maltextract/tests/main.nf.test.snap index af63f7878fc2..81505c4c98d8 100644 --- a/modules/nf-core/maltextract/tests/main.nf.test.snap +++ b/modules/nf-core/maltextract/tests/main.nf.test.snap @@ -1,15 +1,61 @@ { + "test_maltextract - stub": { + "content": [ + { + "results": [ + [ + [], + [] + ] + ], + "versions_maltextract": [ + [ + "MALTEXTRACT", + "maltextract", + "1.7" + ] + ] + } + ], + "timestamp": "2026-04-29T22:34:21.854841", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, "test_maltextract": { + "content": [ + "ScanSummary.txt:md5,209fb35426f6a459db0f4af0dc544b10", + true, + "log.txt:md5,7d1a25809c8c92b550a43773fc78cfd4", + [ + [ + "MALTEXTRACT", + "maltextract", + "1.7" + ] + ] + ], + "timestamp": "2026-04-29T22:33:46.095165", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "versions": { "content": [ [ - "versions.yml:md5,4d87de5def1287321effde6545901cf6" - ], - "ScanSummary.txt:md5,209fb35426f6a459db0f4af0dc544b10" + [ + "MALTEXTRACT", + "maltextract", + "1.7" + ] + ] ], + "timestamp": "2026-04-29T22:34:21.854841", "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-01T08:19:20.696046683" + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } } -} \ No newline at end of file +} diff --git a/modules/nf-core/optitype/tests/main.nf.test.snap b/modules/nf-core/optitype/tests/main.nf.test.snap index 4c520c77d5de..d8d0040bcafc 100644 --- a/modules/nf-core/optitype/tests/main.nf.test.snap +++ b/modules/nf-core/optitype/tests/main.nf.test.snap @@ -74,5 +74,21 @@ "nextflow": "23.10.1" }, "timestamp": "2024-03-06T13:50:18.885995054" + }, + "versions": { + "content": [ + [ + [ + "OPTITYPE", + "optitype", + "1.3.1" + ] + ] + ], + "timestamp": "2024-03-06T13:47:07.297380921", + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + } } -} \ No newline at end of file +} diff --git a/modules/nf-core/prinseqplusplus/tests/main.nf.test.snap b/modules/nf-core/prinseqplusplus/tests/main.nf.test.snap index b9dcd85430ce..606c497fc35c 100644 --- a/modules/nf-core/prinseqplusplus/tests/main.nf.test.snap +++ b/modules/nf-core/prinseqplusplus/tests/main.nf.test.snap @@ -2,9 +2,7 @@ "test-prinseqplusplus-single-end": { "content": [ "test_good_out.fastq.gz", - [ - - ], + [], [ [ { @@ -57,5 +55,17 @@ "nextflow": "24.04.4" }, "timestamp": "2024-08-27T14:57:53.505032" + }, + "versions": { + "content": [ + [ + "versions.yml:md5,366e108ac2695a852af440e61fecad5e" + ] + ], + "timestamp": "2024-08-27T14:55:34.731661", + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + } } -} \ No newline at end of file +} diff --git a/modules/nf-core/shasta/tests/main.nf.test.snap b/modules/nf-core/shasta/tests/main.nf.test.snap index bcedc84e8bcb..e0be906aca04 100644 --- a/modules/nf-core/shasta/tests/main.nf.test.snap +++ b/modules/nf-core/shasta/tests/main.nf.test.snap @@ -13,5 +13,21 @@ "nextflow": "24.04.4" }, "timestamp": "2024-08-23T11:50:23.581975" + }, + "versions": { + "content": [ + [ + [ + "SHASTA", + "shasta", + "0.8.0" + ] + ] + ], + "timestamp": "2024-08-23T11:50:23.581975", + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + } } -} \ No newline at end of file +}