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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions modules/nf-core/gapseq/doall/environment.yml
Original file line number Diff line number Diff line change
@@ -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
48 changes: 48 additions & 0 deletions modules/nf-core/gapseq/doall/main.nf
Original file line number Diff line number Diff line change
@@ -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
"""
}
92 changes: 92 additions & 0 deletions modules/nf-core/gapseq/doall/meta.yml
Original file line number Diff line number Diff line change
@@ -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"
57 changes: 57 additions & 0 deletions modules/nf-core/gapseq/doall/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -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() }
)
}
}
}
7 changes: 7 additions & 0 deletions modules/nf-core/gapseq/draft/environment.yml
Original file line number Diff line number Diff line change
@@ -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
44 changes: 44 additions & 0 deletions modules/nf-core/gapseq/draft/main.nf
Original file line number Diff line number Diff line change
@@ -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
"""
}
68 changes: 68 additions & 0 deletions modules/nf-core/gapseq/draft/meta.yml
Original file line number Diff line number Diff line change
@@ -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"
35 changes: 35 additions & 0 deletions modules/nf-core/gapseq/draft/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -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() }
)
}
}
}
7 changes: 7 additions & 0 deletions modules/nf-core/gapseq/fill/environment.yml
Original file line number Diff line number Diff line change
@@ -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
Loading
Loading