Metaphlan2 is available, but humann2 has errors

  1. My metaphlan2 2.8.1 is available.
    But,humann2 2.8.2 ask me to download metaphlan2 databases.

  2. I’ve tried installing metaphlan 2 2.7.8 and changing python 3 to python 2.
    Conda has made mistakes.

Can you help me ?

Error message returned from metaphlan2.py :

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

Downloading https://www.dropbox.com/sh/7qze7m7g9fe2xjg/AAA4XDP85WHon_eHvztxkamTa/file_list.txt?dl=1

Warning: Unable to download https://www.dropbox.com/sh/7qze7m7g9fe2xjg/AAA4XDP85WHon_eHvztxkamTa/file_list.txt?dl=1
Traceback (most recent call last):
File “/root/miniconda3/bin/metaphlan2.py”, line 1580, in
metaphlan2()
File “/root/miniconda3/bin/metaphlan2.py”, line 1373, in metaphlan2
check_and_install_database(pars[‘index’], pars[‘bowtie2db’], pars[‘bowtie2_build’], pars[‘nproc’], pars[‘offline’])
File “/root/miniconda3/bin/metaphlan2.py”, line 842, in check_and_install_database
download_unpack_tar(FILE_LIST, index, bowtie2_db, bowtie2_build, nproc)
File “/root/miniconda3/bin/metaphlan2.py”, line 749, in download_unpack_tar
url_tar_file = ls_f[“mpa_” + download_file_name + “.tar”]
UnboundLocalError: local variable ‘ls_f’ referenced before assignment

Traceback (most recent call last):
File “/root/miniconda3/bin/conda”, line 12, in
from conda.cli import main
ImportError: No module named conda.cli

Hello - Thank you for the detailed post and sorry to hear about the errors with the install. The latest version of HUMAnN 2 (v2.8.2) should be compatible with MetaPhlAn v2.8 or v2.7.8 with either python 2 or 3. It is expected that you will need to download the databases but newer versions of MetaPhlAn should download them for you. From your errors it looks like you are installing with conda. If you have not already done so, you might double check the versions conda has installed because sometimes it does not always install the latest versions. You can use the command $ conda list to print out all packages and versions installed in the current environment.

From the MetaPhlAn error you posted it looks like you might have an older version of the tool installed. If you upgrade your version it should resolve the error you are seeing. You might need to specify the version you would like installed in conda to make sure it pulls the version you would like. From the second error posted I am not sure what command is generating the error. If you would post a bit more about it I can help debug.

Thank you,
Lauren

hello , I install metaphlan2 under python=3.6 , but I failed , I wander that python (3.6 ) can support metaphlan2 ?
thank you