franciscozorrilla / metaGEM

:gem: An easy-to-use workflow for generating context specific genome-scale metabolic models and predicting metabolic interactions within microbial communities directly from metagenomic data
https://franciscozorrilla.github.io/metaGEM/
MIT License
189 stars 41 forks source link

-bash: snakemake: command not found when running binRefine #73

Closed slambrechts closed 3 years ago

slambrechts commented 3 years ago

Hi,

When running bash metaGEM.sh -t binRefine -c 48 -m 125 --local I get:

-bash: snakemake: command not found

I set up the environments as described in Manual setup

When using the metaGEMenvironment, this doesn't happen when running the metaGEM.sh script, it only seems to occur when trying to use the metaWRAPenvironment.

I tried to fix this by installing snakemake inside that metaWRAPenvironment by running:

conda activate /kyukon/scratch/gent/vo/000/gvo00043/vsc42339/MICROBIAN/metaGEM/envs/metawrap
mamba install -c bioconda snakemake

but got Problem: package snakemake-5.2.1-0 requires aioeasywebdav, but none of the providers can be installed

Any idea why this is happening in the metaWRAP environment and not in the metaGEM one?

franciscozorrilla commented 3 years ago

Hi Sam,

Indeed, this is a feature not a bug. You really only need to have snakemake installed in one of the two envs, and since metaWRAP is still on python2 (last time I checked) I'm not surprised you that you run into dependency issues. Simply deactive the metawrap env and activate the metagem env, then you will be able to run the metaGEM.sh script/snakemake with no probs; the metawrap environment will be activated within each cluster job. In other words, you do not need to have the metawrap env activated to submit jobs that use the metawrap env (even when using the --local flag).

Best, Francisco

franciscozorrilla commented 3 years ago

Also, quick reminder that you do not need to provide the -c or -m flags when using --local mode. The -c and -m parameters are only used to configure the cluster_config.json file for submitting jobs to the scheduler. When running --local mode, the job will use all the memory available to it + the cores specified in the config.yaml file, so you really only need to run:

bash metaGEM.sh -t binRefine --local
slambrechts commented 3 years ago

Hi Francisco,

Ok good to know, thanks! To explain where the confusion came from, I'm following the metaGEM tutorial, and there it looks like the metawrap env is activated before running binRefine:

# Install directly from conda
conda create --name metawrap-env --channel ursky metawrap-mg=1.3.2

# Alternatively install from conda recipie 
conda env create -f metaWRAP_env.yml

source activate metawrap-env

Refine & reassemble bin sets:

bash metaGEM.sh -t binRefine -j 2 -c 24 -m 150 -h 24
bash metaGEM.sh -t binReassemble -j 2 -c 24 -m 150 -h 24

Best, Sam

franciscozorrilla commented 3 years ago

I can see how the information may be presented in a misleading way, I have now removed the installation instructions from the tutorial as this info really belongs in the wiki. Thanks!