Unable to find the mpa_pkl

Hi, I’m trying to run humann2 locally (macOS), I understand that proper dependencies should be installed using ‘conda install -c biobakery humann2’. In my case I got humann2 v2.8.1, MetaPhlAn version 2.6.0, diamond version 0.8.36, and Bowtie 2 version 2.3.5.1
I am trying to run the demo but I’m gettin the next error:
Error message returned from metaphlan2.py :
Error: Unable to find the mpa_pkl file at: //anaconda3/envs/py27/bin/db_v20/mpa_v20_m200.pkl
Expecting location ${mpa_dir}/db_v20/map_v20_m200.pkl
Select the file location with the option --mpa_pkl.

If I am understanding this correctly, I’m missing a database that should’ve been download with the Metaphlan package?
I thank you in advance!

Hello, Yes you are right. It looks like you do not have the MetaPhlAn database installed. Try removing all of the files in the expected database folder (on your system this looks to be //anaconda3/envs/py27/bin/db_v20/*) and then rerun the demo. MetaPhlAn should automatically install the database.

Thank you,
Lauren

1 Like

I meet the same problem, have you resolved it?

Hey, unfortunately I did not. I did what Lauren suggested (removed all files from the download folder and rerun the demo), also compile and install from source and could not get everything to work correctly. I ended up using the HUMAnN3 docker, that worked perfectly for me.

hi, have you resolved the problem?

I think that the database file for metaphlan2 (map_v20_m200) can be still downloaded at http://cmprod1.cibio.unitn.it/databases/MetaPhlAn/metaphlan_databases/.
Then, you can specify metaphlan database location with the option --metaphlan-options "--bowtie2db <PUT_YOUR_FOLDER_HERE>"

1 Like

Marco solved this problem!

step1: download metaphlan databases

wget http://cmprod1.cibio.unitn.it/databases/MetaPhlAn/metaphlan_databases/mpa_v31_CHOCOPhlAn_201901.tar

step2: uncompress metaphlan databases

tar -xvf mpa_v31_CHOCOPhlAn_201901.tar

step3: specific the metaphlan databases location

humann \
--input final/ff05623391_kneaddata.fastq \
--threads 12 \
--metaphlan-options "--bowtie2db /16SrRNA/metaphlan/" \
--nucleotide-database 16SrRNA/humann/chocophlan/ \
--protein-database 16SrRNA/humann/uniref/ \
--output Microbiota/humann/

Glad you found a solution!