From f7b6828623425a8ada6bfee3cebc169ff18c6d44 Mon Sep 17 00:00:00 2001 From: Max Cummins Date: Tue, 28 Oct 2025 13:13:45 +0000 Subject: [PATCH 1/7] add versions topic to trinity module --- modules/nf-core/trinity/main.nf | 12 +--- .../nf-core/trinity/tests/main.nf.test.snap | 60 ++++++++----------- 2 files changed, 27 insertions(+), 45 deletions(-) diff --git a/modules/nf-core/trinity/main.nf b/modules/nf-core/trinity/main.nf index 2247490db9e6..078740621257 100644 --- a/modules/nf-core/trinity/main.nf +++ b/modules/nf-core/trinity/main.nf @@ -14,7 +14,7 @@ process TRINITY { output: tuple val(meta), path("*.fa.gz") , emit: transcript_fasta tuple val(meta), path("*.log") , emit: log - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('trinity'), eval("Trinity --version | grep 'Trinity version:' | sed 's/Trinity version: Trinity-v//'"), topic: versions, emit: versions_trinity when: task.ext.when == null || task.ext.when @@ -61,11 +61,6 @@ process TRINITY { > ${prefix}.fa.gz rm ${prefix}_trinity.Trinity.fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - trinity: \$(Trinity --version | grep 'Trinity version:' | sed 's/Trinity version: Trinity-//') - END_VERSIONS """ stub: @@ -74,10 +69,5 @@ process TRINITY { touch ${prefix}.fa gzip ${prefix}.fa touch ${prefix}.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - trinity: \$(Trinity --version | grep 'Trinity version:' | sed 's/Trinity version: Trinity-//') - END_VERSIONS """ } diff --git a/modules/nf-core/trinity/tests/main.nf.test.snap b/modules/nf-core/trinity/tests/main.nf.test.snap index 0166315badf3..929e1ca5fc0e 100644 --- a/modules/nf-core/trinity/tests/main.nf.test.snap +++ b/modules/nf-core/trinity/tests/main.nf.test.snap @@ -1,51 +1,35 @@ { "homo_sapiens-test_rnaseq-paired-multiple": { - "content": [ - [ - "versions.yml:md5,1c631aefa156e739b773679c471467c1" - ] - ], + "content": null, "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nextflow": "25.04.6" }, - "timestamp": "2024-11-28T14:08:11.163901364" + "timestamp": "2025-10-28T11:03:10.410785664" }, "homo_sapiens-test_rnaseq-single": { - "content": [ - [ - "versions.yml:md5,1c631aefa156e739b773679c471467c1" - ] - ], + "content": null, "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nextflow": "25.04.6" }, - "timestamp": "2024-11-28T14:07:10.975441404" + "timestamp": "2025-10-28T11:00:59.632497408" }, "homo_sapiens-test_rnaseq-paired": { - "content": [ - [ - "versions.yml:md5,1c631aefa156e739b773679c471467c1" - ] - ], + "content": null, "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nextflow": "25.04.6" }, - "timestamp": "2024-11-28T14:06:36.470824201" + "timestamp": "2025-10-28T11:00:54.859699064" }, "homo_sapiens-test_rnaseq-single-multiple": { - "content": [ - [ - "versions.yml:md5,1c631aefa156e739b773679c471467c1" - ] - ], + "content": null, "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nextflow": "25.04.6" }, - "timestamp": "2024-11-28T14:08:54.36318984" + "timestamp": "2025-10-28T11:03:46.654707739" }, "homo_sapiens-test_rnaseq-stub": { "content": [ @@ -69,7 +53,11 @@ ] ], "2": [ - "versions.yml:md5,1c631aefa156e739b773679c471467c1" + [ + "TRINITY", + "trinity", + "2.15.2" + ] ], "log": [ [ @@ -89,15 +77,19 @@ "test.fa.gz:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,1c631aefa156e739b773679c471467c1" + "versions_trinity": [ + [ + "TRINITY", + "trinity", + "2.15.2" + ] ] } ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nextflow": "25.04.6" }, - "timestamp": "2024-11-28T14:09:00.571900709" + "timestamp": "2025-10-28T12:05:29.82401984" } -} +} \ No newline at end of file From 87f28c5c244c79e80ba29b32af92de385b39514b Mon Sep 17 00:00:00 2001 From: Max Cummins Date: Tue, 28 Oct 2025 13:28:39 +0000 Subject: [PATCH 2/7] add missing test for main.nf.test --- modules/nf-core/trinity/tests/main.nf.test | 8 +-- .../nf-core/trinity/tests/main.nf.test.snap | 56 ++++++++++++++++--- 2 files changed, 52 insertions(+), 12 deletions(-) diff --git a/modules/nf-core/trinity/tests/main.nf.test b/modules/nf-core/trinity/tests/main.nf.test index 8717518bd878..87635fda4e16 100644 --- a/modules/nf-core/trinity/tests/main.nf.test +++ b/modules/nf-core/trinity/tests/main.nf.test @@ -30,7 +30,7 @@ nextflow_process { { assert path(process.out.log[0][1]).text.contains("All commands completed successfully.") }, { assert path(process.out.transcript_fasta[0][1]).linesGzip.toString().contains(">TRINITY_DN7_c0_g1_i1 len=299 path=[0:0-151 2:152-298]") }, { assert snapshot( - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) @@ -57,7 +57,7 @@ nextflow_process { { assert path(process.out.log[0][1]).text.contains("All commands completed successfully.") }, { assert path(process.out.transcript_fasta[0][1]).linesGzip.toString().contains(">TRINITY_DN10_c0_g1_i1 len=534 path=[0:0-533]") }, { assert snapshot( - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match() }, ) @@ -87,7 +87,7 @@ nextflow_process { { assert path(process.out.log[0][1]).text.contains("All commands completed successfully.") }, { assert path(process.out.transcript_fasta[0][1]).linesGzip.toString().contains(">TRINITY_DN12_c0_g1_i1 len=225 path=[0:0-224]") }, { assert snapshot( - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } @@ -116,7 +116,7 @@ nextflow_process { { assert path(process.out.log[0][1]).text.contains("All commands completed successfully.") }, { assert path(process.out.transcript_fasta[0][1]).linesGzip.toString().contains(">TRINITY_DN12_c0_g1_i1 len=268 path=[0:0-267]") }, { assert snapshot( - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) diff --git a/modules/nf-core/trinity/tests/main.nf.test.snap b/modules/nf-core/trinity/tests/main.nf.test.snap index 929e1ca5fc0e..5a131402d183 100644 --- a/modules/nf-core/trinity/tests/main.nf.test.snap +++ b/modules/nf-core/trinity/tests/main.nf.test.snap @@ -1,35 +1,75 @@ { "homo_sapiens-test_rnaseq-paired-multiple": { - "content": null, + "content": [ + { + "versions_trinity": [ + [ + "TRINITY", + "trinity", + "2.15.2" + ] + ] + } + ], "meta": { "nf-test": "0.9.2", "nextflow": "25.04.6" }, - "timestamp": "2025-10-28T11:03:10.410785664" + "timestamp": "2025-10-28T13:22:02.72961086" }, "homo_sapiens-test_rnaseq-single": { - "content": null, + "content": [ + { + "versions_trinity": [ + [ + "TRINITY", + "trinity", + "2.15.2" + ] + ] + } + ], "meta": { "nf-test": "0.9.2", "nextflow": "25.04.6" }, - "timestamp": "2025-10-28T11:00:59.632497408" + "timestamp": "2025-10-28T13:21:13.836913087" }, "homo_sapiens-test_rnaseq-paired": { - "content": null, + "content": [ + { + "versions_trinity": [ + [ + "TRINITY", + "trinity", + "2.15.2" + ] + ] + } + ], "meta": { "nf-test": "0.9.2", "nextflow": "25.04.6" }, - "timestamp": "2025-10-28T11:00:54.859699064" + "timestamp": "2025-10-28T13:20:45.185841704" }, "homo_sapiens-test_rnaseq-single-multiple": { - "content": null, + "content": [ + { + "versions_trinity": [ + [ + "TRINITY", + "trinity", + "2.15.2" + ] + ] + } + ], "meta": { "nf-test": "0.9.2", "nextflow": "25.04.6" }, - "timestamp": "2025-10-28T11:03:46.654707739" + "timestamp": "2025-10-28T13:22:38.810477312" }, "homo_sapiens-test_rnaseq-stub": { "content": [ From 72a677f0f2ebc7a22fccdf5527900ff5ce99f9d0 Mon Sep 17 00:00:00 2001 From: Max Cummins Date: Tue, 28 Oct 2025 13:51:26 +0000 Subject: [PATCH 3/7] simplify string replacement for trinity version eval to remove use of colons - avoids potential yml clash --- modules/nf-core/trinity/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/trinity/main.nf b/modules/nf-core/trinity/main.nf index 078740621257..3ac485867eee 100644 --- a/modules/nf-core/trinity/main.nf +++ b/modules/nf-core/trinity/main.nf @@ -14,7 +14,7 @@ process TRINITY { output: tuple val(meta), path("*.fa.gz") , emit: transcript_fasta tuple val(meta), path("*.log") , emit: log - tuple val("${task.process}"), val('trinity'), eval("Trinity --version | grep 'Trinity version:' | sed 's/Trinity version: Trinity-v//'"), topic: versions, emit: versions_trinity + tuple val("${task.process}"), val('trinity'), eval("Trinity --version | grep 'Trinity version' | sed 's/.*Trinity-v//'"), topic: versions, emit: versions_trinity when: task.ext.when == null || task.ext.when From 104e308eae7f109bd5a59bb9acff15000f08da91 Mon Sep 17 00:00:00 2001 From: Max Cummins Date: Tue, 28 Oct 2025 13:53:56 +0000 Subject: [PATCH 4/7] update meta.yml to capture new version topics change --- modules/nf-core/trinity/meta.yml | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/modules/nf-core/trinity/meta.yml b/modules/nf-core/trinity/meta.yml index 07aa0dc86bd3..5fb61537bea0 100644 --- a/modules/nf-core/trinity/meta.yml +++ b/modules/nf-core/trinity/meta.yml @@ -51,13 +51,27 @@ output: description: Log from trinity pattern: "*.log" ontologies: [] - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + versions_trinity: + - - ${task.process}: + type: string + description: The process the versions were collected from + - trinity: + type: string + description: The tool name + - Trinity --version | grep 'Trinity version' | sed 's/.*Trinity-v//': + type: string + description: The command used to generate the version of the tool +topics: + - versions: + - - process: + type: string + description: The process the versions were collected from + - tool: + type: string + description: The tool name + - version: + type: string + description: The version of the tool authors: - "@timslittle" - "@gallvp" From 2ec0f0f1192aa6a2aaa16c51535dd9750de17a3d Mon Sep 17 00:00:00 2001 From: Max Cummins Date: Tue, 28 Oct 2025 13:55:33 +0000 Subject: [PATCH 5/7] add new test for aggregating versions via topic --- modules/nf-core/trinity/tests/main.nf.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/trinity/tests/main.nf.test b/modules/nf-core/trinity/tests/main.nf.test index 87635fda4e16..02c8a0c89f05 100644 --- a/modules/nf-core/trinity/tests/main.nf.test +++ b/modules/nf-core/trinity/tests/main.nf.test @@ -144,7 +144,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match() } ) } } From ff7158edf253656baf304d6664afa2ed52470174 Mon Sep 17 00:00:00 2001 From: Max Cummins Date: Tue, 28 Oct 2025 13:55:59 +0000 Subject: [PATCH 6/7] update snapshot for new tests --- .../nf-core/trinity/tests/main.nf.test.snap | 45 +------------------ 1 file changed, 1 insertion(+), 44 deletions(-) diff --git a/modules/nf-core/trinity/tests/main.nf.test.snap b/modules/nf-core/trinity/tests/main.nf.test.snap index 5a131402d183..4c25527748c7 100644 --- a/modules/nf-core/trinity/tests/main.nf.test.snap +++ b/modules/nf-core/trinity/tests/main.nf.test.snap @@ -74,49 +74,6 @@ "homo_sapiens-test_rnaseq-stub": { "content": [ { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fa.gz:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - "TRINITY", - "trinity", - "2.15.2" - ] - ], - "log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "transcript_fasta": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fa.gz:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], "versions_trinity": [ [ "TRINITY", @@ -130,6 +87,6 @@ "nf-test": "0.9.2", "nextflow": "25.04.6" }, - "timestamp": "2025-10-28T12:05:29.82401984" + "timestamp": "2025-10-28T13:49:50.612026008" } } \ No newline at end of file From b53a6d87c1e417c5780d9a9ca5f438dcc04ecac9 Mon Sep 17 00:00:00 2001 From: eit-maxlcummins Date: Tue, 28 Oct 2025 16:09:24 +0100 Subject: [PATCH 7/7] Update modules/nf-core/trinity/meta.yml remove leading space Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> --- modules/nf-core/trinity/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/trinity/meta.yml b/modules/nf-core/trinity/meta.yml index 5fb61537bea0..912a4e707a0a 100644 --- a/modules/nf-core/trinity/meta.yml +++ b/modules/nf-core/trinity/meta.yml @@ -58,7 +58,7 @@ output: - trinity: type: string description: The tool name - - Trinity --version | grep 'Trinity version' | sed 's/.*Trinity-v//': + - Trinity --version | grep 'Trinity version' | sed 's/.*Trinity-v//': type: string description: The command used to generate the version of the tool topics: