diff --git a/.github/workflows/prodTest.yml b/.github/workflows/prodTest.yml index fae820de..34cf7165 100644 --- a/.github/workflows/prodTest.yml +++ b/.github/workflows/prodTest.yml @@ -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 diff --git a/.github/workflows/workflow_modules.yml b/.github/workflows/workflow_modules.yml index 3564777e..f3491eca 100644 --- a/.github/workflows/workflow_modules.yml +++ b/.github/workflows/workflow_modules.yml @@ -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 @@ -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 @@ -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 diff --git a/default/fullPipeline_illumina_nanpore.yml b/default/fullPipeline_illumina_nanpore.yml index b2add82a..d6d93253 100644 --- a/default/fullPipeline_illumina_nanpore.yml +++ b/default/fullPipeline_illumina_nanpore.yml @@ -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: "" diff --git a/default/fullPipeline_illumina_nanpore_without_aggregate.yml b/default/fullPipeline_illumina_nanpore_without_aggregate.yml index caafd586..b9b58525 100644 --- a/default/fullPipeline_illumina_nanpore_without_aggregate.yml +++ b/default/fullPipeline_illumina_nanpore_without_aggregate.yml @@ -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: "" diff --git a/docker/toolkit-carveme/Dockerfile b/docker/toolkit-carveme/Dockerfile new file mode 100644 index 00000000..b67dc1f4 --- /dev/null +++ b/docker/toolkit-carveme/Dockerfile @@ -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/ + diff --git a/docker/toolkit-carveme/VERSION b/docker/toolkit-carveme/VERSION new file mode 100644 index 00000000..2d3570c9 --- /dev/null +++ b/docker/toolkit-carveme/VERSION @@ -0,0 +1 @@ +1.6.1-0 diff --git a/docs/modules/metabolomics.md b/docs/modules/metabolomics.md index 9e374b38..5af4eaef 100644 --- a/docs/modules/metabolomics.md +++ b/docs/modules/metabolomics.md @@ -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. diff --git a/example_params/fullPipeline.yml b/example_params/fullPipeline.yml index 82ca090d..fb81c108 100644 --- a/example_params/fullPipeline.yml +++ b/example_params/fullPipeline.yml @@ -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: "" diff --git a/example_params/metabolomics.yml b/example_params/metabolomics.yml index 0ac1c851..441c743d 100644 --- a/example_params/metabolomics.yml +++ b/example_params/metabolomics.yml @@ -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: "" diff --git a/modules/metabolomics/module.nf b/modules/metabolomics/module.nf index ae38371b..7fefcb07 100644 --- a/modules/metabolomics/module.nf +++ b/modules/metabolomics/module.nf @@ -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") \ @@ -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") @@ -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) }, \ @@ -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}" diff --git a/modules/metabolomics/processes.nf b/modules/metabolomics/processes.nf index 3304a9fd..4d1be6a7 100644 --- a/modules/metabolomics/processes.nf +++ b/modules/metabolomics/processes.nf @@ -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) }, \ diff --git a/nextflow.config b/nextflow.config index a49ab00f..f5bc96db 100644 --- a/nextflow.config +++ b/nextflow.config @@ -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"