Skip to content

Commit

Permalink
feat(metabolomics): carveme independent of cplex
Browse files Browse the repository at this point in the history
  • Loading branch information
pbelmann committed Feb 13, 2024
1 parent efd1725 commit 5d7f40c
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 28 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/prodTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ jobs:
run: |
bash ./scripts/test_fullPipeline.sh \
" -c /vol/spool/aws.config --databases=/vol/scratch/databases/ --logDir s3://toolkit-dev-benchmark \
--carveme_image=pbelmann/metabolomics:0.1.0 --steps.metabolomics.beforeProcessScript=/vol/spool/dockerPull.sh \
--steps.metabolomics.smetana.beforeProcessScript=/vol/spool/dockerPull.sh \
--smetana_image=pbelmann/metabolomics:0.1.0 --steps.cooccurrence.beforeProcessScript=/vol/spool/dockerPull.sh \
--steps.fragmentRecruitment.mashScreen.genomes=/vol/spool/toolkit/gtdb/paths.tsv \
--steps.metabolomics.carveme.additionalParams='' " \
./default/fullPipeline_illumina_nanpore.yml "" slurm || exit 1
9 changes: 5 additions & 4 deletions .github/workflows/workflow_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
run: |
VERSION=$(sort VERSIONS.txt | tail -n 1)
bash ./scripts/test_fullPipeline.sh \
" --carveme_image=pbelmann/metabolomics:0.1.0 --smetana_image=pbelmann/metabolomics:0.1.0 --databases=/vol/scratch/databases/ --output=output " \
" --smetana_image=pbelmann/metabolomics:0.1.0 --databases=/vol/scratch/databases/ --output=output " \
"" "${WORK_DIR}" ${PROFILE} ${VERSION} || exit 1
- name: Test EMGB import tools
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
VERSION=$(sort -r VERSIONS.txt | tail -n 1)
bash ./scripts/test_fullPipeline.sh \
" --databases=/vol/scratch/databases/ --output=output \
--smetana_image=pbelmann/metabolomics:0.1.0 --carveme_image=pbelmann/metabolomics:0.1.0 --steps.cooccurrence.beforeProcessScript=/vol/spool/dockerPull.sh " \
--smetana_image=pbelmann/metabolomics:0.1.0 --steps.cooccurrence.beforeProcessScript=/vol/spool/dockerPull.sh " \
./example_params/fullPipelineIlluminaOrONT.yml \
"${WORK_DIR}" ${PROFILE} ${VERSION} || exit 1
Expand Down Expand Up @@ -377,8 +377,9 @@ jobs:
- name: Metabolomics
run: |
bash ./scripts/test_metabolomics.sh " -c test_data/assets/aws.config \
--carveme_image=pbelmann/metabolomics:0.1.0 --steps.metabolomics.beforeProcessScript=/vol/spool/dockerPull.sh \
--smetana_image=pbelmann/metabolomics:0.1.0 --gapseq_image=pbelmann/metabolomics:0.1.0 --steps.metabolomics.carveme.additionalParams='' " \
--steps.metabolomics.smetana.beforeProcessScript=/vol/spool/dockerPull.sh \
--steps.metabolomics.memote.beforeProcessScript=/vol/spool/dockerPull.sh \
--smetana_image=pbelmann/metabolomics:0.1.0 " \
"" "${WORK_DIR}" "slurm"
plasmid:
timeout-minutes: 800
Expand Down
7 changes: 4 additions & 3 deletions default/fullPipeline_illumina_nanpore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -289,19 +289,20 @@ steps:
source: s3://databases_internal/kegg-links-mirror-2021-01.tar.gz
md5sum: 69538151ecf4128f4cb1e0ac21ff55b3
metabolomics:
beforeProcessScript: ""
filter:
minCompleteness: 50
maxContamination: 5
gapseq:
additionalParams: ""
carveme:
additionalParams: " --solver scip "
smetana:
beforeProcessScript: ""
global: false
detailed: false
additionalParams:
detailed: ""
global: ""
memote:
beforeProcessScript: ""
additionalParams:
run: ""
report: ""
Expand Down
7 changes: 4 additions & 3 deletions default/fullPipeline_illumina_nanpore_without_aggregate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,19 +248,20 @@ steps:
source: https://openstack.cebitec.uni-bielefeld.de:8080/databases/mob_20220929.gz
md5sum: 21fcaf9c3754a985d1d6875939d71e28
metabolomics:
beforeProcessScript: ""
filter:
minCompleteness: 50
maxContamination: 5
gapseq:
additionalParams: ""
carveme:
additionalParams: " --solver scip "
smetana:
beforeProcessScript: ""
global: false
detailed: false
additionalParams:
detailed: ""
global: ""
memote:
beforeProcessScript: ""
additionalParams:
run: ""
report: ""
Expand Down
7 changes: 7 additions & 0 deletions docker/toolkit-carveme/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM quay.io/metagenomics/toolkit-python:3.7-1
RUN pip install carveme==1.6.1 pyscipopt \
&& wget http://github.com/bbuchfink/diamond/releases/download/v2.1.9/diamond-linux64.tar.gz \
&& tar xzvf diamond-linux64.tar.gz \
&& chmod a+x diamond \
&& mv diamond /usr/local/bin/

