Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions modules/nf-core/trinity/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
"""
}
28 changes: 21 additions & 7 deletions modules/nf-core/trinity/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 5 additions & 5 deletions modules/nf-core/trinity/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
)
Expand All @@ -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()
},
)
Expand Down Expand Up @@ -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()
}

Expand Down Expand Up @@ -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()
}
)
Expand Down Expand Up @@ -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() }
)
}
}
Expand Down
113 changes: 51 additions & 62 deletions modules/nf-core/trinity/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -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"
}
}
}