From e12d10fa6aecd4eed7e79696aebb4f427f5b699a Mon Sep 17 00:00:00 2001 From: Max Cummins Date: Thu, 22 Jan 2026 14:36:55 +0000 Subject: [PATCH] migrate toulligqc to topic versions --- modules/nf-core/toulligqc/main.nf | 12 +-- modules/nf-core/toulligqc/meta.yml | 27 ++++-- modules/nf-core/toulligqc/tests/main.nf.test | 10 +-- .../nf-core/toulligqc/tests/main.nf.test.snap | 90 ++++++++++++------- 4 files changed, 87 insertions(+), 52 deletions(-) diff --git a/modules/nf-core/toulligqc/main.nf b/modules/nf-core/toulligqc/main.nf index c50d750d6b41..924add225f41 100644 --- a/modules/nf-core/toulligqc/main.nf +++ b/modules/nf-core/toulligqc/main.nf @@ -17,7 +17,7 @@ process TOULLIGQC { tuple val(meta), path("*/*.html") , emit: report_html, optional: true tuple val(meta), path("*/images/*.html") , emit: plots_html tuple val(meta), path("*/images/plotly.min.js") , emit: plotly_js - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('toulligqc'), eval('toulligqc --version'), emit: versions_toulligqc, topic: versions when: task.ext.when == null || task.ext.when @@ -35,11 +35,6 @@ process TOULLIGQC { $input_file \\ --output-directory ${prefix} \\ $args - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - toulligqc: \$(toulligqc --version) - END_VERSIONS """ stub: @@ -54,10 +49,5 @@ process TOULLIGQC { touch ${prefix}/images/PHRED_score_density_distribution.html touch ${prefix}/images/Read_count_histogram.html touch ${prefix}/images/plotly.min.js - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - toulligqc: \$(toulligqc --version) - END_VERSIONS """ } diff --git a/modules/nf-core/toulligqc/meta.yml b/modules/nf-core/toulligqc/meta.yml index 92c1d7e93c24..651c4516dd52 100644 --- a/modules/nf-core/toulligqc/meta.yml +++ b/modules/nf-core/toulligqc/meta.yml @@ -71,13 +71,28 @@ output: description: Plots emitted from toulligqc pattern: "plotly.min.js" ontologies: [] + versions_toulligqc: + - - ${task.process}: + type: string + description: Name of the process + - toulligqc: + type: string + description: Name of the tool + - toulligqc --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: Name of the process + - toulligqc: + type: string + description: Name of the tool + - toulligqc --version: + type: eval + description: The expression to obtain the version of the tool authors: - "@Salome-Brunon" maintainers: diff --git a/modules/nf-core/toulligqc/tests/main.nf.test b/modules/nf-core/toulligqc/tests/main.nf.test index 8984ebf8b361..7ea194e0f05e 100644 --- a/modules/nf-core/toulligqc/tests/main.nf.test +++ b/modules/nf-core/toulligqc/tests/main.nf.test @@ -23,7 +23,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.versions).match("toulligqc_versions_sequencing_summary") }, + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match("toulligqc_versions_sequencing_summary") }, { assert snapshot(file(process.out.report_data.get(0).get(1)).readLines()[11..74]).match() }, { assert process.out.report_html[0][1] ==~ ".*/report.html"} ) @@ -47,7 +47,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.versions).match("toulligqc_versions_sequencing_summary_barcodes") }, + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match("toulligqc_versions_sequencing_summary_barcodes") }, { assert snapshot(file(process.out.report_data.get(0).get(1)).readLines()[11..74]).match() }, { assert process.out.report_html[0][1] ==~ ".*/report.html"} ) @@ -70,7 +70,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.versions).match("toulligqc_versions_fastq") }, + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match("toulligqc_versions_fastq") }, { assert snapshot(file(process.out.report_data.get(0).get(1)).readLines()[11..67]).match() }, { assert process.out.report_html[0][1] ==~ ".*/report.html"} ) @@ -93,7 +93,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.versions).match("toulligqc_versions_bam") }, + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match("toulligqc_versions_bam") }, { assert snapshot(file(process.out.report_data.get(0).get(1)).readLines()[11..74]).match() }, { assert process.out.report_html[0][1] ==~ ".*/report.html"} ) @@ -118,7 +118,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.versions).match("toulligqc_versions_stub") } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match("toulligqc_versions_stub") } ) } } diff --git a/modules/nf-core/toulligqc/tests/main.nf.test.snap b/modules/nf-core/toulligqc/tests/main.nf.test.snap index 551da3df6e5e..14256e4a189d 100644 --- a/modules/nf-core/toulligqc/tests/main.nf.test.snap +++ b/modules/nf-core/toulligqc/tests/main.nf.test.snap @@ -76,15 +76,21 @@ }, "toulligqc_versions_sequencing_summary_barcodes": { "content": [ - [ - "versions.yml:md5,cf868ab645663c8e30396b733d9fdd30" - ] + { + "versions_toulligqc": [ + [ + "TOULLIGQC", + "toulligqc", + "2.7.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-04T13:34:41.406227395" + "timestamp": "2026-01-22T14:29:55.724424127" }, "sarscov2 - nanopore sequencing_summary + barcodes": { "content": [ @@ -163,15 +169,21 @@ }, "toulligqc_versions_bam": { "content": [ - [ - "versions.yml:md5,cf868ab645663c8e30396b733d9fdd30" - ] + { + "versions_toulligqc": [ + [ + "TOULLIGQC", + "toulligqc", + "2.7.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-04T13:36:09.017460415" + "timestamp": "2026-01-22T14:30:18.794347511" }, "sarscov2 - nanopore bam": { "content": [ @@ -250,39 +262,57 @@ }, "toulligqc_versions_stub": { "content": [ - [ - "versions.yml:md5,cf868ab645663c8e30396b733d9fdd30" - ] + { + "versions_toulligqc": [ + [ + "TOULLIGQC", + "toulligqc", + "2.7.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-04T13:37:17.104275439" + "timestamp": "2026-01-22T14:30:26.839592056" }, "toulligqc_versions_fastq": { "content": [ - [ - "versions.yml:md5,cf868ab645663c8e30396b733d9fdd30" - ] + { + "versions_toulligqc": [ + [ + "TOULLIGQC", + "toulligqc", + "2.7.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-04T13:35:56.755396126" + "timestamp": "2026-01-22T14:30:07.213424763" }, "toulligqc_versions_sequencing_summary": { "content": [ - [ - "versions.yml:md5,cf868ab645663c8e30396b733d9fdd30" - ] + { + "versions_toulligqc": [ + [ + "TOULLIGQC", + "toulligqc", + "2.7.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-04T13:34:26.320114673" + "timestamp": "2026-01-22T14:29:44.055859712" }, "sarscov2 - nanopore fastq": { "content": [