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..12dee79271c6 --- /dev/null +++ b/modules/nf-core/gapseq/doall/main.nf @@ -0,0 +1,48 @@ +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("*.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 + + 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 + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gapseq: \$(gapseq --version 2>&1 | sed 's/gapseq //') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_model-filled.RDS + 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 new file mode 100644 index 000000000000..827e116043ec --- /dev/null +++ b/modules/nf-core/gapseq/doall/meta.yml @@ -0,0 +1,92 @@ +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: [] + tbl: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tbl": + type: file + description: TBL files containing pathway and transporter predictions + pattern: "*.tbl" + 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: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML +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..a1f28f7c2319 --- /dev/null +++ b/modules/nf-core/gapseq/draft/main.nf @@ -0,0 +1,44 @@ +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 + path "versions.yml" , emit: 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 + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gapseq: \$(gapseq --version 2>&1 | sed 's/gapseq //') + END_VERSIONS + """ + + 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..517dfe503d67 --- /dev/null +++ b/modules/nf-core/gapseq/draft/meta.yml @@ -0,0 +1,68 @@ +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: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML +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..b6cdede4078b --- /dev/null +++ b/modules/nf-core/gapseq/fill/main.nf @@ -0,0 +1,47 @@ +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 + path "versions.yml" , emit: 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 + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gapseq: \$(gapseq --version 2>&1 | sed 's/gapseq //') + END_VERSIONS + """ + + 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..68b184330285 --- /dev/null +++ b/modules/nf-core/gapseq/fill/meta.yml @@ -0,0 +1,68 @@ +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: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML +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..0f9c1af49171 --- /dev/null +++ b/modules/nf-core/gapseq/find/main.nf @@ -0,0 +1,47 @@ +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("*.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 + + 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 + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gapseq: \$(gapseq --version 2>&1 | sed 's/gapseq //') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + 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 new file mode 100644 index 000000000000..4b81cf176b0e --- /dev/null +++ b/modules/nf-core/gapseq/find/meta.yml @@ -0,0 +1,74 @@ +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: + tbl: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tbl": + type: file + description: TBL files containing pathway and reaction predictions + pattern: "*.tbl" + 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: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML +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..1375b83ac891 --- /dev/null +++ b/modules/nf-core/gapseq/findtransport/main.nf @@ -0,0 +1,44 @@ +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("*.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 + + 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 + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gapseq: \$(gapseq --version 2>&1 | sed 's/gapseq //') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_transporters.tbl + """ +} diff --git a/modules/nf-core/gapseq/findtransport/meta.yml b/modules/nf-core/gapseq/findtransport/meta.yml new file mode 100644 index 000000000000..0481379d245e --- /dev/null +++ b/modules/nf-core/gapseq/findtransport/meta.yml @@ -0,0 +1,74 @@ +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: + tbl: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tbl": + type: file + description: TBL files containing transporter predictions + pattern: "*.tbl" + 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: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML +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() } + ) + } + } +}