From f20472f8b57635a43a4a190a9a22febd5cc9beb5 Mon Sep 17 00:00:00 2001 From: khersameesh24 Date: Fri, 28 Nov 2025 12:41:27 +0100 Subject: [PATCH 1/4] added modules for td2.longorfs & td2.predict --- modules/nf-core/td2/longorfs/environment.yml | 5 + modules/nf-core/td2/longorfs/main.nf | 51 ++++++++++ modules/nf-core/td2/longorfs/meta.yml | 54 ++++++++++ .../nf-core/td2/longorfs/tests/main.nf.test | 64 ++++++++++++ .../td2/longorfs/tests/main.nf.test.snap | 94 ++++++++++++++++++ modules/nf-core/td2/predict/environment.yml | 5 + modules/nf-core/td2/predict/main.nf | 55 +++++++++++ modules/nf-core/td2/predict/meta.yml | 58 +++++++++++ .../nf-core/td2/predict/tests/main.nf.test | 79 +++++++++++++++ .../td2/predict/tests/main.nf.test.snap | 98 +++++++++++++++++++ 10 files changed, 563 insertions(+) create mode 100644 modules/nf-core/td2/longorfs/environment.yml create mode 100644 modules/nf-core/td2/longorfs/main.nf create mode 100644 modules/nf-core/td2/longorfs/meta.yml create mode 100644 modules/nf-core/td2/longorfs/tests/main.nf.test create mode 100644 modules/nf-core/td2/longorfs/tests/main.nf.test.snap create mode 100644 modules/nf-core/td2/predict/environment.yml create mode 100644 modules/nf-core/td2/predict/main.nf create mode 100644 modules/nf-core/td2/predict/meta.yml create mode 100644 modules/nf-core/td2/predict/tests/main.nf.test create mode 100644 modules/nf-core/td2/predict/tests/main.nf.test.snap diff --git a/modules/nf-core/td2/longorfs/environment.yml b/modules/nf-core/td2/longorfs/environment.yml new file mode 100644 index 00000000000..db97153a88d --- /dev/null +++ b/modules/nf-core/td2/longorfs/environment.yml @@ -0,0 +1,5 @@ +channels: + - conda-forge + - bioconda +dependencies: + - "bioconda::td2=1.0.6" diff --git a/modules/nf-core/td2/longorfs/main.nf b/modules/nf-core/td2/longorfs/main.nf new file mode 100644 index 00000000000..150f60fe26c --- /dev/null +++ b/modules/nf-core/td2/longorfs/main.nf @@ -0,0 +1,51 @@ +process TD2_LONGORFS { + tag "$meta.id" + label 'process_medium' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/41/4155bf3b720e1e32d0615a947696fb0287ee4e8cdbeb4ec784dd4da7bb5b2e86/data': + "community.wave.seqera.io/library/td2:1.0.6--ea3e5ac09443b677"}" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path("${prefix}/longest_orfs.{cds,gff3,pep}"), emit: orfs + path("versions.yml") , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + + """ + TD2.LongOrfs \\ + -t ${fasta} \\ + -O ${prefix} \\ + --threads ${task.cpus} \\ + ${args} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + td2: \$(td2 v1.0.6) + END_VERSIONS + """ + + stub: + prefix = task.ext.prefix ?: "${meta.id}" + + """ + mkdir -p ${prefix}/ + touch ${prefix}/longest_orfs.cds + touch ${prefix}/longest_orfs.gff3 + touch ${prefix}/longest_orfs.pep + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + td2: \$(td2 v1.0.6) + END_VERSIONS + """ +} diff --git a/modules/nf-core/td2/longorfs/meta.yml b/modules/nf-core/td2/longorfs/meta.yml new file mode 100644 index 00000000000..a5bd0318050 --- /dev/null +++ b/modules/nf-core/td2/longorfs/meta.yml @@ -0,0 +1,54 @@ +name: "td2_longorfs" +description: TD2 identifies candidate coding regions within transcript + sequences, such as those generated by de novo RNA-Seq transcript assembly +keywords: + - td2 + - orfs + - longorfs + - transcripts +tools: + - td2: + description: "TD2 identifies candidate coding regions within transcript sequences, + such as those generated by de novo RNA-Seq transcript assembly" + homepage: "https://github.com/Markusjsommer/TD2" + documentation: "https://github.com/Markusjsommer/TD2" + tool_dev_url: "https://github.com/Markusjsommer/TD2" + licence: ["MIT"] + identifier: "" + +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1' ]` + - fasta: + type: file + description: Fasta file containing the target transcript sequences + pattern: "*.{fasta}" + ontologies: [] +output: + orfs: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1' ]` + - ${prefix}/longest_orfs.{cds,gff3,pep}: + type: file + description: Files containing the longest ORFs predicted from the input + transcript sequences + pattern: "${prefix}/longest_orfs.{cds,gff3,pep}" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: "http://edamontology.org/format_3750" # YAML + +authors: + - "@khersameesh24" +maintainers: + - "@khersameesh24" diff --git a/modules/nf-core/td2/longorfs/tests/main.nf.test b/modules/nf-core/td2/longorfs/tests/main.nf.test new file mode 100644 index 00000000000..6573d4c5998 --- /dev/null +++ b/modules/nf-core/td2/longorfs/tests/main.nf.test @@ -0,0 +1,64 @@ +nextflow_process { + + name "Test Process TD2_LONGORFS" + script "../main.nf" + process "TD2_LONGORFS" + + tag "modules" + tag "modules_nfcore" + tag "td2" + tag "td2/longorfs" + + test("td2.longorfs - transcriptome.fasta") { + + when { + process { + """ + input[0] = [ + [ id:'test_td2_longorfs' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/transcriptome.fasta', checkIfExists: true), + ] + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot( + process.out, + path(process.out.versions[0]).yaml + ).match() } + ) + } + + } + + test("td2.longorfs - transcriptome.fasta -stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test_td2_longorfs' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/transcriptome.fasta', checkIfExists: true), + ] + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot( + process.out, + path(process.out.versions[0]).yaml + ).match() } + ) + } + + } + +} diff --git a/modules/nf-core/td2/longorfs/tests/main.nf.test.snap b/modules/nf-core/td2/longorfs/tests/main.nf.test.snap new file mode 100644 index 00000000000..3203bb43603 --- /dev/null +++ b/modules/nf-core/td2/longorfs/tests/main.nf.test.snap @@ -0,0 +1,94 @@ +{ + "td2.longorfs - transcriptome.fasta": { + "content": [ + { + "0": [ + [ + { + "id": "test_td2_longorfs" + }, + [ + "longest_orfs.cds:md5,4226fe196a4527f938e25061ffe7eaf6", + "longest_orfs.gff3:md5,864ae9147b65d07eb9d79c0e42968e12", + "longest_orfs.pep:md5,0151dac6998be924139a4f5a5a0c590b" + ] + ] + ], + "1": [ + "versions.yml:md5,0856a2e8d28b454f9c3a768cd3451f1a" + ], + "orfs": [ + [ + { + "id": "test_td2_longorfs" + }, + [ + "longest_orfs.cds:md5,4226fe196a4527f938e25061ffe7eaf6", + "longest_orfs.gff3:md5,864ae9147b65d07eb9d79c0e42968e12", + "longest_orfs.pep:md5,0151dac6998be924139a4f5a5a0c590b" + ] + ] + ], + "versions": [ + "versions.yml:md5,0856a2e8d28b454f9c3a768cd3451f1a" + ] + }, + { + "TD2_LONGORFS": { + "td2": null + } + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.0" + }, + "timestamp": "2025-11-27T09:33:10.428948889" + }, + "td2.longorfs - transcriptome.fasta -stub": { + "content": [ + { + "0": [ + [ + { + "id": "test_td2_longorfs" + }, + [ + "longest_orfs.cds:md5,d41d8cd98f00b204e9800998ecf8427e", + "longest_orfs.gff3:md5,d41d8cd98f00b204e9800998ecf8427e", + "longest_orfs.pep:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + "versions.yml:md5,0856a2e8d28b454f9c3a768cd3451f1a" + ], + "orfs": [ + [ + { + "id": "test_td2_longorfs" + }, + [ + "longest_orfs.cds:md5,d41d8cd98f00b204e9800998ecf8427e", + "longest_orfs.gff3:md5,d41d8cd98f00b204e9800998ecf8427e", + "longest_orfs.pep:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions": [ + "versions.yml:md5,0856a2e8d28b454f9c3a768cd3451f1a" + ] + }, + { + "TD2_LONGORFS": { + "td2": null + } + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.0" + }, + "timestamp": "2025-11-27T09:35:15.301277063" + } +} \ No newline at end of file diff --git a/modules/nf-core/td2/predict/environment.yml b/modules/nf-core/td2/predict/environment.yml new file mode 100644 index 00000000000..db97153a88d --- /dev/null +++ b/modules/nf-core/td2/predict/environment.yml @@ -0,0 +1,5 @@ +channels: + - conda-forge + - bioconda +dependencies: + - "bioconda::td2=1.0.6" diff --git a/modules/nf-core/td2/predict/main.nf b/modules/nf-core/td2/predict/main.nf new file mode 100644 index 00000000000..866f06f6a96 --- /dev/null +++ b/modules/nf-core/td2/predict/main.nf @@ -0,0 +1,55 @@ +process TD2_PREDICT { + tag "$meta.id" + label 'process_medium' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/41/4155bf3b720e1e32d0615a947696fb0287ee4e8cdbeb4ec784dd4da7bb5b2e86/data': + "community.wave.seqera.io/library/td2:1.0.6--ea3e5ac09443b677"}" + + input: + tuple val(meta), path(fasta), path(orfs_dir, stageAs: 'orfs') + + output: + tuple val(meta), path("${prefix}/*.TD2.{bed,cds,gff3,pep}"), emit: predictions + path("versions.yml") , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + + """ + mkdir -p ${prefix}/ + + TD2.Predict \\ + -t ${fasta} \\ + -O ${orfs_dir} \\ + ${args} + + mv *.TD2.{bed,cds,gff3,pep} ${prefix}/ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + td2: \$(td2 v1.0.6) + END_VERSIONS + """ + + stub: + prefix = task.ext.prefix ?: "${meta.id}" + + """ + mkdir -p ${prefix}/ + touch ${prefix}/fakefile.TD2.bed + touch ${prefix}/fakefile.TD2.cds + touch ${prefix}/fakefile.TD2.gff3 + touch ${prefix}/fakefile.TD2.pep + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + td2: \$(td2 v1.0.6) + END_VERSIONS + """ +} diff --git a/modules/nf-core/td2/predict/meta.yml b/modules/nf-core/td2/predict/meta.yml new file mode 100644 index 00000000000..bdf8b0f6d3c --- /dev/null +++ b/modules/nf-core/td2/predict/meta.yml @@ -0,0 +1,58 @@ +name: "td2_predict" +description: TD2 identifies candidate coding regions within transcript + sequences, such as those generated by de novo RNA-Seq transcript assembly +keywords: + - predict + - orfs + - coding regions + - td2.predict +tools: + - "td2": + description: "TD2 identifies candidate coding regions within transcript sequences, + such as those generated by de novo RNA-Seq transcript assembly" + homepage: "https://github.com/Markusjsommer/TD2" + documentation: "https://github.com/Markusjsommer/TD2" + tool_dev_url: "https://github.com/Markusjsommer/TD2" + licence: ["MIT"] + identifier: "" + +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1' ]` + - fasta: + type: file + description: Transcripts fasta file + pattern: "*.{fasta}" + ontologies: [] + - orfs_dir: + type: file + description: Directory containing the ORF prediction files generated by the `td2_longorfs` module + pattern: "orfs_dir/" + ontologies: [] +output: + predictions: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1' ]` + - ${prefix}/*.TD2.{bed,cds,gff3,pep}: + type: file + description: Files containing the TD2 ORF predictions for the input transcript sequences + pattern: "${prefix}/*.TD2.{bed,cds,gff3,pep}" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: "http://edamontology.org/format_3750" # YAML + +authors: + - "@khersameesh24" +maintainers: + - "@khersameesh24" diff --git a/modules/nf-core/td2/predict/tests/main.nf.test b/modules/nf-core/td2/predict/tests/main.nf.test new file mode 100644 index 00000000000..06976812444 --- /dev/null +++ b/modules/nf-core/td2/predict/tests/main.nf.test @@ -0,0 +1,79 @@ +nextflow_process { + + name "Test Process TD2_PREDICT" + script "../main.nf" + process "TD2_PREDICT" + + tag "modules" + tag "modules_nfcore" + tag "td2" + tag "td2/longorfs" + tag "td2/predict" + + setup { + run("TD2_LONGORFS") { + script "modules/nf-core/td2/longorfs/main.nf" + process { + """ + input[0] = [ + [id:'test_td2_predict'], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + } + + test("td2.predict - transcriptome.fasta") { + + when { + process { + """ + input[0] = Channel.of([ + [id: 'test_td2_predict'], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ]).combine(TD2_LONGORFS.out.orfs.map{ meta, orfs -> return [meta, file(orfs[0].getParent())] }, by: 0) + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot( + process.out, + path(process.out.versions[0]).yaml + ).match() } + ) + } + + } + + test("td2.predict - transcriptome.fasta - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [id: 'test_td2_predict'], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ]).combine(TD2_LONGORFS.out.orfs.map{ meta, orfs -> return [meta, file(orfs[0].getParent())] }, by: 0) + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot( + process.out, + path(process.out.versions[0]).yaml + ).match() } + ) + } + + } + +} diff --git a/modules/nf-core/td2/predict/tests/main.nf.test.snap b/modules/nf-core/td2/predict/tests/main.nf.test.snap new file mode 100644 index 00000000000..d788b3e1ef6 --- /dev/null +++ b/modules/nf-core/td2/predict/tests/main.nf.test.snap @@ -0,0 +1,98 @@ +{ + "td2.predict - transcriptome.fasta": { + "content": [ + { + "0": [ + [ + { + "id": "test_td2_predict" + }, + [ + "genome.fasta.TD2.bed:md5,2504559bdf4e321bc0612573be0a1eb6", + "genome.fasta.TD2.cds:md5,e3f601c2ab4e9513b6577bbcdc19fda5", + "genome.fasta.TD2.gff3:md5,0e4fd0095da808937192caee48fe47d5", + "genome.fasta.TD2.pep:md5,390c241ee523756f3cd81b3cf2fa62ac" + ] + ] + ], + "1": [ + "versions.yml:md5,20f64996cc943420260fa0be53c2ff71" + ], + "predictions": [ + [ + { + "id": "test_td2_predict" + }, + [ + "genome.fasta.TD2.bed:md5,2504559bdf4e321bc0612573be0a1eb6", + "genome.fasta.TD2.cds:md5,e3f601c2ab4e9513b6577bbcdc19fda5", + "genome.fasta.TD2.gff3:md5,0e4fd0095da808937192caee48fe47d5", + "genome.fasta.TD2.pep:md5,390c241ee523756f3cd81b3cf2fa62ac" + ] + ] + ], + "versions": [ + "versions.yml:md5,20f64996cc943420260fa0be53c2ff71" + ] + }, + { + "TD2_PREDICT": { + "td2": null + } + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.0" + }, + "timestamp": "2025-11-28T12:34:19.705175228" + }, + "td2.predict - transcriptome.fasta - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test_td2_predict" + }, + [ + "fakefile.TD2.bed:md5,d41d8cd98f00b204e9800998ecf8427e", + "fakefile.TD2.cds:md5,d41d8cd98f00b204e9800998ecf8427e", + "fakefile.TD2.gff3:md5,d41d8cd98f00b204e9800998ecf8427e", + "fakefile.TD2.pep:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + "versions.yml:md5,20f64996cc943420260fa0be53c2ff71" + ], + "predictions": [ + [ + { + "id": "test_td2_predict" + }, + [ + "fakefile.TD2.bed:md5,d41d8cd98f00b204e9800998ecf8427e", + "fakefile.TD2.cds:md5,d41d8cd98f00b204e9800998ecf8427e", + "fakefile.TD2.gff3:md5,d41d8cd98f00b204e9800998ecf8427e", + "fakefile.TD2.pep:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions": [ + "versions.yml:md5,20f64996cc943420260fa0be53c2ff71" + ] + }, + { + "TD2_PREDICT": { + "td2": null + } + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.0" + }, + "timestamp": "2025-11-27T12:57:15.490423827" + } +} \ No newline at end of file From 74fea509012fa3c39bbae310a487db989e3b8810 Mon Sep 17 00:00:00 2001 From: khersameesh24 Date: Thu, 4 Dec 2025 21:39:04 +0100 Subject: [PATCH 2/4] changes to version handling, updated snaps, and tests - resolving comments --- modules/nf-core/td2/longorfs/main.nf | 14 +---- modules/nf-core/td2/longorfs/meta.yml | 18 +++--- .../nf-core/td2/longorfs/tests/main.nf.test | 4 +- .../td2/longorfs/tests/main.nf.test.snap | 56 +++++++++++++------ modules/nf-core/td2/predict/main.nf | 14 +---- modules/nf-core/td2/predict/meta.yml | 24 ++++---- .../nf-core/td2/predict/tests/main.nf.test | 4 +- .../td2/predict/tests/main.nf.test.snap | 56 +++++++++++++------ 8 files changed, 114 insertions(+), 76 deletions(-) diff --git a/modules/nf-core/td2/longorfs/main.nf b/modules/nf-core/td2/longorfs/main.nf index 150f60fe26c..bf6e9f389da 100644 --- a/modules/nf-core/td2/longorfs/main.nf +++ b/modules/nf-core/td2/longorfs/main.nf @@ -12,13 +12,14 @@ process TD2_LONGORFS { output: tuple val(meta), path("${prefix}/longest_orfs.{cds,gff3,pep}"), emit: orfs - path("versions.yml") , emit: versions + tuple val("${task.process}"), val('TD2.LongOrfs'), eval("echo td2: ${VERSION}"), emit: versions_td2, topic: versions when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' + VERSION = 'v1.0.6' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. prefix = task.ext.prefix ?: "${meta.id}" """ @@ -27,14 +28,10 @@ process TD2_LONGORFS { -O ${prefix} \\ --threads ${task.cpus} \\ ${args} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - td2: \$(td2 v1.0.6) - END_VERSIONS """ stub: + VERSION = 'v1.0.6' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. prefix = task.ext.prefix ?: "${meta.id}" """ @@ -42,10 +39,5 @@ process TD2_LONGORFS { touch ${prefix}/longest_orfs.cds touch ${prefix}/longest_orfs.gff3 touch ${prefix}/longest_orfs.pep - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - td2: \$(td2 v1.0.6) - END_VERSIONS """ } diff --git a/modules/nf-core/td2/longorfs/meta.yml b/modules/nf-core/td2/longorfs/meta.yml index a5bd0318050..183dfef9585 100644 --- a/modules/nf-core/td2/longorfs/meta.yml +++ b/modules/nf-core/td2/longorfs/meta.yml @@ -40,14 +40,16 @@ output: transcript sequences pattern: "${prefix}/longest_orfs.{cds,gff3,pep}" ontologies: [] - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: "http://edamontology.org/format_3750" # YAML - + versions_td2: + - - ${task.process}: + type: string + description: The process the versions were collected from + - TD2.LongOrfs: + type: string + description: The tool name + - "echo td2: ${VERSION}": + type: string + description: The version of TD2 used authors: - "@khersameesh24" maintainers: diff --git a/modules/nf-core/td2/longorfs/tests/main.nf.test b/modules/nf-core/td2/longorfs/tests/main.nf.test index 6573d4c5998..9f76f25c345 100644 --- a/modules/nf-core/td2/longorfs/tests/main.nf.test +++ b/modules/nf-core/td2/longorfs/tests/main.nf.test @@ -27,7 +27,7 @@ nextflow_process { assertAll( { assert snapshot( process.out, - path(process.out.versions[0]).yaml + process.out.findAll { key, val -> key.startsWith("versions")} ).match() } ) } @@ -54,7 +54,7 @@ nextflow_process { assertAll( { assert snapshot( process.out, - path(process.out.versions[0]).yaml + process.out.findAll { key, val -> key.startsWith("versions")} ).match() } ) } diff --git a/modules/nf-core/td2/longorfs/tests/main.nf.test.snap b/modules/nf-core/td2/longorfs/tests/main.nf.test.snap index 3203bb43603..aa8376128b7 100644 --- a/modules/nf-core/td2/longorfs/tests/main.nf.test.snap +++ b/modules/nf-core/td2/longorfs/tests/main.nf.test.snap @@ -15,7 +15,11 @@ ] ], "1": [ - "versions.yml:md5,0856a2e8d28b454f9c3a768cd3451f1a" + [ + "TD2_LONGORFS", + "TD2.LongOrfs", + "td2: v1.0.6" + ] ], "orfs": [ [ @@ -29,21 +33,29 @@ ] ] ], - "versions": [ - "versions.yml:md5,0856a2e8d28b454f9c3a768cd3451f1a" + "versions_td2": [ + [ + "TD2_LONGORFS", + "TD2.LongOrfs", + "td2: v1.0.6" + ] ] }, { - "TD2_LONGORFS": { - "td2": null - } + "versions_td2": [ + [ + "TD2_LONGORFS", + "TD2.LongOrfs", + "td2: v1.0.6" + ] + ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.0" + "nextflow": "25.10.2" }, - "timestamp": "2025-11-27T09:33:10.428948889" + "timestamp": "2025-12-04T21:11:35.499924547" }, "td2.longorfs - transcriptome.fasta -stub": { "content": [ @@ -61,7 +73,11 @@ ] ], "1": [ - "versions.yml:md5,0856a2e8d28b454f9c3a768cd3451f1a" + [ + "TD2_LONGORFS", + "TD2.LongOrfs", + "td2: v1.0.6" + ] ], "orfs": [ [ @@ -75,20 +91,28 @@ ] ] ], - "versions": [ - "versions.yml:md5,0856a2e8d28b454f9c3a768cd3451f1a" + "versions_td2": [ + [ + "TD2_LONGORFS", + "TD2.LongOrfs", + "td2: v1.0.6" + ] ] }, { - "TD2_LONGORFS": { - "td2": null - } + "versions_td2": [ + [ + "TD2_LONGORFS", + "TD2.LongOrfs", + "td2: v1.0.6" + ] + ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.0" + "nextflow": "25.10.2" }, - "timestamp": "2025-11-27T09:35:15.301277063" + "timestamp": "2025-12-04T21:13:55.06359889" } } \ No newline at end of file diff --git a/modules/nf-core/td2/predict/main.nf b/modules/nf-core/td2/predict/main.nf index 866f06f6a96..78a444d6d4d 100644 --- a/modules/nf-core/td2/predict/main.nf +++ b/modules/nf-core/td2/predict/main.nf @@ -12,13 +12,14 @@ process TD2_PREDICT { output: tuple val(meta), path("${prefix}/*.TD2.{bed,cds,gff3,pep}"), emit: predictions - path("versions.yml") , emit: versions + tuple val("${task.process}"), val('TD2.Predict'), eval("echo td2: ${VERSION}"), emit: versions_td2, topic: versions when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' + VERSION = 'v1.0.6' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. prefix = task.ext.prefix ?: "${meta.id}" """ @@ -30,14 +31,10 @@ process TD2_PREDICT { ${args} mv *.TD2.{bed,cds,gff3,pep} ${prefix}/ - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - td2: \$(td2 v1.0.6) - END_VERSIONS """ stub: + VERSION = 'v1.0.6' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. prefix = task.ext.prefix ?: "${meta.id}" """ @@ -46,10 +43,5 @@ process TD2_PREDICT { touch ${prefix}/fakefile.TD2.cds touch ${prefix}/fakefile.TD2.gff3 touch ${prefix}/fakefile.TD2.pep - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - td2: \$(td2 v1.0.6) - END_VERSIONS """ } diff --git a/modules/nf-core/td2/predict/meta.yml b/modules/nf-core/td2/predict/meta.yml index bdf8b0f6d3c..a3889503594 100644 --- a/modules/nf-core/td2/predict/meta.yml +++ b/modules/nf-core/td2/predict/meta.yml @@ -29,7 +29,8 @@ input: ontologies: [] - orfs_dir: type: file - description: Directory containing the ORF prediction files generated by the `td2_longorfs` module + description: Directory containing the ORF prediction files generated by + the `td2_longorfs` module pattern: "orfs_dir/" ontologies: [] output: @@ -41,17 +42,20 @@ output: e.g. `[ id:'sample1' ]` - ${prefix}/*.TD2.{bed,cds,gff3,pep}: type: file - description: Files containing the TD2 ORF predictions for the input transcript sequences + description: Files containing the TD2 ORF predictions for the input + transcript sequences pattern: "${prefix}/*.TD2.{bed,cds,gff3,pep}" ontologies: [] - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: "http://edamontology.org/format_3750" # YAML - + versions_td2: + - - ${task.process}: + type: string + description: The process the versions were collected from + - TD2.Predict: + type: string + description: The tool name + - "echo td2: ${VERSION}": + type: string + description: The version of TD2 used authors: - "@khersameesh24" maintainers: diff --git a/modules/nf-core/td2/predict/tests/main.nf.test b/modules/nf-core/td2/predict/tests/main.nf.test index 06976812444..4f3bb30eda2 100644 --- a/modules/nf-core/td2/predict/tests/main.nf.test +++ b/modules/nf-core/td2/predict/tests/main.nf.test @@ -42,7 +42,7 @@ nextflow_process { assertAll( { assert snapshot( process.out, - path(process.out.versions[0]).yaml + process.out.findAll { key, val -> key.startsWith("versions")} ).match() } ) } @@ -69,7 +69,7 @@ nextflow_process { assertAll( { assert snapshot( process.out, - path(process.out.versions[0]).yaml + process.out.findAll { key, val -> key.startsWith("versions")} ).match() } ) } diff --git a/modules/nf-core/td2/predict/tests/main.nf.test.snap b/modules/nf-core/td2/predict/tests/main.nf.test.snap index d788b3e1ef6..d366015e16a 100644 --- a/modules/nf-core/td2/predict/tests/main.nf.test.snap +++ b/modules/nf-core/td2/predict/tests/main.nf.test.snap @@ -16,7 +16,11 @@ ] ], "1": [ - "versions.yml:md5,20f64996cc943420260fa0be53c2ff71" + [ + "TD2_PREDICT", + "TD2.Predict", + "td2: v1.0.6" + ] ], "predictions": [ [ @@ -31,21 +35,29 @@ ] ] ], - "versions": [ - "versions.yml:md5,20f64996cc943420260fa0be53c2ff71" + "versions_td2": [ + [ + "TD2_PREDICT", + "TD2.Predict", + "td2: v1.0.6" + ] ] }, { - "TD2_PREDICT": { - "td2": null - } + "versions_td2": [ + [ + "TD2_PREDICT", + "TD2.Predict", + "td2: v1.0.6" + ] + ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.0" + "nextflow": "25.10.2" }, - "timestamp": "2025-11-28T12:34:19.705175228" + "timestamp": "2025-12-04T21:17:11.987007488" }, "td2.predict - transcriptome.fasta - stub": { "content": [ @@ -64,7 +76,11 @@ ] ], "1": [ - "versions.yml:md5,20f64996cc943420260fa0be53c2ff71" + [ + "TD2_PREDICT", + "TD2.Predict", + "td2: v1.0.6" + ] ], "predictions": [ [ @@ -79,20 +95,28 @@ ] ] ], - "versions": [ - "versions.yml:md5,20f64996cc943420260fa0be53c2ff71" + "versions_td2": [ + [ + "TD2_PREDICT", + "TD2.Predict", + "td2: v1.0.6" + ] ] }, { - "TD2_PREDICT": { - "td2": null - } + "versions_td2": [ + [ + "TD2_PREDICT", + "TD2.Predict", + "td2: v1.0.6" + ] + ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.0" + "nextflow": "25.10.2" }, - "timestamp": "2025-11-27T12:57:15.490423827" + "timestamp": "2025-12-04T21:19:34.49914593" } } \ No newline at end of file From b1d83fe5621a85453fa369d95aae75b43873ca9b Mon Sep 17 00:00:00 2001 From: khersameesh24 Date: Thu, 4 Dec 2025 22:49:17 +0100 Subject: [PATCH 3/4] added topics section in meta.yml --- modules/nf-core/td2/longorfs/meta.yml | 11 +++++++++++ modules/nf-core/td2/predict/meta.yml | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/modules/nf-core/td2/longorfs/meta.yml b/modules/nf-core/td2/longorfs/meta.yml index 183dfef9585..b3052e38751 100644 --- a/modules/nf-core/td2/longorfs/meta.yml +++ b/modules/nf-core/td2/longorfs/meta.yml @@ -50,6 +50,17 @@ output: - "echo td2: ${VERSION}": type: string description: The version of TD2 used + 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: - "@khersameesh24" maintainers: diff --git a/modules/nf-core/td2/predict/meta.yml b/modules/nf-core/td2/predict/meta.yml index a3889503594..8dcf42f5863 100644 --- a/modules/nf-core/td2/predict/meta.yml +++ b/modules/nf-core/td2/predict/meta.yml @@ -56,6 +56,17 @@ output: - "echo td2: ${VERSION}": type: string description: The version of TD2 used + 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: - "@khersameesh24" maintainers: From 9c4ba6e2811f1e2d9e43d4554f7e7e70fce25900 Mon Sep 17 00:00:00 2001 From: khersameesh24 Date: Thu, 4 Dec 2025 23:17:49 +0100 Subject: [PATCH 4/4] fix topics section in meta.yml --- modules/nf-core/td2/longorfs/meta.yml | 22 +++++++++++----------- modules/nf-core/td2/predict/meta.yml | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/modules/nf-core/td2/longorfs/meta.yml b/modules/nf-core/td2/longorfs/meta.yml index b3052e38751..7ddeedfb29a 100644 --- a/modules/nf-core/td2/longorfs/meta.yml +++ b/modules/nf-core/td2/longorfs/meta.yml @@ -50,17 +50,17 @@ output: - "echo td2: ${VERSION}": type: string description: The version of TD2 used - 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 +topics: + versions: + - - ${task.process}: + type: string + description: The process the versions were collected from + - TD2.LongOrfs: + type: string + description: The tool name + - "echo td2: ${VERSION}": + type: string + description: The version of TD2 used authors: - "@khersameesh24" maintainers: diff --git a/modules/nf-core/td2/predict/meta.yml b/modules/nf-core/td2/predict/meta.yml index 8dcf42f5863..43bdbb5f71c 100644 --- a/modules/nf-core/td2/predict/meta.yml +++ b/modules/nf-core/td2/predict/meta.yml @@ -56,17 +56,17 @@ output: - "echo td2: ${VERSION}": type: string description: The version of TD2 used - 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 +topics: + versions: + - - ${task.process}: + type: string + description: The process the versions were collected from + - TD2.Predict: + type: string + description: The tool name + - "echo td2: ${VERSION}": + type: string + description: The version of TD2 used authors: - "@khersameesh24" maintainers: