From 0b8db8c65076519fa3bf62ac71e1b9f2196ea398 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Tue, 12 May 2026 11:52:17 +0200 Subject: [PATCH 01/11] Update to topics --- modules/nf-core/gt/gff3/main.nf | 31 +++---- modules/nf-core/gt/gff3/meta.yml | 30 +++++-- modules/nf-core/gt/gff3/tests/main.nf.test | 43 +++++++--- .../nf-core/gt/gff3/tests/main.nf.test.snap | 80 ++++++++++++------- modules/nf-core/gt/gff3/tests/nextflow.config | 4 +- 5 files changed, 127 insertions(+), 61 deletions(-) diff --git a/modules/nf-core/gt/gff3/main.nf b/modules/nf-core/gt/gff3/main.nf index addced5f972d..5c1162eedc51 100644 --- a/modules/nf-core/gt/gff3/main.nf +++ b/modules/nf-core/gt/gff3/main.nf @@ -11,9 +11,9 @@ process GT_GFF3 { tuple val(meta), path(gff3) output: - tuple val(meta), path("*.gt.gff3") , emit: gt_gff3 , optional: true - tuple val(meta), path("*.error.log"), emit: error_log , optional: true - path "versions.yml" , emit: versions + tuple val(meta), path("*.gt.gff3") , emit: gt_gff3 , optional: true + tuple val(meta), path("*.error.log"), emit: error_log, optional: true + tuple val("${task.process}"), val('genometools'), eval("gt --version | sed '1!d;s/gt (GenomeTools) //'"), emit: versions_gt, topic: versions when: task.ext.when == null || task.ext.when @@ -24,28 +24,31 @@ process GT_GFF3 { """ gt \\ gff3 \\ - $args \\ - "$gff3" \\ + ${args} \\ + ${gff3} \\ > "${prefix}.gt.gff3" \\ 2>| >(tee "${prefix}.error.log" >&2) \\ || echo "Errors from gt-gff3 printed to ${prefix}.error.log" if grep -q "gt gff3: error:" "${prefix}.error.log"; then - echo "gt-gff3 failed to parse $gff3" + echo "gt-gff3 failed to parse ${gff3}" - rm \\ - "${prefix}.gt.gff3" + rm ${prefix}.gt.gff3 else - echo "gt-gff3 successfully parsed $gff3" + echo "gt-gff3 successfully parsed ${gff3}" mv \\ - "${prefix}.error.log" \\ + ${prefix}.error.log \\ gt_gff3.stderr fi + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" - cat <<-END_VERSIONS > versions.yml - "${task.process}": - genometools: \$(gt --version | head -1 | sed 's/gt (GenomeTools) //') - END_VERSIONS + """ + touch ${prefix}.gt.gff3 + touch ${prefix}.error.log + touch gt_gff3.stderr """ } diff --git a/modules/nf-core/gt/gff3/meta.yml b/modules/nf-core/gt/gff3/meta.yml index cbd33db5af13..45daf01f249f 100644 --- a/modules/nf-core/gt/gff3/meta.yml +++ b/modules/nf-core/gt/gff3/meta.yml @@ -1,4 +1,3 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json name: "gt_gff3" description: "GenomeTools gt-gff3 utility to parse, possibly transform, and output GFF3 files" @@ -13,7 +12,8 @@ tools: documentation: "https://genometools.org/documentation.html" tool_dev_url: "https://github.com/genometools/genometools" doi: "10.1109/TCBB.2013.68" - licence: ["ISC"] + licence: + - "ISC" identifier: "" input: - - meta: @@ -49,13 +49,27 @@ output: description: Error log if gt-gff3 failed to parse the input gff3 file pattern: "*.error.log" ontologies: [] + versions_gt: + - - ${task.process}: + type: string + description: The name of the process + - genometools: + type: string + description: The name of the tool + - gt --version | sed '1!d;s/gt (GenomeTools) //': + 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 + - genometools: + type: string + description: The name of the tool + - gt --version | sed '1!d;s/gt (GenomeTools) //': + type: eval + description: The expression to obtain the version of the tool authors: - "@gallvp" maintainers: diff --git a/modules/nf-core/gt/gff3/tests/main.nf.test b/modules/nf-core/gt/gff3/tests/main.nf.test index 46c7da35ba7a..0856df84031f 100644 --- a/modules/nf-core/gt/gff3/tests/main.nf.test +++ b/modules/nf-core/gt/gff3/tests/main.nf.test @@ -12,10 +12,13 @@ nextflow_process { test("sarscov2-gff3-valid") { when { + params { + module_args = '-tidy -retainids' + } process { """ input[0] = [ - [ id:'test' ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true) ] """ @@ -25,19 +28,19 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.gt_gff3 != null }, - { assert process.out.error_log == [] } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } - } test("sarscov2-gff3-invalid") { when { + params { + module_args = '-tidy -retainids' + } process { """ - input[0] = Channel.of( + input[0] = channel.of( '##gff-version 3', 'chr22\tID=gene:ENSG00000233995;Name=AP000547.1' ) @@ -50,12 +53,34 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.gt_gff3 == [] }, - { assert process.out.error_log != null }, + { assert snapshot(sanitizeOutput(process.out)).match() }, { assert path(process.out.error_log.get(0).get(1)).getText().contains("gt gff3: error:") } ) } } + test("sarscov2-gff3-valid -- stub") { + options "-stub" + when { + params { + module_args = '' + } + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + } + } diff --git a/modules/nf-core/gt/gff3/tests/main.nf.test.snap b/modules/nf-core/gt/gff3/tests/main.nf.test.snap index 6e454f185482..d1d699fee337 100644 --- a/modules/nf-core/gt/gff3/tests/main.nf.test.snap +++ b/modules/nf-core/gt/gff3/tests/main.nf.test.snap @@ -2,20 +2,6 @@ "sarscov2-gff3-invalid": { "content": [ { - "0": [ - - ], - "1": [ - [ - { - "id": "test" - }, - "test.error.log:md5,31e6117c516f936ec403f792c732bc76" - ] - ], - "2": [ - "versions.yml:md5,9753770dd19a2a306dcf16d4aaf049eb" - ], "error_log": [ [ { @@ -27,17 +13,28 @@ "gt_gff3": [ ], - "versions": [ - "versions.yml:md5,9753770dd19a2a306dcf16d4aaf049eb" + "versions_gt": [ + [ + "GT_GFF3", + "genometools", + "1.6.5" + ] ] } ], - "timestamp": "2023-11-29T10:42:11.408352" + "timestamp": "2026-05-12T11:50:29.085339901", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } }, "sarscov2-gff3-valid": { "content": [ { - "0": [ + "error_log": [ + + ], + "gt_gff3": [ [ { "id": "test" @@ -45,28 +42,53 @@ "test.gt.gff3:md5,2ae900237ace415557b8735fac088b85" ] ], - "1": [ - - ], - "2": [ - "versions.yml:md5,9753770dd19a2a306dcf16d4aaf049eb" - ], + "versions_gt": [ + [ + "GT_GFF3", + "genometools", + "1.6.5" + ] + ] + } + ], + "timestamp": "2026-05-12T11:51:30.87179653", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } + }, + "sarscov2-gff3-valid -- stub": { + "content": [ + { "error_log": [ - + [ + { + "id": "test" + }, + "test.error.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ], "gt_gff3": [ [ { "id": "test" }, - "test.gt.gff3:md5,2ae900237ace415557b8735fac088b85" + "test.gt.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,9753770dd19a2a306dcf16d4aaf049eb" + "versions_gt": [ + [ + "GT_GFF3", + "genometools", + "1.6.5" + ] ] } ], - "timestamp": "2023-11-29T10:42:07.817894" + "timestamp": "2026-05-12T11:46:28.575720785", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } } } \ No newline at end of file diff --git a/modules/nf-core/gt/gff3/tests/nextflow.config b/modules/nf-core/gt/gff3/tests/nextflow.config index af5622678c70..10fbddde8b3c 100644 --- a/modules/nf-core/gt/gff3/tests/nextflow.config +++ b/modules/nf-core/gt/gff3/tests/nextflow.config @@ -1,3 +1,5 @@ process { - ext.args = '-tidy -retainids' + withName: 'GT_GFF3' { + ext.args = params.module_args + } } From 7f5dd21da9f46c20d1369d4ba8f98c7a0e4cb207 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Tue, 12 May 2026 11:59:34 +0200 Subject: [PATCH 02/11] Update to topics --- modules/nf-core/gt/gff3validator/main.nf | 27 ++---- modules/nf-core/gt/gff3validator/meta.yml | 29 +++++-- .../gt/gff3validator/tests/main.nf.test | 23 +++-- .../gt/gff3validator/tests/main.nf.test.snap | 83 ++++++++----------- .../gt/gff3validator/tests/nextflow.config | 4 +- 5 files changed, 82 insertions(+), 84 deletions(-) diff --git a/modules/nf-core/gt/gff3validator/main.nf b/modules/nf-core/gt/gff3validator/main.nf index addc35f65077..79628d10f542 100644 --- a/modules/nf-core/gt/gff3validator/main.nf +++ b/modules/nf-core/gt/gff3validator/main.nf @@ -13,7 +13,7 @@ process GT_GFF3VALIDATOR { output: tuple val(meta), path('*.success.log') , emit: success_log , optional: true tuple val(meta), path('*.error.log') , emit: error_log , optional: true - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('genometools'), eval("gt --version | sed '1!d;s/gt (GenomeTools) //'"), emit: versions_gt, topic: versions when: task.ext.when == null || task.ext.when @@ -23,8 +23,8 @@ process GT_GFF3VALIDATOR { """ gt \\ gff3validator \\ - "$gff3" \\ - > "${prefix}.stdout" \\ + ${gff3} \\ + > ${prefix}.stdout \\ 2>| >(tee "${prefix}.stderr" >&2) \\ || echo "Errors from gt-gff3validator printed to ${prefix}.error.log" @@ -32,30 +32,21 @@ process GT_GFF3VALIDATOR { echo "Validation successful..." # emit stdout to the success output channel mv \\ - "${prefix}.stdout" \\ - "${prefix}.success.log" + ${prefix}.stdout \\ + ${prefix}.success.log else echo "Validation failed..." # emit stderr to the error output channel mv \\ - "${prefix}.stderr" \\ - "${prefix}.error.log" + ${prefix}.stderr \\ + ${prefix}.error.log fi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - genometools: \$(gt --version | head -1 | sed 's/gt (GenomeTools) //') - END_VERSIONS """ stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - touch "${prefix}.success.log" - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - genometools: \$(gt --version | head -1 | sed 's/gt (GenomeTools) //') - END_VERSIONS + touch ${prefix}.success.log + touch ${prefix}.error.log """ } diff --git a/modules/nf-core/gt/gff3validator/meta.yml b/modules/nf-core/gt/gff3validator/meta.yml index 3e89fb4aa729..caefa16470a5 100644 --- a/modules/nf-core/gt/gff3validator/meta.yml +++ b/modules/nf-core/gt/gff3validator/meta.yml @@ -13,7 +13,8 @@ tools: documentation: "https://genometools.org/documentation.html" tool_dev_url: "https://github.com/genometools/genometools" doi: "10.1109/TCBB.2013.68" - licence: ["ISC"] + licence: + - "ISC" identifier: "" input: - - meta: @@ -49,13 +50,27 @@ output: description: Log file for failed validation pattern: "*.error.log" ontologies: [] + versions_gt: + - - ${task.process}: + type: string + description: The name of the process + - genometools: + type: string + description: The name of the tool + - gt --version | sed '1!d;s/gt (GenomeTools) //': + 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 + - genometools: + type: string + description: The name of the tool + - gt --version | sed '1!d;s/gt (GenomeTools) //': + type: eval + description: The expression to obtain the version of the tool authors: - "@GallVp" maintainers: diff --git a/modules/nf-core/gt/gff3validator/tests/main.nf.test b/modules/nf-core/gt/gff3validator/tests/main.nf.test index 55184f84e467..5c976f8261b2 100644 --- a/modules/nf-core/gt/gff3validator/tests/main.nf.test +++ b/modules/nf-core/gt/gff3validator/tests/main.nf.test @@ -2,6 +2,7 @@ nextflow_process { name "Test Process GT_GFF3VALIDATOR" script "../main.nf" + config "./nextflow.config" process "GT_GFF3VALIDATOR" tag "modules" @@ -11,9 +12,6 @@ nextflow_process { tag "gt/gff3" test("sarscov2-gff3-valid") { - - config './nextflow.config' - setup { run("GT_GFF3") { script "../../../gt/gff3" @@ -30,6 +28,9 @@ nextflow_process { } when { + params { + module_gff3_args = '-tidy -retainids' + } process { """ input[0] = GT_GFF3.out.gt_gff3 @@ -41,8 +42,7 @@ nextflow_process { assertAll( { assert process.success }, { assert path(process.out.success_log[0][1]).text.contains("input is valid GFF3") }, - { assert process.out.error_log == [] }, - { assert snapshot(process.out).match() }, + { assert snapshot(sanitizeOutput(process.out)).match() }, ) } @@ -53,6 +53,9 @@ nextflow_process { options '-stub' when { + params { + module_gff3_args = '' + } process { """ input[0] = [ @@ -66,7 +69,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } @@ -75,10 +78,13 @@ nextflow_process { test("sarscov2-gff3-invalid") { when { + params { + module_gff3_args = '' + } process { """ input[0] = [ - [ id:'test' ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gff3', checkIfExists: true) ] """ @@ -89,8 +95,7 @@ nextflow_process { assertAll( { assert process.success }, { assert path(process.out.error_log[0][1]).text.contains("gt gff3validator: error:") }, - { assert process.out.success_log == [] }, - { assert snapshot(process.out).match() }, + { assert snapshot(sanitizeOutput(process.out)).match() }, ) } diff --git a/modules/nf-core/gt/gff3validator/tests/main.nf.test.snap b/modules/nf-core/gt/gff3validator/tests/main.nf.test.snap index ccc83f90f517..f8f17e8a2f28 100644 --- a/modules/nf-core/gt/gff3validator/tests/main.nf.test.snap +++ b/modules/nf-core/gt/gff3validator/tests/main.nf.test.snap @@ -2,22 +2,13 @@ "sarscov2-gff3-stub": { "content": [ { - "0": [ + "error_log": [ [ { "id": "test" }, - "test.success.log:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.error.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] - ], - "1": [ - - ], - "2": [ - "versions.yml:md5,5927673eb73a8c22408643d224414215" - ], - "error_log": [ - ], "success_log": [ [ @@ -27,30 +18,24 @@ "test.success.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,5927673eb73a8c22408643d224414215" + "versions_gt": [ + [ + "GT_GFF3VALIDATOR", + "genometools", + "1.6.5" + ] ] } ], - "timestamp": "2024-01-11T09:29:13.14468" + "timestamp": "2026-05-12T11:57:08.985436351", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } }, "sarscov2-gff3-invalid": { "content": [ { - "0": [ - - ], - "1": [ - [ - { - "id": "test" - }, - "test.error.log:md5,c5d16b263a87072a13cca44fd811b8e2" - ] - ], - "2": [ - "versions.yml:md5,5927673eb73a8c22408643d224414215" - ], "error_log": [ [ { @@ -62,30 +47,24 @@ "success_log": [ ], - "versions": [ - "versions.yml:md5,5927673eb73a8c22408643d224414215" + "versions_gt": [ + [ + "GT_GFF3VALIDATOR", + "genometools", + "1.6.5" + ] ] } ], - "timestamp": "2023-11-29T11:09:23.708792" + "timestamp": "2026-05-12T11:58:13.151272775", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } }, "sarscov2-gff3-valid": { "content": [ { - "0": [ - [ - { - "id": "test" - }, - "test.success.log:md5,b11ca5c18c865fc808ea0fef0b07da30" - ] - ], - "1": [ - - ], - "2": [ - "versions.yml:md5,5927673eb73a8c22408643d224414215" - ], "error_log": [ ], @@ -97,11 +76,19 @@ "test.success.log:md5,b11ca5c18c865fc808ea0fef0b07da30" ] ], - "versions": [ - "versions.yml:md5,5927673eb73a8c22408643d224414215" + "versions_gt": [ + [ + "GT_GFF3VALIDATOR", + "genometools", + "1.6.5" + ] ] } ], - "timestamp": "2023-12-13T10:34:54.485391" + "timestamp": "2026-05-12T11:57:35.764811686", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } } } \ No newline at end of file diff --git a/modules/nf-core/gt/gff3validator/tests/nextflow.config b/modules/nf-core/gt/gff3validator/tests/nextflow.config index c69915daf5dd..b1a76e5180c2 100644 --- a/modules/nf-core/gt/gff3validator/tests/nextflow.config +++ b/modules/nf-core/gt/gff3validator/tests/nextflow.config @@ -1,5 +1,5 @@ process { - withName: GT_GFF3 { - ext.args = '-tidy -retainids' + withName: 'GT_GFF3' { + ext.args = params.module_gff3_args } } From 09de5e0a9ca89f44665c33f007869ecba9c74e45 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Tue, 12 May 2026 13:33:37 +0200 Subject: [PATCH 03/11] Update to topics --- modules/nf-core/gt/ltrharvest/main.nf | 22 +- modules/nf-core/gt/ltrharvest/meta.yml | 29 ++- .../nf-core/gt/ltrharvest/tests/main.nf.test | 46 ++-- .../gt/ltrharvest/tests/main.nf.test.snap | 220 ++++++------------ .../gt/ltrharvest/tests/nextflow.config | 6 +- .../ltrharvest/tests/nextflow.extended.config | 11 - .../tests/nextflow.extended.custom.config | 11 - 7 files changed, 123 insertions(+), 222 deletions(-) delete mode 100644 modules/nf-core/gt/ltrharvest/tests/nextflow.extended.config delete mode 100644 modules/nf-core/gt/ltrharvest/tests/nextflow.extended.custom.config diff --git a/modules/nf-core/gt/ltrharvest/main.nf b/modules/nf-core/gt/ltrharvest/main.nf index 99478db30e39..3418acceabdd 100644 --- a/modules/nf-core/gt/ltrharvest/main.nf +++ b/modules/nf-core/gt/ltrharvest/main.nf @@ -15,7 +15,7 @@ process GT_LTRHARVEST { tuple val(meta), path("*.gff3") , emit: gff3 , optional: true tuple val(meta), path("$out_name") , emit: fasta , optional: true // When args has -out tuple val(meta), path("$outinner_name") , emit: inner_fasta , optional: true // When args has -outinner - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('genometools'), eval("gt --version | sed '1!d;s/gt (GenomeTools) //'"), emit: versions_gt, topic: versions when: task.ext.when == null || task.ext.when @@ -29,14 +29,9 @@ process GT_LTRHARVEST { """ gt \\ ltrharvest \\ - -index "$index/suffixerator" \\ - $args \\ - > "${prefix}.${extension}" - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - genometools: \$(gt --version | head -1 | sed 's/gt (GenomeTools) //') - END_VERSIONS + -index ${index}/suffixerator \\ + ${args} \\ + > ${prefix}.${extension} """ stub: @@ -51,12 +46,7 @@ process GT_LTRHARVEST { def touch_inner = args.contains("-outinner") ? "touch $outinner_name" : '' """ touch "${prefix}.${extension}" - $touch_out - $touch_inner - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - genometools: \$(gt --version | head -1 | sed 's/gt (GenomeTools) //') - END_VERSIONS + ${touch_out} + ${touch_inner} """ } diff --git a/modules/nf-core/gt/ltrharvest/meta.yml b/modules/nf-core/gt/ltrharvest/meta.yml index a1c5253c9701..5a561a9d62af 100644 --- a/modules/nf-core/gt/ltrharvest/meta.yml +++ b/modules/nf-core/gt/ltrharvest/meta.yml @@ -15,7 +15,8 @@ tools: documentation: "https://genometools.org/documentation.html" tool_dev_url: "https://github.com/genometools/genometools" doi: "10.1109/TCBB.2013.68" - licence: ["ISC"] + licence: + - "ISC" identifier: "" input: - - meta: @@ -73,13 +74,27 @@ output: description: FASTA output for inner regions when `-outinner` argument is present pattern: "*.{fa,fsa,fasta}" ontologies: [] + versions_gt: + - - ${task.process}: + type: string + description: The name of the process + - genometools: + type: string + description: The name of the tool + - gt --version | sed '1!d;s/gt (GenomeTools) //': + 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 + - genometools: + type: string + description: The name of the tool + - gt --version | sed '1!d;s/gt (GenomeTools) //': + type: eval + description: The expression to obtain the version of the tool authors: - "@GallVp" maintainers: diff --git a/modules/nf-core/gt/ltrharvest/tests/main.nf.test b/modules/nf-core/gt/ltrharvest/tests/main.nf.test index f9e1ce135467..fc2deab423f0 100644 --- a/modules/nf-core/gt/ltrharvest/tests/main.nf.test +++ b/modules/nf-core/gt/ltrharvest/tests/main.nf.test @@ -12,7 +12,6 @@ nextflow_process { tag "gt/suffixerator" test("homo_sapiens-genome_21_fasta-success") { - setup { run("GT_SUFFIXERATOR") { script "../../../gt/suffixerator" @@ -30,6 +29,10 @@ nextflow_process { } when { + params { + module_suffixerator_args = '-suf -lcp' + module_ltrharvest_args = '' + } process { """ input[0] = GT_SUFFIXERATOR.out.index @@ -40,16 +43,13 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } test("homo_sapiens-genome_21_fasta-success-extended_outputs") { - - config './nextflow.extended.config' - setup { run("GT_SUFFIXERATOR") { script "../../../gt/suffixerator" @@ -67,6 +67,10 @@ nextflow_process { } when { + params { + module_suffixerator_args = '-suf -lcp' + module_ltrharvest_args = '-tabout no -out test.out.fasta -outinner test.inner.fasta' + } process { """ input[0] = GT_SUFFIXERATOR.out.index @@ -77,16 +81,12 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } - } test("homo_sapiens-genome_21_fasta-success-extended_custom_outputs") { - - config './nextflow.extended.custom.config' - setup { run("GT_SUFFIXERATOR") { script "../../../gt/suffixerator" @@ -104,6 +104,10 @@ nextflow_process { } when { + params { + module_suffixerator_args = '-suf -lcp' + module_ltrharvest_args = '-tabout no -out custom.custom2.fa -outinner custom.custom2.custom3_custom4.fsa' + } process { """ input[0] = GT_SUFFIXERATOR.out.index @@ -114,17 +118,18 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } - } test("stub") { - options '-stub' - when { + params { + module_suffixerator_args = '' + module_ltrharvest_args = '' + } process { """ input[0] = [ @@ -138,18 +143,18 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } - } test("stub-extended_outputs") { - - config './nextflow.extended.config' options '-stub' - when { + params { + module_suffixerator_args = '-suf -lcp' + module_ltrharvest_args = '-tabout no -out test.out.fasta -outinner test.inner.fasta' + } process { """ input[0] = [ @@ -163,10 +168,9 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } - } } diff --git a/modules/nf-core/gt/ltrharvest/tests/main.nf.test.snap b/modules/nf-core/gt/ltrharvest/tests/main.nf.test.snap index 3f48b6e60db5..4006402ae9d9 100644 --- a/modules/nf-core/gt/ltrharvest/tests/main.nf.test.snap +++ b/modules/nf-core/gt/ltrharvest/tests/main.nf.test.snap @@ -2,34 +2,14 @@ "homo_sapiens-genome_21_fasta-success": { "content": [ { - "0": [ - [ - { - "id": "test" - }, - "test.tabout:md5,f8996d38123756c565656c36a385e6ad" - ] - ], - "1": [ - - ], - "2": [ - - ], - "3": [ - - ], - "4": [ - "versions.yml:md5,8df72f2f0252e314180bde73e0bbae37" - ], "fasta": [ - + ], "gff3": [ - + ], "inner_fasta": [ - + ], "tabout": [ [ @@ -39,44 +19,32 @@ "test.tabout:md5,f8996d38123756c565656c36a385e6ad" ] ], - "versions": [ - "versions.yml:md5,8df72f2f0252e314180bde73e0bbae37" + "versions_gt": [ + [ + "GT_LTRHARVEST", + "genometools", + "1.6.5" + ] ] } ], - "timestamp": "2024-01-16T09:42:10.114754" + "timestamp": "2026-05-12T12:08:13.121223554", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } }, "stub": { "content": [ { - "0": [ - [ - { - "id": "test" - }, - "test.tabout:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - - ], - "2": [ - - ], - "3": [ - - ], - "4": [ - "versions.yml:md5,8df72f2f0252e314180bde73e0bbae37" - ], "fasta": [ - + ], "gff3": [ - + ], "inner_fasta": [ - + ], "tabout": [ [ @@ -86,46 +54,24 @@ "test.tabout:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,8df72f2f0252e314180bde73e0bbae37" + "versions_gt": [ + [ + "GT_LTRHARVEST", + "genometools", + "1.6.5" + ] ] } ], - "timestamp": "2024-01-16T09:42:15.015783" + "timestamp": "2026-05-12T12:09:13.149725677", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } }, "homo_sapiens-genome_21_fasta-success-extended_outputs": { "content": [ { - "0": [ - - ], - "1": [ - [ - { - "id": "test" - }, - "test.gff3:md5,99a91210cc542c94078a65ffed6661c1" - ] - ], - "2": [ - [ - { - "id": "test" - }, - "test.out.fasta:md5,8899d1b7e719b8b445aae2211e4c2b6b" - ] - ], - "3": [ - [ - { - "id": "test" - }, - "test.inner.fasta:md5,6d138e05825e086358db544ab9ea1405" - ] - ], - "4": [ - "versions.yml:md5,8df72f2f0252e314180bde73e0bbae37" - ], "fasta": [ [ { @@ -151,48 +97,26 @@ ] ], "tabout": [ - + ], - "versions": [ - "versions.yml:md5,8df72f2f0252e314180bde73e0bbae37" + "versions_gt": [ + [ + "GT_LTRHARVEST", + "genometools", + "1.6.5" + ] ] } ], - "timestamp": "2024-01-17T11:19:43.776285" + "timestamp": "2026-05-12T12:31:03.89334978", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } }, "homo_sapiens-genome_21_fasta-success-extended_custom_outputs": { "content": [ { - "0": [ - - ], - "1": [ - [ - { - "id": "test" - }, - "test.gff3:md5,99a91210cc542c94078a65ffed6661c1" - ] - ], - "2": [ - [ - { - "id": "test" - }, - "custom.custom2.fa:md5,8899d1b7e719b8b445aae2211e4c2b6b" - ] - ], - "3": [ - [ - { - "id": "test" - }, - "custom.custom2.custom3_custom4.fsa:md5,6d138e05825e086358db544ab9ea1405" - ] - ], - "4": [ - "versions.yml:md5,8df72f2f0252e314180bde73e0bbae37" - ], "fasta": [ [ { @@ -218,48 +142,26 @@ ] ], "tabout": [ - + ], - "versions": [ - "versions.yml:md5,8df72f2f0252e314180bde73e0bbae37" + "versions_gt": [ + [ + "GT_LTRHARVEST", + "genometools", + "1.6.5" + ] ] } ], - "timestamp": "2024-01-17T12:45:07.849944" + "timestamp": "2026-05-12T12:31:52.889661426", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } }, "stub-extended_outputs": { "content": [ { - "0": [ - - ], - "1": [ - [ - { - "id": "test" - }, - "test.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test" - }, - "test.out.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - [ - { - "id": "test" - }, - "test.inner.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "4": [ - "versions.yml:md5,8df72f2f0252e314180bde73e0bbae37" - ], "fasta": [ [ { @@ -285,13 +187,21 @@ ] ], "tabout": [ - + ], - "versions": [ - "versions.yml:md5,8df72f2f0252e314180bde73e0bbae37" + "versions_gt": [ + [ + "GT_LTRHARVEST", + "genometools", + "1.6.5" + ] ] } ], - "timestamp": "2024-01-17T11:20:13.665071" + "timestamp": "2026-05-12T12:32:10.029085376", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } } -} +} \ No newline at end of file diff --git a/modules/nf-core/gt/ltrharvest/tests/nextflow.config b/modules/nf-core/gt/ltrharvest/tests/nextflow.config index 433fb234a7f9..5fb08c23e92f 100644 --- a/modules/nf-core/gt/ltrharvest/tests/nextflow.config +++ b/modules/nf-core/gt/ltrharvest/tests/nextflow.config @@ -1,6 +1,10 @@ process { withName: GT_SUFFIXERATOR { - ext.args = '-suf -lcp' + ext.args = params.module_suffixerator_args // GT_LTRHARVEST requires -suf, -lcp } + + withName: GT_LTRHARVEST { + ext.args = params.module_ltrharvest_args + } } diff --git a/modules/nf-core/gt/ltrharvest/tests/nextflow.extended.config b/modules/nf-core/gt/ltrharvest/tests/nextflow.extended.config deleted file mode 100644 index c0dedaa97be2..000000000000 --- a/modules/nf-core/gt/ltrharvest/tests/nextflow.extended.config +++ /dev/null @@ -1,11 +0,0 @@ -process { - - withName: GT_SUFFIXERATOR { - ext.args = '-suf -lcp' - // GT_LTRHARVEST requires -suf, -lcp - } - - withName: GT_LTRHARVEST { - ext.args = { "-tabout no -out ${meta.id}.out.fasta -outinner ${meta.id}.inner.fasta" } - } -} diff --git a/modules/nf-core/gt/ltrharvest/tests/nextflow.extended.custom.config b/modules/nf-core/gt/ltrharvest/tests/nextflow.extended.custom.config deleted file mode 100644 index dd6723883a4a..000000000000 --- a/modules/nf-core/gt/ltrharvest/tests/nextflow.extended.custom.config +++ /dev/null @@ -1,11 +0,0 @@ -process { - - withName: GT_SUFFIXERATOR { - ext.args = '-suf -lcp' - // GT_LTRHARVEST requires -suf, -lcp - } - - withName: GT_LTRHARVEST { - ext.args = '-tabout no -out custom.custom2.fa -outinner custom.custom2.custom3_custom4.fsa' - } -} From a373b4be0312472688d0a789c77634ba783b4c9b Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Tue, 12 May 2026 13:48:22 +0200 Subject: [PATCH 04/11] Update to topics --- modules/nf-core/gt/suffixerator/main.nf | 31 ++--- modules/nf-core/gt/suffixerator/meta.yml | 29 +++-- .../gt/suffixerator/tests/main.nf.test | 66 ++++++---- .../gt/suffixerator/tests/main.nf.test.snap | 119 ++++++------------ .../gt/suffixerator/tests/nextflow.config | 6 +- 5 files changed, 114 insertions(+), 137 deletions(-) diff --git a/modules/nf-core/gt/suffixerator/main.nf b/modules/nf-core/gt/suffixerator/main.nf index 92f6a6cfcb3f..928df9568ccd 100644 --- a/modules/nf-core/gt/suffixerator/main.nf +++ b/modules/nf-core/gt/suffixerator/main.nf @@ -13,7 +13,7 @@ process GT_SUFFIXERATOR { output: tuple val(meta), path("$prefix"), emit: index - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('genometools'), eval("gt --version | sed '1!d;s/gt (GenomeTools) //'"), emit: versions_gt, topic: versions when: task.ext.when == null || task.ext.when @@ -28,32 +28,21 @@ process GT_SUFFIXERATOR { gt \\ suffixerator \\ - "-$mode" \\ - $args \\ - -db $fasta \\ - -indexname "$prefix/suffixerator" - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - genometools: \$(gt --version | head -1 | sed 's/gt (GenomeTools) //') - END_VERSIONS + -${mode} \\ + ${args} \\ + -db ${fasta} \\ + -indexname ${prefix}/suffixerator """ stub: if ( mode !in [ 'dna', 'protein' ] ) { error "Mode must be one of 'dna', or 'protein'" } prefix = task.ext.prefix ?: "${meta.id}" - def touch_ssp = mode == "protein" ? "touch $prefix/suffixerator.ssp" : '' + def touch_ssp = mode == "protein" ? "touch ${prefix}/suffixerator.ssp" : '' """ - mkdir \\ - "$prefix" - - touch "$prefix/suffixerator.esq" - touch "$prefix/suffixerator.prj" - $touch_ssp + mkdir ${prefix} - cat <<-END_VERSIONS > versions.yml - "${task.process}": - genometools: \$(gt --version | head -1 | sed 's/gt (GenomeTools) //') - END_VERSIONS + touch ${prefix}/suffixerator.esq + touch ${prefix}/suffixerator.prj + ${touch_ssp} """ } diff --git a/modules/nf-core/gt/suffixerator/meta.yml b/modules/nf-core/gt/suffixerator/meta.yml index e266e90330a7..ca451fb570ca 100644 --- a/modules/nf-core/gt/suffixerator/meta.yml +++ b/modules/nf-core/gt/suffixerator/meta.yml @@ -13,7 +13,8 @@ tools: documentation: "https://genometools.org/documentation.html" tool_dev_url: "https://github.com/genometools/genometools" doi: "10.1109/TCBB.2013.68" - licence: ["ISC"] + licence: + - "ISC" identifier: "" input: - - meta: @@ -40,13 +41,27 @@ output: type: directory description: Folder containing the suffixerator index files pattern: "suffixerator" + versions_gt: + - - ${task.process}: + type: string + description: The name of the process + - genometools: + type: string + description: The name of the tool + - gt --version | sed '1!d;s/gt (GenomeTools) //': + 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 + - genometools: + type: string + description: The name of the tool + - gt --version | sed '1!d;s/gt (GenomeTools) //': + type: eval + description: The expression to obtain the version of the tool authors: - "@GallVp" maintainers: diff --git a/modules/nf-core/gt/suffixerator/tests/main.nf.test b/modules/nf-core/gt/suffixerator/tests/main.nf.test index 3f8fb5dd5127..05d604b06546 100644 --- a/modules/nf-core/gt/suffixerator/tests/main.nf.test +++ b/modules/nf-core/gt/suffixerator/tests/main.nf.test @@ -2,6 +2,7 @@ nextflow_process { name "Test Process GT_SUFFIXERATOR" script "../main.nf" + config "./nextflow.config" process "GT_SUFFIXERATOR" tag "modules" @@ -10,16 +11,18 @@ nextflow_process { tag "gt/suffixerator" test("homo_sapiens-genome_fasta-success") { - - config "./nextflow.config" - when { + params { + module_args = '-des -sds no' + // '-des' is for '-sds' + // '-sds no' turns off sds which is an empty file for the test data + } process { """ input[0] = [ - [ id:'test' ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] + ] input[1] = 'dna' """ } @@ -28,21 +31,23 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } - } test("sarscov2-proteome_fasta-success") { when { + params { + module_args = '' + } process { """ input[0] = [ - [ id:'test' ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true) - ] + ] input[1] = 'protein' """ } @@ -51,10 +56,9 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } - } test("stub-dna") { @@ -62,12 +66,15 @@ nextflow_process { options '-stub' when { + params { + module_args = '' + } process { """ input[0] = [ - [ id:'test' ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] + ] input[1] = 'dna' """ } @@ -76,10 +83,9 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } - } test("stub-protein") { @@ -87,12 +93,15 @@ nextflow_process { options '-stub' when { + params { + module_args = '' + } process { """ input[0] = [ - [ id:'test' ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] + ] input[1] = 'protein' """ } @@ -101,21 +110,23 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } - } test("wrong-mode-fail") { when { + params { + module_args = '' + } process { """ input[0] = [ - [ id:'test' ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] + ] input[1] = 'xyz' """ } @@ -123,11 +134,10 @@ nextflow_process { then { assertAll( - { assert !process.success }, + { assert process.failed }, { assert process.stdout.toString().contains("Mode must be one of 'dna', or 'protein'") } ) } - } test("wrong-mode-fail-stub") { @@ -135,12 +145,15 @@ nextflow_process { options '-stub' when { + params { + module_args = '' + } process { """ input[0] = [ - [ id:'test' ], // meta map + [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] + ] input[1] = 'xyz' """ } @@ -148,11 +161,10 @@ nextflow_process { then { assertAll( - { assert !process.success }, + { assert process.failed }, { assert process.stdout.toString().contains("Mode must be one of 'dna', or 'protein'") } ) } - } } diff --git a/modules/nf-core/gt/suffixerator/tests/main.nf.test.snap b/modules/nf-core/gt/suffixerator/tests/main.nf.test.snap index f7f60358bcd4..6c28a919f47f 100644 --- a/modules/nf-core/gt/suffixerator/tests/main.nf.test.snap +++ b/modules/nf-core/gt/suffixerator/tests/main.nf.test.snap @@ -2,7 +2,7 @@ "stub-dna": { "content": [ { - "0": [ + "index": [ [ { "id": "test" @@ -13,39 +13,25 @@ ] ] ], - "1": [ - "versions.yml:md5,e9cb11627c58bf1b12b612e50fb7c819" - ], - "index": [ + "versions_gt": [ [ - { - "id": "test" - }, - [ - "suffixerator.esq:md5,d41d8cd98f00b204e9800998ecf8427e", - "suffixerator.prj:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + "GT_SUFFIXERATOR", + "genometools", + "1.6.5" ] - ], - "versions": [ - "versions.yml:md5,e9cb11627c58bf1b12b612e50fb7c819" ] } ], - "timestamp": "2024-01-15T09:43:43.338604" - }, - "versions": { - "content": [ - [ - "versions.yml:md5,e9cb11627c58bf1b12b612e50fb7c819" - ] - ], - "timestamp": "2024-01-12T09:18:32.053777" + "timestamp": "2026-05-12T13:40:50.931151226", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } }, "sarscov2-proteome_fasta-success": { "content": [ { - "0": [ + "index": [ [ { "id": "test" @@ -60,35 +46,25 @@ ] ] ], - "1": [ - "versions.yml:md5,e9cb11627c58bf1b12b612e50fb7c819" - ], - "index": [ + "versions_gt": [ [ - { - "id": "test" - }, - [ - "suffixerator.des:md5,6b8f3a6fe1bdc50595537501b7856fac", - "suffixerator.esq:md5,11c54e7b957947b9536eed57c4a750c2", - "suffixerator.md5:md5,b1b9ef8945ac06ac4616702c97be623b", - "suffixerator.prj:md5,3cbbe5658b288204883ae3ef41e6a318", - "suffixerator.sds:md5,7538cfe366013c7d781ec903a8405568", - "suffixerator.ssp:md5,8dd22e04c341f3f55ac2385da2eedfec" - ] + "GT_SUFFIXERATOR", + "genometools", + "1.6.5" ] - ], - "versions": [ - "versions.yml:md5,e9cb11627c58bf1b12b612e50fb7c819" ] } ], - "timestamp": "2024-01-15T09:36:21.11546" + "timestamp": "2026-05-12T13:40:44.099228205", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } }, "homo_sapiens-genome_fasta-success": { "content": [ { - "0": [ + "index": [ [ { "id": "test" @@ -101,33 +77,25 @@ ] ] ], - "1": [ - "versions.yml:md5,e9cb11627c58bf1b12b612e50fb7c819" - ], - "index": [ + "versions_gt": [ [ - { - "id": "test" - }, - [ - "suffixerator.des:md5,01ab4d42934d24a0048762ee552ba8dc", - "suffixerator.esq:md5,c822aad497f61f841a71511fff8aac3c", - "suffixerator.md5:md5,67fb4e71c5ba2bfe0d7ba91a478d1057", - "suffixerator.prj:md5,939576f76e635571e9c96d8c2ca23b60" - ] + "GT_SUFFIXERATOR", + "genometools", + "1.6.5" ] - ], - "versions": [ - "versions.yml:md5,e9cb11627c58bf1b12b612e50fb7c819" ] } ], - "timestamp": "2024-01-12T09:19:16.901913" + "timestamp": "2026-05-12T13:40:33.636548682", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } }, "stub-protein": { "content": [ { - "0": [ + "index": [ [ { "id": "test" @@ -139,26 +107,19 @@ ] ] ], - "1": [ - "versions.yml:md5,e9cb11627c58bf1b12b612e50fb7c819" - ], - "index": [ + "versions_gt": [ [ - { - "id": "test" - }, - [ - "suffixerator.esq:md5,d41d8cd98f00b204e9800998ecf8427e", - "suffixerator.prj:md5,d41d8cd98f00b204e9800998ecf8427e", - "suffixerator.ssp:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + "GT_SUFFIXERATOR", + "genometools", + "1.6.5" ] - ], - "versions": [ - "versions.yml:md5,e9cb11627c58bf1b12b612e50fb7c819" ] } ], - "timestamp": "2024-01-15T09:43:47.592165" + "timestamp": "2026-05-12T13:40:57.796022858", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } } } \ No newline at end of file diff --git a/modules/nf-core/gt/suffixerator/tests/nextflow.config b/modules/nf-core/gt/suffixerator/tests/nextflow.config index d37ce2585e6b..bc7ea0f3cfc5 100644 --- a/modules/nf-core/gt/suffixerator/tests/nextflow.config +++ b/modules/nf-core/gt/suffixerator/tests/nextflow.config @@ -1,5 +1,5 @@ process { - ext.args = '-des -sds no' - // '-des' is for '-sds' - // '-sds no' turns off sds which is an empty file for the test data + withName: GT_SUFFIXERATOR { + ext.args = params.module_args + } } From 50da51f7cf7922024f6f2bd1307918fb08865516 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Tue, 12 May 2026 13:48:59 +0200 Subject: [PATCH 05/11] Update to topics --- modules/nf-core/gt/stat/main.nf | 16 +----- modules/nf-core/gt/stat/meta.yml | 29 +++++++--- modules/nf-core/gt/stat/tests/main.nf.test | 5 +- .../nf-core/gt/stat/tests/main.nf.test.snap | 55 +++++++++++-------- 4 files changed, 58 insertions(+), 47 deletions(-) diff --git a/modules/nf-core/gt/stat/main.nf b/modules/nf-core/gt/stat/main.nf index 467a3b377ca5..470c62723d32 100644 --- a/modules/nf-core/gt/stat/main.nf +++ b/modules/nf-core/gt/stat/main.nf @@ -12,7 +12,7 @@ process GT_STAT { output: tuple val(meta), path("${prefix}.yml") , emit: stats - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('genometools'), eval("gt --version | sed '1!d;s/gt (GenomeTools) //'"), emit: versions_gt, topic: versions when: task.ext.when == null || task.ext.when @@ -23,24 +23,14 @@ process GT_STAT { """ gt \\ stat \\ - $args \\ - $gff3 \\ + ${args} \\ + ${gff3} \\ > ${prefix}.yml - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - genometools: \$(gt --version | head -1 | sed 's/gt (GenomeTools) //') - END_VERSIONS """ stub: prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.yml - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - genometools: \$(gt --version | head -1 | sed 's/gt (GenomeTools) //') - END_VERSIONS """ } diff --git a/modules/nf-core/gt/stat/meta.yml b/modules/nf-core/gt/stat/meta.yml index 9fe22f63de6e..98eacc527a63 100644 --- a/modules/nf-core/gt/stat/meta.yml +++ b/modules/nf-core/gt/stat/meta.yml @@ -15,7 +15,8 @@ tools: documentation: "https://genometools.org/documentation.html" tool_dev_url: "https://github.com/genometools/genometools" doi: "10.1109/TCBB.2013.68" - licence: ["ISC"] + licence: + - "ISC" identifier: "" input: - - meta: @@ -41,13 +42,27 @@ output: pattern: "*.yml" ontologies: - edam: http://edamontology.org/format_3750 # YAML + versions_gt: + - - ${task.process}: + type: string + description: The name of the process + - genometools: + type: string + description: The name of the tool + - gt --version | sed '1!d;s/gt (GenomeTools) //': + 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 + - genometools: + type: string + description: The name of the tool + - gt --version | sed '1!d;s/gt (GenomeTools) //': + type: eval + description: The expression to obtain the version of the tool authors: - "@GallVp" maintainers: diff --git a/modules/nf-core/gt/stat/tests/main.nf.test b/modules/nf-core/gt/stat/tests/main.nf.test index 227f7bb00a52..1a63aa2d3d34 100644 --- a/modules/nf-core/gt/stat/tests/main.nf.test +++ b/modules/nf-core/gt/stat/tests/main.nf.test @@ -27,7 +27,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() }, + { assert snapshot(sanitizeOutput(process.out)).match() }, { assert path(process.out.stats[0][1]).text.contains("cdss: 12") } ) } @@ -52,8 +52,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert process.out.stats != null }, // md5sum for empty files not allowed by nf-core/tools 2.14.0 - { assert snapshot(process.out.versions).match("stub_versions") } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } diff --git a/modules/nf-core/gt/stat/tests/main.nf.test.snap b/modules/nf-core/gt/stat/tests/main.nf.test.snap index 481ceb1d76dd..fc0c7095c35c 100644 --- a/modules/nf-core/gt/stat/tests/main.nf.test.snap +++ b/modules/nf-core/gt/stat/tests/main.nf.test.snap @@ -1,18 +1,33 @@ { - "sarscov2-gff3": { + "sarscov2-gff3-stub": { "content": [ { - "0": [ + "stats": [ [ { "id": "test" }, - "test.yml:md5,ebba7831ddbf916b8bbea675ba8693b5" + "test.yml:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "1": [ - "versions.yml:md5,a184b50afb2ad6dd2d3d37b0a211dd71" - ], + "versions_gt": [ + [ + "GT_STAT", + "genometools", + "1.6.5" + ] + ] + } + ], + "timestamp": "2026-05-12T13:35:57.966569557", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } + }, + "sarscov2-gff3": { + "content": [ + { "stats": [ [ { @@ -21,27 +36,19 @@ "test.yml:md5,ebba7831ddbf916b8bbea675ba8693b5" ] ], - "versions": [ - "versions.yml:md5,a184b50afb2ad6dd2d3d37b0a211dd71" + "versions_gt": [ + [ + "GT_STAT", + "genometools", + "1.6.5" + ] ] } ], + "timestamp": "2026-05-12T13:35:51.361658139", "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-09T19:29:08.925383" - }, - "stub_versions": { - "content": [ - [ - "versions.yml:md5,a184b50afb2ad6dd2d3d37b0a211dd71" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-09T19:29:12.808817" + "nf-test": "0.9.5", + "nextflow": "26.03.2" + } } } \ No newline at end of file From 80f2b65f712e846d9660b9b63998b74bc2ce49e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20Le=20N=C3=A9zet?= <58640615+LouisLeNezet@users.noreply.github.com> Date: Mon, 18 May 2026 15:59:56 +0200 Subject: [PATCH 06/11] Update modules/nf-core/gt/gff3/main.nf Co-authored-by: Joon Klaps --- modules/nf-core/gt/gff3/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/gt/gff3/main.nf b/modules/nf-core/gt/gff3/main.nf index 5c1162eedc51..3cd1b0aa35f3 100644 --- a/modules/nf-core/gt/gff3/main.nf +++ b/modules/nf-core/gt/gff3/main.nf @@ -13,7 +13,7 @@ process GT_GFF3 { output: tuple val(meta), path("*.gt.gff3") , emit: gt_gff3 , optional: true tuple val(meta), path("*.error.log"), emit: error_log, optional: true - tuple val("${task.process}"), val('genometools'), eval("gt --version | sed '1!d;s/gt (GenomeTools) //'"), emit: versions_gt, topic: versions + tuple val("${task.process}"), val('genometools'), eval("gt --version | sed '1!d;s/.* //'"), emit: versions_gt, topic: versions when: task.ext.when == null || task.ext.when From 63f9f240b1cf76ffb0a10a7ab9cb69a5e94d9e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20Le=20N=C3=A9zet?= <58640615+LouisLeNezet@users.noreply.github.com> Date: Mon, 18 May 2026 16:00:03 +0200 Subject: [PATCH 07/11] Update modules/nf-core/gt/gff3validator/main.nf Co-authored-by: Joon Klaps --- modules/nf-core/gt/gff3validator/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/gt/gff3validator/main.nf b/modules/nf-core/gt/gff3validator/main.nf index 79628d10f542..bf070e977f3e 100644 --- a/modules/nf-core/gt/gff3validator/main.nf +++ b/modules/nf-core/gt/gff3validator/main.nf @@ -13,7 +13,7 @@ process GT_GFF3VALIDATOR { output: tuple val(meta), path('*.success.log') , emit: success_log , optional: true tuple val(meta), path('*.error.log') , emit: error_log , optional: true - tuple val("${task.process}"), val('genometools'), eval("gt --version | sed '1!d;s/gt (GenomeTools) //'"), emit: versions_gt, topic: versions + tuple val("${task.process}"), val('genometools'), eval("gt --version | sed '1!d;s/.* //'"), emit: versions_gt, topic: versions when: task.ext.when == null || task.ext.when From 5298528ca7ee5aad48897aaaa6c578aa9a7ce957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20Le=20N=C3=A9zet?= <58640615+LouisLeNezet@users.noreply.github.com> Date: Mon, 18 May 2026 16:00:11 +0200 Subject: [PATCH 08/11] Update modules/nf-core/gt/ltrharvest/main.nf Co-authored-by: Joon Klaps --- modules/nf-core/gt/ltrharvest/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/gt/ltrharvest/main.nf b/modules/nf-core/gt/ltrharvest/main.nf index 3418acceabdd..d7aae221b9aa 100644 --- a/modules/nf-core/gt/ltrharvest/main.nf +++ b/modules/nf-core/gt/ltrharvest/main.nf @@ -15,7 +15,7 @@ process GT_LTRHARVEST { tuple val(meta), path("*.gff3") , emit: gff3 , optional: true tuple val(meta), path("$out_name") , emit: fasta , optional: true // When args has -out tuple val(meta), path("$outinner_name") , emit: inner_fasta , optional: true // When args has -outinner - tuple val("${task.process}"), val('genometools'), eval("gt --version | sed '1!d;s/gt (GenomeTools) //'"), emit: versions_gt, topic: versions + tuple val("${task.process}"), val('genometools'), eval("gt --version | sed '1!d;s/.* //'"), emit: versions_gt, topic: versions when: task.ext.when == null || task.ext.when From ef5b2ee47f2ad0dcb8067d5061b53b57e88e785a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20Le=20N=C3=A9zet?= <58640615+LouisLeNezet@users.noreply.github.com> Date: Mon, 18 May 2026 16:00:17 +0200 Subject: [PATCH 09/11] Update modules/nf-core/gt/stat/main.nf Co-authored-by: Joon Klaps --- modules/nf-core/gt/stat/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/gt/stat/main.nf b/modules/nf-core/gt/stat/main.nf index 470c62723d32..7fb468764820 100644 --- a/modules/nf-core/gt/stat/main.nf +++ b/modules/nf-core/gt/stat/main.nf @@ -12,7 +12,7 @@ process GT_STAT { output: tuple val(meta), path("${prefix}.yml") , emit: stats - tuple val("${task.process}"), val('genometools'), eval("gt --version | sed '1!d;s/gt (GenomeTools) //'"), emit: versions_gt, topic: versions + tuple val("${task.process}"), val('genometools'), eval("gt --version | sed '1!d;s/.* //'"), emit: versions_gt, topic: versions when: task.ext.when == null || task.ext.when From 38a60ef6613248889b55ff0c50597499425e4511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20Le=20N=C3=A9zet?= <58640615+LouisLeNezet@users.noreply.github.com> Date: Mon, 18 May 2026 16:00:26 +0200 Subject: [PATCH 10/11] Update modules/nf-core/gt/suffixerator/main.nf Co-authored-by: Joon Klaps --- modules/nf-core/gt/suffixerator/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/gt/suffixerator/main.nf b/modules/nf-core/gt/suffixerator/main.nf index 928df9568ccd..b1989bf48e0a 100644 --- a/modules/nf-core/gt/suffixerator/main.nf +++ b/modules/nf-core/gt/suffixerator/main.nf @@ -13,7 +13,7 @@ process GT_SUFFIXERATOR { output: tuple val(meta), path("$prefix"), emit: index - tuple val("${task.process}"), val('genometools'), eval("gt --version | sed '1!d;s/gt (GenomeTools) //'"), emit: versions_gt, topic: versions + tuple val("${task.process}"), val('genometools'), eval("gt --version | sed '1!d;s/.* //'"), emit: versions_gt, topic: versions when: task.ext.when == null || task.ext.when From d3cc130b2d4c15a1fd7decd2bc6094274805a074 Mon Sep 17 00:00:00 2001 From: louis Date: Mon, 18 May 2026 16:02:54 +0200 Subject: [PATCH 11/11] Fix metas --- modules/nf-core/gt/gff3/meta.yml | 4 ++-- modules/nf-core/gt/gff3validator/meta.yml | 4 ++-- modules/nf-core/gt/ltrharvest/meta.yml | 4 ++-- modules/nf-core/gt/stat/meta.yml | 4 ++-- modules/nf-core/gt/suffixerator/meta.yml | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/nf-core/gt/gff3/meta.yml b/modules/nf-core/gt/gff3/meta.yml index 45daf01f249f..356a0605a81f 100644 --- a/modules/nf-core/gt/gff3/meta.yml +++ b/modules/nf-core/gt/gff3/meta.yml @@ -56,7 +56,7 @@ output: - genometools: type: string description: The name of the tool - - gt --version | sed '1!d;s/gt (GenomeTools) //': + - gt --version | sed '1!d;s/.* //': type: eval description: The expression to obtain the version of the tool topics: @@ -67,7 +67,7 @@ topics: - genometools: type: string description: The name of the tool - - gt --version | sed '1!d;s/gt (GenomeTools) //': + - gt --version | sed '1!d;s/.* //': type: eval description: The expression to obtain the version of the tool authors: diff --git a/modules/nf-core/gt/gff3validator/meta.yml b/modules/nf-core/gt/gff3validator/meta.yml index caefa16470a5..04da78e14c01 100644 --- a/modules/nf-core/gt/gff3validator/meta.yml +++ b/modules/nf-core/gt/gff3validator/meta.yml @@ -57,7 +57,7 @@ output: - genometools: type: string description: The name of the tool - - gt --version | sed '1!d;s/gt (GenomeTools) //': + - gt --version | sed '1!d;s/.* //': type: eval description: The expression to obtain the version of the tool topics: @@ -68,7 +68,7 @@ topics: - genometools: type: string description: The name of the tool - - gt --version | sed '1!d;s/gt (GenomeTools) //': + - gt --version | sed '1!d;s/.* //': type: eval description: The expression to obtain the version of the tool authors: diff --git a/modules/nf-core/gt/ltrharvest/meta.yml b/modules/nf-core/gt/ltrharvest/meta.yml index 5a561a9d62af..2a007f962083 100644 --- a/modules/nf-core/gt/ltrharvest/meta.yml +++ b/modules/nf-core/gt/ltrharvest/meta.yml @@ -81,7 +81,7 @@ output: - genometools: type: string description: The name of the tool - - gt --version | sed '1!d;s/gt (GenomeTools) //': + - gt --version | sed '1!d;s/.* //': type: eval description: The expression to obtain the version of the tool topics: @@ -92,7 +92,7 @@ topics: - genometools: type: string description: The name of the tool - - gt --version | sed '1!d;s/gt (GenomeTools) //': + - gt --version | sed '1!d;s/.* //': type: eval description: The expression to obtain the version of the tool authors: diff --git a/modules/nf-core/gt/stat/meta.yml b/modules/nf-core/gt/stat/meta.yml index 98eacc527a63..c233fd50072a 100644 --- a/modules/nf-core/gt/stat/meta.yml +++ b/modules/nf-core/gt/stat/meta.yml @@ -49,7 +49,7 @@ output: - genometools: type: string description: The name of the tool - - gt --version | sed '1!d;s/gt (GenomeTools) //': + - gt --version | sed '1!d;s/.* //': type: eval description: The expression to obtain the version of the tool topics: @@ -60,7 +60,7 @@ topics: - genometools: type: string description: The name of the tool - - gt --version | sed '1!d;s/gt (GenomeTools) //': + - gt --version | sed '1!d;s/.* //': type: eval description: The expression to obtain the version of the tool authors: diff --git a/modules/nf-core/gt/suffixerator/meta.yml b/modules/nf-core/gt/suffixerator/meta.yml index ca451fb570ca..78357c2f5ac2 100644 --- a/modules/nf-core/gt/suffixerator/meta.yml +++ b/modules/nf-core/gt/suffixerator/meta.yml @@ -48,7 +48,7 @@ output: - genometools: type: string description: The name of the tool - - gt --version | sed '1!d;s/gt (GenomeTools) //': + - gt --version | sed '1!d;s/.* //': type: eval description: The expression to obtain the version of the tool topics: @@ -59,7 +59,7 @@ topics: - genometools: type: string description: The name of the tool - - gt --version | sed '1!d;s/gt (GenomeTools) //': + - gt --version | sed '1!d;s/.* //': type: eval description: The expression to obtain the version of the tool authors: