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
203 stars 42 forks source link

conda metagem environment #104

Closed paristzou closed 2 years ago

paristzou commented 2 years ago

conda info --envs

conda environments:

# base * /newdisk2/anaconda3 snakemake /newdisk2/anaconda3/envs/snakemake /newdisk2/metaGEM/envs/metagem /newdisk2/metaGEM/envs/metawrap /newdisk2/metaGEM/envs/prokkaroary source activate /newdisk2/metaGEM/envs/metagem conda info --envs

conda environments:

# base /newdisk2/anaconda3 snakemake /newdisk2/anaconda3/envs/snakemake

  • /newdisk2/metaGEM/envs/metagem /newdisk2/metaGEM/envs/metawrap /newdisk2/metaGEM/envs/prokkaroary bash metaGEM.sh --task fastp --local ... Activating envs/metagem conda environment ... /bin/bash: row 3: activate: no such file or directory [Wed May 4 22:47:55 2022] Error in rule qfilter: jobid: 2 output: /newdisk2/metaGEM/qfiltered/HPisland1/HPisland1_R1.fastq.gz, /newdisk2/metaGEM/qfiltered/HPisland1/HPisland1_R2.fastq.gz shell:
    # Activate metagem environment
    echo -e "Activating envs/metagem conda environment ... "
    set +u;source activate envs/metagem;set -u;

sounds like qfilter cannot find conda environment

franciscozorrilla commented 2 years ago

Please update the config.yaml file with the ful path of the metagem environment. More specifically, update this line https://github.com/franciscozorrilla/metaGEM/blob/cdaeb25e5177751b1df21d078c204377054e51c4/config.yaml#L84

with this

metagem: /newdisk2/metaGEM/envs/metagem

For more details please refer to this wiki page.

paristzou commented 2 years ago

Thank you so much. I did what you suggests. But it still shows the same error message.

franciscozorrilla commented 2 years ago

Can you activate the environment manually? i.e.

source activate /newdisk2/metaGEM/envs/metagem

If you are running locally, silence the line that activates the conda environment within the qfiltering Snakemake rule, e.g.

# set +u;source activate envs/metagem;set -u;

Then you can simply activate the enironment manually as show above, and then submit the jobs.

paristzou commented 2 years ago

It can work now. Thank you very much.