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
10 changes: 10 additions & 0 deletions modules/nf-core/refinegems/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
dependencies:
- conda-forge::python=3.10.19
- conda-forge::pip=25.2
- pip:
- refineGEMs==0.1.23
45 changes: 45 additions & 0 deletions modules/nf-core/refinegems/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
process REFINEGEMS {
tag "$meta.id"
label 'process_low'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/python:3.10.16' :
'docker.io/library/python:3.10-slim' }"

input:
tuple val(meta), val(config_type)

output:
tuple val(meta), path("*.yaml"), emit: yaml
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}"
"""
refinegems setup config \\
--type ${config_type} \\
--filename ${prefix}.yaml \\
$args

cat <<-END_VERSIONS > versions.yml
"${task.process}":
refinegems: \$(refinegems --version | sed -E 's/.*([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?).*/\1/')
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.yaml

cat <<-END_VERSIONS > versions.yml
"${task.process}":
refinegems: 0.1.23
END_VERSIONS
"""
}
48 changes: 48 additions & 0 deletions modules/nf-core/refinegems/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "refinegems"
description: Download a default refineGEMs configuration YAML file.
keywords:
- config
- yaml
- metabolic model
- genome-scale metabolic model
tools:
- refinegems:
description: A toolbox for fast curation and analysis of genome-scale metabolic models.
homepage: https://github.com/draeger-lab/refinegems
documentation: https://refinegems.readthedocs.io/en/latest/
tool_dev_url: https://github.com/draeger-lab/refinegems
licence: ["MIT"]
input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- config_type:
type: string
description: Type of config file to download. One of `media` or `refinegems`.
output:
yaml:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- "*.yaml":
type: file
description: A refineGEMs configuration YAML file.
pattern: "*.yaml"
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
authors:
- "@brovolia"
maintainers:
- "@brovolia"
30 changes: 30 additions & 0 deletions modules/nf-core/refinegems/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
nextflow_process {

name "Test Process REFINEGEMS"
script "../main.nf"
process "REFINEGEMS"

tag "modules"
tag "modules_nfcore"
tag "refinegems"

test("test-refinegems-stub") {
options '-stub'

when {
process {
"""
input[0] = [ [ id:'test', single_end:false ], 'refinegems' ]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}
}

}
37 changes: 37 additions & 0 deletions modules/nf-core/refinegems/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"test-refinegems-stub": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.yaml:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,998d15a0141fca0a296d2b5e50e95a40"
],
"yaml": [
[
{
"id": "test",
"single_end": false
},
"test.yaml:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,998d15a0141fca0a296d2b5e50e95a40"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2026-06-09T10:30:00.000000"
}
}