1 change: 1 addition & 0 deletions docker/toolkit-carveme/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.6.1-0
2 changes: 1 addition & 1 deletion docs/modules/metabolomics.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ In the following example your the image name is metabolomics:0.1.0:

* `--gapseq_image=metabolomics:0.1.0` (Optional)
* `--smetana_image=metabolomics:0.1.0` (Required)
* `--carveme_image=metabolomics:0.1.0` (Required)
* `--carveme_image=metabolomics:0.1.0` (Optional. Carveme is not able to detect the solver automatically. Please specify `--solver` in the configuration file if you want to use the scip solver.)
* `--memote_image=metabolomics:0.1.0` (Optional. Memote is not able to detect the solver automatically. Please specify `--solver` in the configuration file if you are not using the glpk solver.)

For gapseq and memote we are using a publicly available docker image that uses the freely available glkp solver which means that you don't have to provide this parameter.
Expand Down
5 changes: 3 additions & 2 deletions example_params/fullPipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,19 +217,20 @@ steps:
database:
extractedDBPath: "/vol/spool/toolkit/kegg_2021-01/"
metabolomics:
beforeProcessScript: /vol/spool/dockerPull.sh
filter:
minCompleteness: 49
maxContamination: 5
carveme:
additionalParams: ""
additionalParams: " --solver scip "
smetana:
beforeProcessScript: /vol/spool/dockerPull.sh
global: false
detailed: false
additionalParams:
detailed: ""
global: ""
memote:
beforeProcessScript: /vol/spool/dockerPull.sh
additionalParams:
run: ""
report: ""
Expand Down
5 changes: 3 additions & 2 deletions example_params/metabolomics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,22 @@ logLevel: 1
scratch: "/vol/scratch"
steps:
metabolomics:
beforeProcessScript: /vol/spool/dockerPull.sh
input:
bins: "test_data/metabolomics/input.tsv"
filter:
minCompleteness: 49
maxContamination: 5
carveme:
additionalParams: ""
additionalParams: " --solver scip "
smetana:
beforeProcessScript: /vol/spool/dockerPull.sh
global: true
detailed: true
additionalParams:
detailed: ""
global: ""
memote:
beforeProcessScript: /vol/spool/dockerPull.sh
additionalParams:
run: ""
report: ""
Expand Down
16 changes: 8 additions & 8 deletions modules/metabolomics/module.nf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ process pGapSeq {

tag "Sample: $sample, Bin: $id"

beforeScript params?.steps.containsKey("metabolomics") \
? Utils.getBeforeScript(params?.steps?.metabolomics?.beforeProcessScript.trim(), params.gapseq_image) \
beforeScript params?.steps.containsKey("metabolomics") && params?.steps?.metabolomics?.gapseq?.containsKey("beforeProcessScript") \
? Utils.getBeforeScript(params?.steps?.metabolomics?.gapseq?.beforeProcessScript.trim(), params.gapseq_image) \
: ""

when params.steps.containsKey("metabolomics") \
Expand Down Expand Up @@ -60,8 +60,8 @@ process pMemote {

container "${params.memote_image}"

beforeScript params?.steps.containsKey("metabolomics") \
? Utils.getBeforeScript(params?.steps?.metabolomics?.beforeProcessScript.trim(), params.memote_image) \
beforeScript params?.steps.containsKey("metabolomics") && params?.steps?.metabolomics?.memote?.containsKey("beforeProcessScript") \
? Utils.getBeforeScript(params?.steps?.metabolomics?.memote?.beforeProcessScript.trim(), params.memote_image) \
: ""

when params.steps.containsKey("metabolomics") && params.steps.metabolomics.containsKey("memote")
Expand Down Expand Up @@ -92,8 +92,8 @@ process pSmetanaDetailed {

container "${params.smetana_image}"

beforeScript params?.steps.containsKey("metabolomics") \
? Utils.getBeforeScript(params?.steps?.metabolomics?.beforeProcessScript.trim(), params.smetana_image) \
beforeScript params?.steps.containsKey("metabolomics") && params?.steps?.metabolomics?.smetana?.containsKey("beforeProcessScript") \
? Utils.getBeforeScript(params?.steps?.metabolomics?.smetana?.beforeProcessScript.trim(), params.smetana_image) \
: ""

publishDir params.output, mode: "${params.publishDirMode}", saveAs: { filename -> getOutput("${sample}", params.runid , "smetana/detailed/", filename) }, \
Expand Down Expand Up @@ -121,8 +121,8 @@ process pSmetanaGlobal {

tag "Sample: $sample"

beforeScript params?.steps.containsKey("metabolomics") \
? Utils.getBeforeScript(params?.steps?.metabolomics?.beforeProcessScript.trim(), params.smetana_image) \
beforeScript params?.steps.containsKey("metabolomics") && params?.steps?.metabolomics?.smetana?.containsKey("beforeProcessScript") \
? Utils.getBeforeScript(params?.steps?.metabolomics?.smetana?.beforeProcessScript.trim(), params.smetana_image) \
: ""

container "${params.smetana_image}"
Expand Down
4 changes: 2 additions & 2 deletions modules/metabolomics/processes.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ process pCarveMe {

when params.steps.containsKey("metabolomics") && params.steps.metabolomics.containsKey("carveme")

beforeScript params?.steps.containsKey("metabolomics") \
? Utils.getBeforeScript(params?.steps?.metabolomics?.beforeProcessScript.trim(), params.carveme_image) \
beforeScript params?.steps.containsKey("metabolomics") && params?.steps?.metabolomics?.carveme?.containsKey("beforeProcessScript") \
? Utils.getBeforeScript(params.steps.metabolomics.carveme.beforeProcessScript.trim(), params.carveme_image) \
: ""

publishDir params.output, mode: "${params.publishDirMode}", saveAs: { filename -> getOutput("${sample}", params.runid, "carveme", filename) }, \
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ params {
bandage_image = "quay.io/biocontainers/bandage:0.8.1--hc9558a2_2"
nonpareil_image = "quay.io/biocontainers/nonpareil:3.4.1--r41h9f5acd7_1"
ubuntu_image = "quay.io/metagenomics/toolkit-ubuntu:20.04-0"
carveme_image = "carveme"
carveme_image = "quay.io/metagenomics/toolkit-carveme:1.6.1-0"
cobra_image = "quay.io/biocontainers/cobra:0.21.0--pyh5e36f6f_1"
memote_image = "quay.io/metagenomics/toolkit-memote:0.13.0-0"
smetana_image = "smetana"
Expand Down

0 comments on commit 5d7f40c

Please sign in to comment.