From 69b240ba847fec437bda3f9b58d9eb7f9ebe47cf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 7 Jan 2026 10:18:30 +0000 Subject: [PATCH 1/4] Initial plan From d009783747166b295c288c67f55641e195875bb6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 7 Jan 2026 10:27:14 +0000 Subject: [PATCH 2/4] Add gapseq modules: find, findtransport, draft, fill, and doall Co-authored-by: brovolia <40294728+brovolia@users.noreply.github.com> --- modules/nf-core/gapseq/doall/environment.yml | 7 ++ modules/nf-core/gapseq/doall/main.nf | 62 ++++++++++ modules/nf-core/gapseq/doall/meta.yml | 107 ++++++++++++++++++ .../nf-core/gapseq/doall/tests/main.nf.test | 57 ++++++++++ modules/nf-core/gapseq/draft/environment.yml | 7 ++ modules/nf-core/gapseq/draft/main.nf | 39 +++++++ modules/nf-core/gapseq/draft/meta.yml | 83 ++++++++++++++ .../nf-core/gapseq/draft/tests/main.nf.test | 35 ++++++ modules/nf-core/gapseq/fill/environment.yml | 7 ++ modules/nf-core/gapseq/fill/main.nf | 42 +++++++ modules/nf-core/gapseq/fill/meta.yml | 83 ++++++++++++++ .../nf-core/gapseq/fill/tests/main.nf.test | 35 ++++++ modules/nf-core/gapseq/find/environment.yml | 7 ++ modules/nf-core/gapseq/find/main.nf | 56 +++++++++ modules/nf-core/gapseq/find/meta.yml | 89 +++++++++++++++ .../nf-core/gapseq/find/tests/main.nf.test | 55 +++++++++ .../gapseq/findtransport/environment.yml | 7 ++ modules/nf-core/gapseq/findtransport/main.nf | 53 +++++++++ modules/nf-core/gapseq/findtransport/meta.yml | 89 +++++++++++++++ .../gapseq/findtransport/tests/main.nf.test | 55 +++++++++ 20 files changed, 975 insertions(+) create mode 100644 modules/nf-core/gapseq/doall/environment.yml create mode 100644 modules/nf-core/gapseq/doall/main.nf create mode 100644 modules/nf-core/gapseq/doall/meta.yml create mode 100644 modules/nf-core/gapseq/doall/tests/main.nf.test create mode 100644 modules/nf-core/gapseq/draft/environment.yml create mode 100644 modules/nf-core/gapseq/draft/main.nf create mode 100644 modules/nf-core/gapseq/draft/meta.yml create mode 100644 modules/nf-core/gapseq/draft/tests/main.nf.test create mode 100644 modules/nf-core/gapseq/fill/environment.yml create mode 100644 modules/nf-core/gapseq/fill/main.nf create mode 100644 modules/nf-core/gapseq/fill/meta.yml create mode 100644 modules/nf-core/gapseq/fill/tests/main.nf.test create mode 100644 modules/nf-core/gapseq/find/environment.yml create mode 100644 modules/nf-core/gapseq/find/main.nf create mode 100644 modules/nf-core/gapseq/find/meta.yml create mode 100644 modules/nf-core/gapseq/find/tests/main.nf.test create mode 100644 modules/nf-core/gapseq/findtransport/environment.yml create mode 100644 modules/nf-core/gapseq/findtransport/main.nf create mode 100644 modules/nf-core/gapseq/findtransport/meta.yml create mode 100644 modules/nf-core/gapseq/findtransport/tests/main.nf.test diff --git a/modules/nf-core/gapseq/doall/environment.yml b/modules/nf-core/gapseq/doall/environment.yml new file mode 100644 index 000000000000..0c4d56cc3900 --- /dev/null +++ b/modules/nf-core/gapseq/doall/environment.yml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - bioconda::gapseq=1.4.0 diff --git a/modules/nf-core/gapseq/doall/main.nf b/modules/nf-core/gapseq/doall/main.nf new file mode 100644 index 000000000000..d7ccc5388fa7 --- /dev/null +++ b/modules/nf-core/gapseq/doall/main.nf @@ -0,0 +1,62 @@ +process GAPSEQ_DOALL { + tag "${meta.id}" + label 'process_high' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gapseq:1.4.0--hdfd78af_0' : + 'biocontainers/gapseq:1.4.0--hdfd78af_0' }" + + input: + tuple val(meta), path(fasta), path(medium) + + output: + tuple val(meta), path("*.RDS") , emit: model + tuple val(meta), path("*.csv") , emit: csv + tuple val(meta), path("*.fna") , emit: fna , optional: true + tuple val(meta), path("*.log") , emit: log , optional: true + tuple val("${task.process}"), val('gapseq'), eval('gapseq --version | sed "s/gapseq //"') , emit: versions_gapseq, topic: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def medium_arg = medium ? "-m $medium" : '' + """ + gapseq \\ + doall \\ + -p ${task.cpus} \\ + $medium_arg \\ + $args \\ + $fasta + + # Rename output files with prefix + for file in *.RDS; do + if [ -f "\$file" ]; then + mv "\$file" "${prefix}_\$file" + fi + done + + for file in *.csv; do + if [ -f "\$file" ]; then + mv "\$file" "${prefix}_\$file" + fi + done + + for file in *.fna; do + if [ -f "\$file" ]; then + mv "\$file" "${prefix}_\$file" + fi + done + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_model-filled.RDS + touch ${prefix}_pathways.csv + touch ${prefix}_transporters.csv + """ +} diff --git a/modules/nf-core/gapseq/doall/meta.yml b/modules/nf-core/gapseq/doall/meta.yml new file mode 100644 index 000000000000..dfab55ff9efa --- /dev/null +++ b/modules/nf-core/gapseq/doall/meta.yml @@ -0,0 +1,107 @@ +name: gapseq_doall +description: Complete gapseq workflow from genome to gap-filled model +keywords: + - metabolic model + - gap filling + - pathway prediction + - bacteria + - genome-scale model + - complete workflow +tools: + - gapseq: + description: | + gapseq is designed to combine metabolic pathway analysis with metabolic network reconstruction and curation. + The doall command runs the complete workflow: pathway prediction, transporter inference, model construction, and gap filling. + homepage: https://github.com/jotech/gapseq + documentation: https://gapseq.readthedocs.io/ + tool_dev_url: https://github.com/jotech/gapseq + doi: "10.1186/s13059-021-02295-1" + licence: ["AGPL-3.0-only"] + identifier: "" +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Protein or genomic FASTA file + pattern: "*.{fasta,fa,faa,fna,gz}" + ontologies: [] + - medium: + type: file + description: Optional medium definition file (CSV format) + pattern: "*.csv" + ontologies: [] +output: + model: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.RDS": + type: file + description: Gap-filled metabolic model in RDS format + pattern: "*.RDS" + ontologies: [] + csv: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.csv": + type: file + description: CSV files containing pathway and transporter predictions + pattern: "*.csv" + ontologies: [] + fna: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.fna": + type: file + description: Optional extracted sequences in FASTA format + pattern: "*.fna" + ontologies: [] + log: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.log": + type: file + description: Log files from gapseq doall + pattern: "*.log" + ontologies: [] + versions_gapseq: + - - ${task.process}: + type: string + description: The process the versions were collected from + - gapseq: + type: string + description: The tool name + - gapseq --version | sed "s/gapseq //": + type: eval + description: The expression to obtain the version of the tool + +topics: + versions: + - - ${task.process}: + type: string + description: The process the versions were collected from + - gapseq: + type: string + description: The tool name + - gapseq --version | sed "s/gapseq //": + type: eval + description: The expression to obtain the version of the tool +authors: + - "@copilot" +maintainers: + - "@copilot" diff --git a/modules/nf-core/gapseq/doall/tests/main.nf.test b/modules/nf-core/gapseq/doall/tests/main.nf.test new file mode 100644 index 000000000000..deaafb7312c8 --- /dev/null +++ b/modules/nf-core/gapseq/doall/tests/main.nf.test @@ -0,0 +1,57 @@ +nextflow_process { + + name "Test Process GAPSEQ_DOALL" + script "../main.nf" + process "GAPSEQ_DOALL" + + tag "modules" + tag "modules_nfcore" + tag "gapseq" + tag "gapseq/doall" + + test("sarscov2 genome [fasta]") { + + when { + process { + """ + input[0] = Channel.of([ + [ id: 'test', single_end:false ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ], + [] + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 genome [fasta] - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id: 'test', single_end:false ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ], + [] + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } +} diff --git a/modules/nf-core/gapseq/draft/environment.yml b/modules/nf-core/gapseq/draft/environment.yml new file mode 100644 index 000000000000..0c4d56cc3900 --- /dev/null +++ b/modules/nf-core/gapseq/draft/environment.yml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - bioconda::gapseq=1.4.0 diff --git a/modules/nf-core/gapseq/draft/main.nf b/modules/nf-core/gapseq/draft/main.nf new file mode 100644 index 000000000000..821ed2ccadc7 --- /dev/null +++ b/modules/nf-core/gapseq/draft/main.nf @@ -0,0 +1,39 @@ +process GAPSEQ_DRAFT { + tag "${meta.id}" + label 'process_medium' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gapseq:1.4.0--hdfd78af_0' : + 'biocontainers/gapseq:1.4.0--hdfd78af_0' }" + + input: + tuple val(meta), path(pathways), path(transporters) + + output: + tuple val(meta), path("*.RDS") , emit: draft + tuple val(meta), path("*.log") , emit: log , optional: true + tuple val("${task.process}"), val('gapseq'), eval('gapseq --version | sed "s/gapseq //"') , emit: versions_gapseq, topic: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def transporters_arg = transporters ? "-t $transporters" : '' + """ + gapseq \\ + draft \\ + -r $pathways \\ + $transporters_arg \\ + -c $prefix \\ + $args + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}-draft.RDS + """ +} diff --git a/modules/nf-core/gapseq/draft/meta.yml b/modules/nf-core/gapseq/draft/meta.yml new file mode 100644 index 000000000000..998af7595451 --- /dev/null +++ b/modules/nf-core/gapseq/draft/meta.yml @@ -0,0 +1,83 @@ +name: gapseq_draft +description: Create draft metabolic model from pathway and transporter predictions +keywords: + - metabolic model + - draft reconstruction + - bacteria + - genome-scale model +tools: + - gapseq: + description: | + gapseq is designed to combine metabolic pathway analysis with metabolic network reconstruction and curation. + The draft command constructs a draft metabolic model from pathway and transporter predictions. + homepage: https://github.com/jotech/gapseq + documentation: https://gapseq.readthedocs.io/ + tool_dev_url: https://github.com/jotech/gapseq + doi: "10.1186/s13059-021-02295-1" + licence: ["AGPL-3.0-only"] + identifier: "" +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - pathways: + type: file + description: Pathways CSV file from gapseq find + pattern: "*-all-Pathways.tbl" + ontologies: [] + - transporters: + type: file + description: Transporters CSV file from gapseq find-transport + pattern: "*-Transporter.tbl" + ontologies: [] +output: + draft: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.RDS": + type: file + description: Draft metabolic model in RDS format + pattern: "*.RDS" + ontologies: [] + log: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.log": + type: file + description: Log files from gapseq draft + pattern: "*.log" + ontologies: [] + versions_gapseq: + - - ${task.process}: + type: string + description: The process the versions were collected from + - gapseq: + type: string + description: The tool name + - gapseq --version | sed "s/gapseq //": + type: eval + description: The expression to obtain the version of the tool + +topics: + versions: + - - ${task.process}: + type: string + description: The process the versions were collected from + - gapseq: + type: string + description: The tool name + - gapseq --version | sed "s/gapseq //": + type: eval + description: The expression to obtain the version of the tool +authors: + - "@copilot" +maintainers: + - "@copilot" diff --git a/modules/nf-core/gapseq/draft/tests/main.nf.test b/modules/nf-core/gapseq/draft/tests/main.nf.test new file mode 100644 index 000000000000..6117f5b35c3f --- /dev/null +++ b/modules/nf-core/gapseq/draft/tests/main.nf.test @@ -0,0 +1,35 @@ +nextflow_process { + + name "Test Process GAPSEQ_DRAFT" + script "../main.nf" + process "GAPSEQ_DRAFT" + + tag "modules" + tag "modules_nfcore" + tag "gapseq" + tag "gapseq/draft" + + test("test draft model creation - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id: 'test' ], + file('test-all-Pathways.tbl'), + file('test-Transporter.tbl') + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } +} diff --git a/modules/nf-core/gapseq/fill/environment.yml b/modules/nf-core/gapseq/fill/environment.yml new file mode 100644 index 000000000000..0c4d56cc3900 --- /dev/null +++ b/modules/nf-core/gapseq/fill/environment.yml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - bioconda::gapseq=1.4.0 diff --git a/modules/nf-core/gapseq/fill/main.nf b/modules/nf-core/gapseq/fill/main.nf new file mode 100644 index 000000000000..5daeb4030819 --- /dev/null +++ b/modules/nf-core/gapseq/fill/main.nf @@ -0,0 +1,42 @@ +process GAPSEQ_FILL { + tag "${meta.id}" + label 'process_high' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gapseq:1.4.0--hdfd78af_0' : + 'biocontainers/gapseq:1.4.0--hdfd78af_0' }" + + input: + tuple val(meta), path(draft), path(medium) + + output: + tuple val(meta), path("*.RDS") , emit: filled + tuple val(meta), path("*.log") , emit: log , optional: true + tuple val("${task.process}"), val('gapseq'), eval('gapseq --version | sed "s/gapseq //"') , emit: versions_gapseq, topic: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def medium_arg = medium ? "-m $medium" : '' + """ + gapseq \\ + fill \\ + -p ${task.cpus} \\ + $medium_arg \\ + $args \\ + $draft + + # Rename output file + mv *-filled.RDS ${prefix}-filled.RDS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}-filled.RDS + """ +} diff --git a/modules/nf-core/gapseq/fill/meta.yml b/modules/nf-core/gapseq/fill/meta.yml new file mode 100644 index 000000000000..95dc558b7bf6 --- /dev/null +++ b/modules/nf-core/gapseq/fill/meta.yml @@ -0,0 +1,83 @@ +name: gapseq_fill +description: Perform gap filling on draft metabolic model +keywords: + - metabolic model + - gap filling + - bacteria + - genome-scale model +tools: + - gapseq: + description: | + gapseq is designed to combine metabolic pathway analysis with metabolic network reconstruction and curation. + The fill command performs multi-step gap filling on a draft metabolic model. + homepage: https://github.com/jotech/gapseq + documentation: https://gapseq.readthedocs.io/ + tool_dev_url: https://github.com/jotech/gapseq + doi: "10.1186/s13059-021-02295-1" + licence: ["AGPL-3.0-only"] + identifier: "" +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - draft: + type: file + description: Draft metabolic model in RDS format from gapseq draft + pattern: "*-draft.RDS" + ontologies: [] + - medium: + type: file + description: Optional medium definition file (CSV format) + pattern: "*.csv" + ontologies: [] +output: + filled: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.RDS": + type: file + description: Gap-filled metabolic model in RDS format + pattern: "*-filled.RDS" + ontologies: [] + log: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.log": + type: file + description: Log files from gapseq fill + pattern: "*.log" + ontologies: [] + versions_gapseq: + - - ${task.process}: + type: string + description: The process the versions were collected from + - gapseq: + type: string + description: The tool name + - gapseq --version | sed "s/gapseq //": + type: eval + description: The expression to obtain the version of the tool + +topics: + versions: + - - ${task.process}: + type: string + description: The process the versions were collected from + - gapseq: + type: string + description: The tool name + - gapseq --version | sed "s/gapseq //": + type: eval + description: The expression to obtain the version of the tool +authors: + - "@copilot" +maintainers: + - "@copilot" diff --git a/modules/nf-core/gapseq/fill/tests/main.nf.test b/modules/nf-core/gapseq/fill/tests/main.nf.test new file mode 100644 index 000000000000..bdb3d14d935d --- /dev/null +++ b/modules/nf-core/gapseq/fill/tests/main.nf.test @@ -0,0 +1,35 @@ +nextflow_process { + + name "Test Process GAPSEQ_FILL" + script "../main.nf" + process "GAPSEQ_FILL" + + tag "modules" + tag "modules_nfcore" + tag "gapseq" + tag "gapseq/fill" + + test("test gap filling - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id: 'test' ], + file('test-draft.RDS'), + [] + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } +} diff --git a/modules/nf-core/gapseq/find/environment.yml b/modules/nf-core/gapseq/find/environment.yml new file mode 100644 index 000000000000..0c4d56cc3900 --- /dev/null +++ b/modules/nf-core/gapseq/find/environment.yml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - bioconda::gapseq=1.4.0 diff --git a/modules/nf-core/gapseq/find/main.nf b/modules/nf-core/gapseq/find/main.nf new file mode 100644 index 000000000000..8a336d70d168 --- /dev/null +++ b/modules/nf-core/gapseq/find/main.nf @@ -0,0 +1,56 @@ +process GAPSEQ_FIND { + tag "${meta.id}" + label 'process_medium' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gapseq:1.4.0--hdfd78af_0' : + 'biocontainers/gapseq:1.4.0--hdfd78af_0' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path("*.csv") , emit: csv + tuple val(meta), path("*.fna") , emit: fna , optional: true + tuple val(meta), path("*.log") , emit: log , optional: true + tuple val("${task.process}"), val('gapseq'), eval('gapseq --version | sed "s/gapseq //"') , emit: versions_gapseq, topic: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + gapseq \\ + find \\ + -p all \\ + -b 200 \\ + -m Bacteria \\ + -t ${task.cpus} \\ + $args \\ + $fasta + + # Rename output files with prefix + for file in *.csv; do + if [ -f "\$file" ]; then + mv "\$file" "${prefix}_\$file" + fi + done + + # Optionally rename fna files if they exist + for file in *.fna; do + if [ -f "\$file" ]; then + mv "\$file" "${prefix}_\$file" + fi + done + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_pathways.csv + touch ${prefix}_reactions.csv + """ +} diff --git a/modules/nf-core/gapseq/find/meta.yml b/modules/nf-core/gapseq/find/meta.yml new file mode 100644 index 000000000000..a21239ca7362 --- /dev/null +++ b/modules/nf-core/gapseq/find/meta.yml @@ -0,0 +1,89 @@ +name: gapseq_find +description: Predict metabolic pathways from genomic data using gapseq +keywords: + - metabolic pathways + - genomics + - bacteria + - pathway prediction +tools: + - gapseq: + description: | + gapseq is designed to combine metabolic pathway analysis with metabolic network reconstruction and curation. + The find command predicts metabolic pathways from genomic information and databases for pathways and reactions. + homepage: https://github.com/jotech/gapseq + documentation: https://gapseq.readthedocs.io/ + tool_dev_url: https://github.com/jotech/gapseq + doi: "10.1186/s13059-021-02295-1" + licence: ["AGPL-3.0-only"] + identifier: "" +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Protein or genomic FASTA file + pattern: "*.{fasta,fa,faa,fna,gz}" + ontologies: [] +output: + csv: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.csv": + type: file + description: CSV files containing pathway and reaction predictions + pattern: "*.csv" + ontologies: [] + fna: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.fna": + type: file + description: Optional extracted sequences in FASTA format + pattern: "*.fna" + ontologies: [] + log: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.log": + type: file + description: Log files from gapseq find + pattern: "*.log" + ontologies: [] + versions_gapseq: + - - ${task.process}: + type: string + description: The process the versions were collected from + - gapseq: + type: string + description: The tool name + - gapseq --version | sed "s/gapseq //": + type: eval + description: The expression to obtain the version of the tool + +topics: + versions: + - - ${task.process}: + type: string + description: The process the versions were collected from + - gapseq: + type: string + description: The tool name + - gapseq --version | sed "s/gapseq //": + type: eval + description: The expression to obtain the version of the tool +authors: + - "@copilot" +maintainers: + - "@copilot" diff --git a/modules/nf-core/gapseq/find/tests/main.nf.test b/modules/nf-core/gapseq/find/tests/main.nf.test new file mode 100644 index 000000000000..a4cfa159e801 --- /dev/null +++ b/modules/nf-core/gapseq/find/tests/main.nf.test @@ -0,0 +1,55 @@ +nextflow_process { + + name "Test Process GAPSEQ_FIND" + script "../main.nf" + process "GAPSEQ_FIND" + + tag "modules" + tag "modules_nfcore" + tag "gapseq" + tag "gapseq/find" + + test("sarscov2 genome [fasta]") { + + when { + process { + """ + input[0] = Channel.of([ + [ id: 'test', single_end:false ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 genome [fasta] - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id: 'test', single_end:false ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } +} diff --git a/modules/nf-core/gapseq/findtransport/environment.yml b/modules/nf-core/gapseq/findtransport/environment.yml new file mode 100644 index 000000000000..0c4d56cc3900 --- /dev/null +++ b/modules/nf-core/gapseq/findtransport/environment.yml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - bioconda::gapseq=1.4.0 diff --git a/modules/nf-core/gapseq/findtransport/main.nf b/modules/nf-core/gapseq/findtransport/main.nf new file mode 100644 index 000000000000..a3f131acac7d --- /dev/null +++ b/modules/nf-core/gapseq/findtransport/main.nf @@ -0,0 +1,53 @@ +process GAPSEQ_FINDTRANSPORT { + tag "${meta.id}" + label 'process_medium' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gapseq:1.4.0--hdfd78af_0' : + 'biocontainers/gapseq:1.4.0--hdfd78af_0' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path("*.csv") , emit: csv + tuple val(meta), path("*.fna") , emit: fna , optional: true + tuple val(meta), path("*.log") , emit: log , optional: true + tuple val("${task.process}"), val('gapseq'), eval('gapseq --version | sed "s/gapseq //"') , emit: versions_gapseq, topic: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + gapseq \\ + find-transport \\ + -b 200 \\ + -t ${task.cpus} \\ + $args \\ + $fasta + + # Rename output files with prefix + for file in *.csv; do + if [ -f "\$file" ]; then + mv "\$file" "${prefix}_\$file" + fi + done + + # Optionally rename fna files if they exist + for file in *.fna; do + if [ -f "\$file" ]; then + mv "\$file" "${prefix}_\$file" + fi + done + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_transporters.csv + """ +} diff --git a/modules/nf-core/gapseq/findtransport/meta.yml b/modules/nf-core/gapseq/findtransport/meta.yml new file mode 100644 index 000000000000..c5b5ed650810 --- /dev/null +++ b/modules/nf-core/gapseq/findtransport/meta.yml @@ -0,0 +1,89 @@ +name: gapseq_findtransport +description: Predict transporters from genomic data using gapseq +keywords: + - transporters + - genomics + - bacteria + - transporter prediction +tools: + - gapseq: + description: | + gapseq is designed to combine metabolic pathway analysis with metabolic network reconstruction and curation. + The find-transport command predicts transporters from genomic information. + homepage: https://github.com/jotech/gapseq + documentation: https://gapseq.readthedocs.io/ + tool_dev_url: https://github.com/jotech/gapseq + doi: "10.1186/s13059-021-02295-1" + licence: ["AGPL-3.0-only"] + identifier: "" +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Protein or genomic FASTA file + pattern: "*.{fasta,fa,faa,fna,gz}" + ontologies: [] +output: + csv: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.csv": + type: file + description: CSV files containing transporter predictions + pattern: "*.csv" + ontologies: [] + fna: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.fna": + type: file + description: Optional extracted sequences in FASTA format + pattern: "*.fna" + ontologies: [] + log: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.log": + type: file + description: Log files from gapseq find-transport + pattern: "*.log" + ontologies: [] + versions_gapseq: + - - ${task.process}: + type: string + description: The process the versions were collected from + - gapseq: + type: string + description: The tool name + - gapseq --version | sed "s/gapseq //": + type: eval + description: The expression to obtain the version of the tool + +topics: + versions: + - - ${task.process}: + type: string + description: The process the versions were collected from + - gapseq: + type: string + description: The tool name + - gapseq --version | sed "s/gapseq //": + type: eval + description: The expression to obtain the version of the tool +authors: + - "@copilot" +maintainers: + - "@copilot" diff --git a/modules/nf-core/gapseq/findtransport/tests/main.nf.test b/modules/nf-core/gapseq/findtransport/tests/main.nf.test new file mode 100644 index 000000000000..715809267c1a --- /dev/null +++ b/modules/nf-core/gapseq/findtransport/tests/main.nf.test @@ -0,0 +1,55 @@ +nextflow_process { + + name "Test Process GAPSEQ_FINDTRANSPORT" + script "../main.nf" + process "GAPSEQ_FINDTRANSPORT" + + tag "modules" + tag "modules_nfcore" + tag "gapseq" + tag "gapseq/findtransport" + + test("sarscov2 genome [fasta]") { + + when { + process { + """ + input[0] = Channel.of([ + [ id: 'test', single_end:false ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 genome [fasta] - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id: 'test', single_end:false ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } +} From 57e00097dbe93421ffe14a99fb35c32dabde0ebc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 7 Jan 2026 10:30:25 +0000 Subject: [PATCH 3/4] Update gapseq modules to use versions.yml format Co-authored-by: brovolia <40294728+brovolia@users.noreply.github.com> --- modules/nf-core/gapseq/doall/main.nf | 15 +++++++---- modules/nf-core/gapseq/doall/meta.yml | 27 +++++-------------- modules/nf-core/gapseq/draft/main.nf | 11 +++++--- modules/nf-core/gapseq/draft/meta.yml | 27 +++++-------------- modules/nf-core/gapseq/fill/main.nf | 11 +++++--- modules/nf-core/gapseq/fill/meta.yml | 27 +++++-------------- modules/nf-core/gapseq/find/main.nf | 13 ++++++--- modules/nf-core/gapseq/find/meta.yml | 27 +++++-------------- modules/nf-core/gapseq/findtransport/main.nf | 13 ++++++--- modules/nf-core/gapseq/findtransport/meta.yml | 27 +++++-------------- 10 files changed, 74 insertions(+), 124 deletions(-) diff --git a/modules/nf-core/gapseq/doall/main.nf b/modules/nf-core/gapseq/doall/main.nf index d7ccc5388fa7..5fb330590555 100644 --- a/modules/nf-core/gapseq/doall/main.nf +++ b/modules/nf-core/gapseq/doall/main.nf @@ -11,11 +11,11 @@ process GAPSEQ_DOALL { tuple val(meta), path(fasta), path(medium) output: - tuple val(meta), path("*.RDS") , emit: model - tuple val(meta), path("*.csv") , emit: csv - tuple val(meta), path("*.fna") , emit: fna , optional: true - tuple val(meta), path("*.log") , emit: log , optional: true - tuple val("${task.process}"), val('gapseq'), eval('gapseq --version | sed "s/gapseq //"') , emit: versions_gapseq, topic: versions + tuple val(meta), path("*.RDS") , emit: model + tuple val(meta), path("*.csv") , emit: csv + tuple val(meta), path("*.fna") , emit: fna , optional: true + tuple val(meta), path("*.log") , emit: log , optional: true + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -50,6 +50,11 @@ process GAPSEQ_DOALL { mv "\$file" "${prefix}_\$file" fi done + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gapseq: \$(gapseq --version 2>&1 | sed 's/gapseq //') + END_VERSIONS """ stub: diff --git a/modules/nf-core/gapseq/doall/meta.yml b/modules/nf-core/gapseq/doall/meta.yml index dfab55ff9efa..abd99d43ec69 100644 --- a/modules/nf-core/gapseq/doall/meta.yml +++ b/modules/nf-core/gapseq/doall/meta.yml @@ -79,28 +79,13 @@ output: description: Log files from gapseq doall pattern: "*.log" ontologies: [] - versions_gapseq: - - - ${task.process}: - type: string - description: The process the versions were collected from - - gapseq: - type: string - description: The tool name - - gapseq --version | sed "s/gapseq //": - type: eval - description: The expression to obtain the version of the tool - -topics: versions: - - - ${task.process}: - type: string - description: The process the versions were collected from - - gapseq: - type: string - description: The tool name - - gapseq --version | sed "s/gapseq //": - type: eval - description: The expression to obtain the version of the tool + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@copilot" maintainers: diff --git a/modules/nf-core/gapseq/draft/main.nf b/modules/nf-core/gapseq/draft/main.nf index 821ed2ccadc7..a1f28f7c2319 100644 --- a/modules/nf-core/gapseq/draft/main.nf +++ b/modules/nf-core/gapseq/draft/main.nf @@ -11,9 +11,9 @@ process GAPSEQ_DRAFT { tuple val(meta), path(pathways), path(transporters) output: - tuple val(meta), path("*.RDS") , emit: draft - tuple val(meta), path("*.log") , emit: log , optional: true - tuple val("${task.process}"), val('gapseq'), eval('gapseq --version | sed "s/gapseq //"') , emit: versions_gapseq, topic: versions + tuple val(meta), path("*.RDS") , emit: draft + tuple val(meta), path("*.log") , emit: log , optional: true + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -29,6 +29,11 @@ process GAPSEQ_DRAFT { $transporters_arg \\ -c $prefix \\ $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gapseq: \$(gapseq --version 2>&1 | sed 's/gapseq //') + END_VERSIONS """ stub: diff --git a/modules/nf-core/gapseq/draft/meta.yml b/modules/nf-core/gapseq/draft/meta.yml index 998af7595451..517dfe503d67 100644 --- a/modules/nf-core/gapseq/draft/meta.yml +++ b/modules/nf-core/gapseq/draft/meta.yml @@ -55,28 +55,13 @@ output: description: Log files from gapseq draft pattern: "*.log" ontologies: [] - versions_gapseq: - - - ${task.process}: - type: string - description: The process the versions were collected from - - gapseq: - type: string - description: The tool name - - gapseq --version | sed "s/gapseq //": - type: eval - description: The expression to obtain the version of the tool - -topics: versions: - - - ${task.process}: - type: string - description: The process the versions were collected from - - gapseq: - type: string - description: The tool name - - gapseq --version | sed "s/gapseq //": - type: eval - description: The expression to obtain the version of the tool + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@copilot" maintainers: diff --git a/modules/nf-core/gapseq/fill/main.nf b/modules/nf-core/gapseq/fill/main.nf index 5daeb4030819..b6cdede4078b 100644 --- a/modules/nf-core/gapseq/fill/main.nf +++ b/modules/nf-core/gapseq/fill/main.nf @@ -11,9 +11,9 @@ process GAPSEQ_FILL { tuple val(meta), path(draft), path(medium) output: - tuple val(meta), path("*.RDS") , emit: filled - tuple val(meta), path("*.log") , emit: log , optional: true - tuple val("${task.process}"), val('gapseq'), eval('gapseq --version | sed "s/gapseq //"') , emit: versions_gapseq, topic: versions + tuple val(meta), path("*.RDS") , emit: filled + tuple val(meta), path("*.log") , emit: log , optional: true + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -32,6 +32,11 @@ process GAPSEQ_FILL { # Rename output file mv *-filled.RDS ${prefix}-filled.RDS + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gapseq: \$(gapseq --version 2>&1 | sed 's/gapseq //') + END_VERSIONS """ stub: diff --git a/modules/nf-core/gapseq/fill/meta.yml b/modules/nf-core/gapseq/fill/meta.yml index 95dc558b7bf6..68b184330285 100644 --- a/modules/nf-core/gapseq/fill/meta.yml +++ b/modules/nf-core/gapseq/fill/meta.yml @@ -55,28 +55,13 @@ output: description: Log files from gapseq fill pattern: "*.log" ontologies: [] - versions_gapseq: - - - ${task.process}: - type: string - description: The process the versions were collected from - - gapseq: - type: string - description: The tool name - - gapseq --version | sed "s/gapseq //": - type: eval - description: The expression to obtain the version of the tool - -topics: versions: - - - ${task.process}: - type: string - description: The process the versions were collected from - - gapseq: - type: string - description: The tool name - - gapseq --version | sed "s/gapseq //": - type: eval - description: The expression to obtain the version of the tool + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@copilot" maintainers: diff --git a/modules/nf-core/gapseq/find/main.nf b/modules/nf-core/gapseq/find/main.nf index 8a336d70d168..0b4651e50809 100644 --- a/modules/nf-core/gapseq/find/main.nf +++ b/modules/nf-core/gapseq/find/main.nf @@ -11,10 +11,10 @@ process GAPSEQ_FIND { tuple val(meta), path(fasta) output: - tuple val(meta), path("*.csv") , emit: csv - tuple val(meta), path("*.fna") , emit: fna , optional: true - tuple val(meta), path("*.log") , emit: log , optional: true - tuple val("${task.process}"), val('gapseq'), eval('gapseq --version | sed "s/gapseq //"') , emit: versions_gapseq, topic: versions + tuple val(meta), path("*.csv") , emit: csv + tuple val(meta), path("*.fna") , emit: fna , optional: true + tuple val(meta), path("*.log") , emit: log , optional: true + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -45,6 +45,11 @@ process GAPSEQ_FIND { mv "\$file" "${prefix}_\$file" fi done + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gapseq: \$(gapseq --version 2>&1 | sed 's/gapseq //') + END_VERSIONS """ stub: diff --git a/modules/nf-core/gapseq/find/meta.yml b/modules/nf-core/gapseq/find/meta.yml index a21239ca7362..86a5539c079b 100644 --- a/modules/nf-core/gapseq/find/meta.yml +++ b/modules/nf-core/gapseq/find/meta.yml @@ -61,28 +61,13 @@ output: description: Log files from gapseq find pattern: "*.log" ontologies: [] - versions_gapseq: - - - ${task.process}: - type: string - description: The process the versions were collected from - - gapseq: - type: string - description: The tool name - - gapseq --version | sed "s/gapseq //": - type: eval - description: The expression to obtain the version of the tool - -topics: versions: - - - ${task.process}: - type: string - description: The process the versions were collected from - - gapseq: - type: string - description: The tool name - - gapseq --version | sed "s/gapseq //": - type: eval - description: The expression to obtain the version of the tool + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@copilot" maintainers: diff --git a/modules/nf-core/gapseq/findtransport/main.nf b/modules/nf-core/gapseq/findtransport/main.nf index a3f131acac7d..dd072234ea51 100644 --- a/modules/nf-core/gapseq/findtransport/main.nf +++ b/modules/nf-core/gapseq/findtransport/main.nf @@ -11,10 +11,10 @@ process GAPSEQ_FINDTRANSPORT { tuple val(meta), path(fasta) output: - tuple val(meta), path("*.csv") , emit: csv - tuple val(meta), path("*.fna") , emit: fna , optional: true - tuple val(meta), path("*.log") , emit: log , optional: true - tuple val("${task.process}"), val('gapseq'), eval('gapseq --version | sed "s/gapseq //"') , emit: versions_gapseq, topic: versions + tuple val(meta), path("*.csv") , emit: csv + tuple val(meta), path("*.fna") , emit: fna , optional: true + tuple val(meta), path("*.log") , emit: log , optional: true + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -43,6 +43,11 @@ process GAPSEQ_FINDTRANSPORT { mv "\$file" "${prefix}_\$file" fi done + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gapseq: \$(gapseq --version 2>&1 | sed 's/gapseq //') + END_VERSIONS """ stub: diff --git a/modules/nf-core/gapseq/findtransport/meta.yml b/modules/nf-core/gapseq/findtransport/meta.yml index c5b5ed650810..cbbc1407ef0f 100644 --- a/modules/nf-core/gapseq/findtransport/meta.yml +++ b/modules/nf-core/gapseq/findtransport/meta.yml @@ -61,28 +61,13 @@ output: description: Log files from gapseq find-transport pattern: "*.log" ontologies: [] - versions_gapseq: - - - ${task.process}: - type: string - description: The process the versions were collected from - - gapseq: - type: string - description: The tool name - - gapseq --version | sed "s/gapseq //": - type: eval - description: The expression to obtain the version of the tool - -topics: versions: - - - ${task.process}: - type: string - description: The process the versions were collected from - - gapseq: - type: string - description: The tool name - - gapseq --version | sed "s/gapseq //": - type: eval - description: The expression to obtain the version of the tool + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@copilot" maintainers: From 7278b32e1ecbba880d35650072116912ccf76104 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 7 Jan 2026 10:33:41 +0000 Subject: [PATCH 4/4] Fix gapseq output file extensions and simplify file handling Co-authored-by: brovolia <40294728+brovolia@users.noreply.github.com> --- modules/nf-core/gapseq/doall/main.nf | 25 +++---------------- modules/nf-core/gapseq/doall/meta.yml | 8 +++--- modules/nf-core/gapseq/find/main.nf | 20 +++------------ modules/nf-core/gapseq/find/meta.yml | 8 +++--- modules/nf-core/gapseq/findtransport/main.nf | 18 ++----------- modules/nf-core/gapseq/findtransport/meta.yml | 8 +++--- 6 files changed, 20 insertions(+), 67 deletions(-) diff --git a/modules/nf-core/gapseq/doall/main.nf b/modules/nf-core/gapseq/doall/main.nf index 5fb330590555..12dee79271c6 100644 --- a/modules/nf-core/gapseq/doall/main.nf +++ b/modules/nf-core/gapseq/doall/main.nf @@ -12,7 +12,7 @@ process GAPSEQ_DOALL { output: tuple val(meta), path("*.RDS") , emit: model - tuple val(meta), path("*.csv") , emit: csv + tuple val(meta), path("*.tbl") , emit: tbl tuple val(meta), path("*.fna") , emit: fna , optional: true tuple val(meta), path("*.log") , emit: log , optional: true path "versions.yml" , emit: versions @@ -32,25 +32,6 @@ process GAPSEQ_DOALL { $args \\ $fasta - # Rename output files with prefix - for file in *.RDS; do - if [ -f "\$file" ]; then - mv "\$file" "${prefix}_\$file" - fi - done - - for file in *.csv; do - if [ -f "\$file" ]; then - mv "\$file" "${prefix}_\$file" - fi - done - - for file in *.fna; do - if [ -f "\$file" ]; then - mv "\$file" "${prefix}_\$file" - fi - done - cat <<-END_VERSIONS > versions.yml "${task.process}": gapseq: \$(gapseq --version 2>&1 | sed 's/gapseq //') @@ -61,7 +42,7 @@ process GAPSEQ_DOALL { def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}_model-filled.RDS - touch ${prefix}_pathways.csv - touch ${prefix}_transporters.csv + touch ${prefix}_pathways.tbl + touch ${prefix}_transporters.tbl """ } diff --git a/modules/nf-core/gapseq/doall/meta.yml b/modules/nf-core/gapseq/doall/meta.yml index abd99d43ec69..827e116043ec 100644 --- a/modules/nf-core/gapseq/doall/meta.yml +++ b/modules/nf-core/gapseq/doall/meta.yml @@ -46,16 +46,16 @@ output: description: Gap-filled metabolic model in RDS format pattern: "*.RDS" ontologies: [] - csv: + tbl: - - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - "*.csv": + - "*.tbl": type: file - description: CSV files containing pathway and transporter predictions - pattern: "*.csv" + description: TBL files containing pathway and transporter predictions + pattern: "*.tbl" ontologies: [] fna: - - meta: diff --git a/modules/nf-core/gapseq/find/main.nf b/modules/nf-core/gapseq/find/main.nf index 0b4651e50809..0f9c1af49171 100644 --- a/modules/nf-core/gapseq/find/main.nf +++ b/modules/nf-core/gapseq/find/main.nf @@ -11,7 +11,7 @@ process GAPSEQ_FIND { tuple val(meta), path(fasta) output: - tuple val(meta), path("*.csv") , emit: csv + tuple val(meta), path("*.tbl") , emit: tbl tuple val(meta), path("*.fna") , emit: fna , optional: true tuple val(meta), path("*.log") , emit: log , optional: true path "versions.yml" , emit: versions @@ -32,20 +32,6 @@ process GAPSEQ_FIND { $args \\ $fasta - # Rename output files with prefix - for file in *.csv; do - if [ -f "\$file" ]; then - mv "\$file" "${prefix}_\$file" - fi - done - - # Optionally rename fna files if they exist - for file in *.fna; do - if [ -f "\$file" ]; then - mv "\$file" "${prefix}_\$file" - fi - done - cat <<-END_VERSIONS > versions.yml "${task.process}": gapseq: \$(gapseq --version 2>&1 | sed 's/gapseq //') @@ -55,7 +41,7 @@ process GAPSEQ_FIND { stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}_pathways.csv - touch ${prefix}_reactions.csv + touch ${prefix}_pathways.tbl + touch ${prefix}_reactions.tbl """ } diff --git a/modules/nf-core/gapseq/find/meta.yml b/modules/nf-core/gapseq/find/meta.yml index 86a5539c079b..4b81cf176b0e 100644 --- a/modules/nf-core/gapseq/find/meta.yml +++ b/modules/nf-core/gapseq/find/meta.yml @@ -28,16 +28,16 @@ input: pattern: "*.{fasta,fa,faa,fna,gz}" ontologies: [] output: - csv: + tbl: - - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - "*.csv": + - "*.tbl": type: file - description: CSV files containing pathway and reaction predictions - pattern: "*.csv" + description: TBL files containing pathway and reaction predictions + pattern: "*.tbl" ontologies: [] fna: - - meta: diff --git a/modules/nf-core/gapseq/findtransport/main.nf b/modules/nf-core/gapseq/findtransport/main.nf index dd072234ea51..1375b83ac891 100644 --- a/modules/nf-core/gapseq/findtransport/main.nf +++ b/modules/nf-core/gapseq/findtransport/main.nf @@ -11,7 +11,7 @@ process GAPSEQ_FINDTRANSPORT { tuple val(meta), path(fasta) output: - tuple val(meta), path("*.csv") , emit: csv + tuple val(meta), path("*.tbl") , emit: tbl tuple val(meta), path("*.fna") , emit: fna , optional: true tuple val(meta), path("*.log") , emit: log , optional: true path "versions.yml" , emit: versions @@ -30,20 +30,6 @@ process GAPSEQ_FINDTRANSPORT { $args \\ $fasta - # Rename output files with prefix - for file in *.csv; do - if [ -f "\$file" ]; then - mv "\$file" "${prefix}_\$file" - fi - done - - # Optionally rename fna files if they exist - for file in *.fna; do - if [ -f "\$file" ]; then - mv "\$file" "${prefix}_\$file" - fi - done - cat <<-END_VERSIONS > versions.yml "${task.process}": gapseq: \$(gapseq --version 2>&1 | sed 's/gapseq //') @@ -53,6 +39,6 @@ process GAPSEQ_FINDTRANSPORT { stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}_transporters.csv + touch ${prefix}_transporters.tbl """ } diff --git a/modules/nf-core/gapseq/findtransport/meta.yml b/modules/nf-core/gapseq/findtransport/meta.yml index cbbc1407ef0f..0481379d245e 100644 --- a/modules/nf-core/gapseq/findtransport/meta.yml +++ b/modules/nf-core/gapseq/findtransport/meta.yml @@ -28,16 +28,16 @@ input: pattern: "*.{fasta,fa,faa,fna,gz}" ontologies: [] output: - csv: + tbl: - - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - "*.csv": + - "*.tbl": type: file - description: CSV files containing transporter predictions - pattern: "*.csv" + description: TBL files containing transporter predictions + pattern: "*.tbl" ontologies: [] fna: - - meta: