The bioBakery help forum

Help with strainphlan/metaphlan/sample2markers

I am trying to run strainPhlan and I get the following error:
File “/mypath/metaphlan-3.0/lib/python3.7/”, line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘bowtie2-build’, ‘–usage’]’ returned non-zero exit status 250.

Can anyone help?

I tried again and am getting this issue:

Downloading MetaPhlAn database
Please note due to the size this might take a few minutes

File /Users/miniconda3/lib/python3.7/site-packages/metaphlan/metaphlan_databases/file_list.txt already present!
Traceback (most recent call last):
File “/Users/miniconda3/bin/metaphlan”, line 10, in
File “/Users/miniconda3/lib/python3.7/site-packages/metaphlan/”, line 1187, in main
pars[‘index’] = check_and_install_database(pars[‘index’], pars[‘bowtie2db’], pars[‘bowtie2_build’], pars[‘nproc’], pars[‘force_download’])
File “/Users/miniconda3/lib/python3.7/site-packages/metaphlan/”, line 610, in check_and_install_database
download_unpack_tar(FILE_LIST, index, bowtie2_db, bowtie2_build, nproc)
File “/Users/miniconda3/lib/python3.7/site-packages/metaphlan/”, line 463, in download_unpack_tar
url_tar_file = ls_f[“mpa_” + download_file_name + “.tar”]
KeyError: ‘mpa_mpa_v30_CHOCOPhlAn_201901.tar’

Hi @Ana can you try installing MetaPhlAn in a separate environment?
You can do that by running conda create --name mpa -c bioconda python=3.7 metaphlan.

Before using MetaPhlAn, you should activate the mpa environment with conda activate mpa

This error is a result of a bug present in an older build, now resolved in the latest version.

Hi @fbeghini, I have tried removing my existing mpa environment and reinstalling MetaPhlAn in a separate environment as you instructed. However, I still got the same error. For context, I was trying to run $ metaphlan SRS014476-Supragingival_plaque.fasta.gz --input_type fasta > SRS014476-Supragingival_plaque_profile.txt as part of the tutorial. What should I do to get it working? Thanks!

Have you configured the bioconda channels correctly? There is a guide in the Bioconda documentation describing how to do this.

I would try to re-setup the channels and then to reinstall MetaPhlAn in a new environment, this time let’s create first the environment with

conda create --name mpa python=3.7

then install MetaPhlAn by specifying the version

conda activate mpa
conda install -c bioconda metaphlan=3.0.10

Let me know if this time it works!

Hi @fbeghini, thanks for your reply! I’m pretty sure I configured the bioconda channels correctly according to the Bioconda documentation. I tried reinstalling MetaPhlAn in a new environment with your command lines but the situation persisted. I also tried removing and reinstalling bowtie2 but to no avail. I believe the fact bowtie2 didn’t work properly was why I got an empty .txt file that was supposed to be one of the intermediate mapping results to unique sequence markers.

Yes, it is plausible. Can you attach here the output of conda info -a so we can try to resolve your installation issue?