diff --git a/modules/nf-core/trinity/main.nf b/modules/nf-core/trinity/main.nf index 2247490db9e6..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 - path "versions.yml" , emit: versions + 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 @@ -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/meta.yml b/modules/nf-core/trinity/meta.yml index 07aa0dc86bd3..912a4e707a0a 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" diff --git a/modules/nf-core/trinity/tests/main.nf.test b/modules/nf-core/trinity/tests/main.nf.test index 8717518bd878..02c8a0c89f05 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() } ) @@ -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() } ) } } diff --git a/modules/nf-core/trinity/tests/main.nf.test.snap b/modules/nf-core/trinity/tests/main.nf.test.snap index 0166315badf3..4c25527748c7 100644 --- a/modules/nf-core/trinity/tests/main.nf.test.snap +++ b/modules/nf-core/trinity/tests/main.nf.test.snap @@ -1,103 +1,92 @@ { "homo_sapiens-test_rnaseq-paired-multiple": { "content": [ - [ - "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:08:11.163901364" + "timestamp": "2025-10-28T13:22:02.72961086" }, "homo_sapiens-test_rnaseq-single": { "content": [ - [ - "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:07:10.975441404" + "timestamp": "2025-10-28T13:21:13.836913087" }, "homo_sapiens-test_rnaseq-paired": { "content": [ - [ - "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:06:36.470824201" + "timestamp": "2025-10-28T13:20:45.185841704" }, "homo_sapiens-test_rnaseq-single-multiple": { "content": [ - [ - "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:08:54.36318984" + "timestamp": "2025-10-28T13:22:38.810477312" }, "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": [ - "versions.yml:md5,1c631aefa156e739b773679c471467c1" - ], - "log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "transcript_fasta": [ + "versions_trinity": [ [ - { - "id": "test", - "single_end": false - }, - "test.fa.gz:md5,d41d8cd98f00b204e9800998ecf8427e" + "TRINITY", + "trinity", + "2.15.2" ] - ], - "versions": [ - "versions.yml:md5,1c631aefa156e739b773679c471467c1" ] } ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nextflow": "25.04.6" }, - "timestamp": "2024-11-28T14:09:00.571900709" + "timestamp": "2025-10-28T13:49:50.612026008" } -} +} \ No newline at end of file