metaGEM
metaGEM copied to clipboard
Error in running metaGEM.sh
After installing the pipeline through the manual installation guide (which worked better for me than the automatic installation), I was receiving the following error when trying the check with bash metaGEM.sh -t check
:
Setting current directory to root in config.yaml file ...
Checking if conda is available ... detected version 4.13.0!
Searching for metaGEM conda environment ... detected! Activating metagem env ...
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
- bash
- fish
- tcsh
- xonsh
- zsh
- powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
Searching for metaWRAP conda environment ... detected!
Searching for prokka-roary conda environment ... detected!
However, the problem seemed to be on the script, because I was able to execute conda activate
normally. The source of the problem was on line 114 in metaGEM.sh, when the script calls conda activate metagem
.
To solve this issue, first is important that you can call metagem env using conda activate metagem
without the directly path to the env. I believe the best solution is to add the env directory locate inside metaGEM directory to the conda envs_dirs list with
conda config --append envs_dirs ~/metaGEM/envs
Then, to make sure the script will be able to use conda activate
, following https://github.com/conda/conda/issues/7980#issuecomment-441358406, I add source ~/anaconda3/etc/profile.d/conda.sh
to the top of the metaGEM.sh script, just after #!/bin/bash. This made the script works perfectly.