Metaphlan database issue when running humann

HI

I have installed humann with conda as explained in the tutorial, and now I have these versions:

Bowtie2 version 2.4.4
MetaPhlAn version 3.0
humann v3.9

I coudldn’t use metaphlan - - install to install metaphlan database because our cluster don’t have access to dropbox, so I downloaded the last version of the database from http://cmprod1.cibio.unitn.it/biobakery4/metaphlan_databases/, I downloaded these files:

[mpa_vOct22_CHOCOPhlAnSGB_202403.tar]
[mpa_vOct22_CHOCOPhlAnSGB_202403.md5]
[mpa_vOct22_CHOCOPhlAnSGB_202403_marker_info.txt.bz2]
[mpa_vOct22_CHOCOPhlAnSGB_202403_species.txt.bz2]

I unzipped them and ran bowtie2-build command within the default folder (~/miniconda3/envs/humann_3/lib/python3.7/site-packages/metaphlan/metaphlan_databases)

(I have two files mpa_vOct22_CHOCOPhlAnSGB_202403.fna and mpa_vOct22_CHOCOPhlAnSGB_202403_VSG.fna. I used the VSG version)

bowtie2-build mpa_vOct22_CHOCOPhlAnSGB_202403_VSG.fna mpa_vOct22_CHOCOPhlAnSGB_202403_VSG

I tested humann with the demo
humann --input demo.fastq.gz --output demo_output --bowtie-options ‘–index mpa_vOct22_CHOCOPhlAnSGB_202403_VSG --bowtie2db /mfs/nmadi/miniconda3/envs/humann_3/lib/python3.7/site-packages/metaphlan/metaphlan_databases’

but I get an error from metaphlan, so I tested metaphlan separately (I get the same error)

metaphlan SRS014476-Supragingival_plaque.fasta.gz --input_type fastq --index mpa_vOct22_CHOCOPhlAnSGB_202403 --bowtie2db /mfs/nmadi/miniconda3/envs/humann_3/lib/python3.7/site-packages/metaphlan/metaphlan_databases/mpa_vOct22_CHOCOPhlAnSGB_202403 -o Supragingival.txt > Supragingival_profile.txt

Here is the error.

Warning! Biom python library not detected!

Exporting to biom format will not work!

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

Downloading MetaPhlAn 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 “/mfs/nmadi/miniconda3/envs/humann_3/bin/metaphlan”, line 10, in

sys.exit(main())

File “/mfs/nmadi/miniconda3/envs/humann_3/lib/python3.7/site-packages/metaphlan/metaphlan.py”, line 1187, in main

pars[‘index’] = check_and_install_database(pars[‘index’], pars[‘bowtie2db’], pars[‘bowtie2_build’], pars[‘nproc’], pars[‘force_download’])

File “/mfs/nmadi/miniconda3/envs/humann_3/lib/python3.7/site-packages/metaphlan/metaphlan.py”, line 610, in check_and_install_database

download_unpack_tar(FILE_LIST, index, bowtie2_db, bowtie2_build, nproc)

File “/mfs/nmadi/miniconda3/envs/humann_3/lib/python3.7/site-packages/metaphlan/metaphlan.py”, line 463, in download_unpack_tar

url_tar_file = ls_f[“mpa_” + download_file_name + “.tar”]

UnboundLocalError: local variable ‘ls_f’ referenced before assignment

I am not sure which database to download. I have tried ‘202103_SGB’ and ‘201901’ without success.
Thanks in advance

Best,

Naïma

Hello
I finally installed a fresh version of human with conda, I read that humann3.6 , metaphlan4.0.3 and Jan21 database (this database can be downloaded with metaphlan –install since the source is not on dropbox ).

this time Metaphlan is working well, but not human.

I get this error :

Traceback (most recent call last):
File “/mfs/nmadi/miniconda3/envs/humann36/bin/humann”, line 10, in
sys.exit(main())
File “/mfs/nmadi/miniconda3/envs/humann36/lib/python3.7/site-packages/humann/humann.py”, line 979, in main
custom_database = prescreen.create_custom_database(config.nucleotide_database, bug_file)
File “/mfs/nmadi/miniconda3/envs/humann36/lib/python3.7/site-packages/humann/search/prescreen.py”, line 215, in create_custom_database
config.metaphlan_v3_db_version+" or “+metaphlan_v4_db_version+” . Please update your version of MetaPhlAn to at least v3.0."
NameError: name ‘metaphlan_v4_db_version’ is not defined

Based on what I read on this forum there is a line with read count in the metaphlan profile that causes this error .

so I removed the line from the metaphlan profile and run humann and it’s working !!!

did you resolve this issue in humann 3.7 ? so I just have to upgrade humann to 3.7 ?

That means metaphlan 4.0.3 is not compatible with human 3.6.

Do you know which humann works with which metaphlan ?

Thanks in advance,

All the best,

Naïma

I think I will stick with humann 3.6 and metaphlan 4.0.3 and just remove the line with read count from metaphlan profile,
Naïma