Error: Unable to find the mpa_pkl file at: mpa_pklExiting

Hi.
I’ve installed metaphlan 3 using this command:

conda create --name mpa -c bioconda python=3.7 metaphlan

Then I’ve installed the database using this command:

mkdir -p $WORK_DIR/mpa_db metaphlan --install --bowtie2db $WORK_DIR/mpa_db

Inside the directory mpd_db I can find these files:

-rw-rw-r-- 1 dpietruc interactive 342M Jun 30 2020 mpa_v30_CHOCOPhlAn_201901.fna.bz2
-rw-r–r-- 1 dpietruc interactive 26 Jan 19 14:26 mpa_latest
-rw-r–r-- 1 dpietruc interactive 367M Jan 19 14:27 mpa_v30_CHOCOPhlAn_201901.tar
-rw-r–r-- 1 dpietruc interactive 64 Jan 19 14:27 mpa_v30_CHOCOPhlAn_201901.md5
-rw-rw-r-- 1 dpietruc interactive 286M Jan 19 14:28 mpa_v30_CHOCOPhlAn_201901.4.bt2
-rw-rw-r-- 1 dpietruc interactive 9.9M Jan 19 14:28 mpa_v30_CHOCOPhlAn_201901.3.bt2
-rw-rw-r-- 1 dpietruc interactive 286M Jan 19 14:35 mpa_v30_CHOCOPhlAn_201901.2.bt2
-rw-rw-r-- 1 dpietruc interactive 601M Jan 19 14:35 mpa_v30_CHOCOPhlAn_201901.1.bt2
-rw-rw-r-- 1 dpietruc interactive 286M Jan 19 14:43 mpa_v30_CHOCOPhlAn_201901.rev.2.bt2
-rw-rw-r-- 1 dpietruc interactive 601M Jan 19 14:43 mpa_v30_CHOCOPhlAn_201901.rev.1.bt2

However, when I run the command:

metaphlan $Name_file_forward,$Name_file_reverse --bowtie2db $WORK_DIR/mpa_db/ --input_type fastq --read_min_len 30 --bowtie2out $Bam --input_type fastq --nproc 8 --stat_q 0.01 -t rel_ab_w_read_stats > $Out

I get this error:

Error: Unable to find the mpa_pkl file at: mpa_pklExiting...

Can you help me to solve this problem? Thanks in advance!

Have you tried unpacking mpa_v30_CHOCOPhlAn_201901.tar?

Thanks, I’ve unpacked the file and now it’s working!

Hi, I have unpacked mpa_v30_CHOCOPhlAn_201901.tar but still get the same error when I run the command:
‘metaphlan unmapped.ASD001_r1.fastq,unmapped.ASD001_r2.fastq --bowtie2db /home/yanz/miniconda3/envs/biosoftware/lib/python3.6/site-packages/metaphlan/metaphlan_databases --nproc 12 --input_type fastq -o unmapped_metagenome.txt’
‘Error: Unable to find the mpa_pkl file at: mpa_pklExiting…’

can anyone help me :frowning:

Have you built the database using bowtie2-build or metaphlan --install?
Can you post there the output of ls -l /home/yanz/miniconda3/envs/biosoftware/lib/python3.6/site-packages/metaphlan/metaphlan_databases ?

Hi all,

I got the same error, can you help me to have a look at?

humann \
> --input final/ff05623391_kneaddata.fastq \
> --threads 12 \
> --nucleotide-database 16SrRNA/humann/chocophlan/ \
> --protein-database 16SrRNA/humann/uniref/ \
> --output humann/
Running metaphlan ........

CRITICAL ERROR: Error executing: /home/c.c2050857/.conda/envs/microbio/bin/metaphlan /scratch/c.c2050857/James/Microbiota/kneaddata/final/ff05623391_kneaddata.fastq -t rel_ab -o /scratch/c.c2050857/James/Microbiota/humann/ff05623391_kneaddata_humann_temp/ff05623391_kneaddata_metaphlan_bugs_list.tsv --input_type fastq --bowtie2out /scratch/c.c2050857/James/Microbiota/humann/ff05623391_kneaddata_humann_temp/ff05623391_kneaddata_metaphlan_bowtie2.txt --nproc 12

Error message returned from metaphlan :
/home/c.c2050857/.conda/envs/microbio/lib/python3.10/site-packages/h5py/__init__.py:36: UserWarning: h5py is running against HDF5 1.14.3 when it was built against 1.14.2, this may cause problems
  _warn(("h5py is running against HDF5 {0} when it was built against {1}, "
Error: Unable to find the mpa_pkl file at: mpa_pklExiting...
metaphlan --install
/home/c.c2050857/.conda/envs/microbio/lib/python3.10/site-packages/h5py/__init__.py:36: UserWarning: h5py is running against HDF5 1.14.3 when it was built against 1.14.2, this may cause problems
  _warn(("h5py is running against HDF5 {0} when it was built against {1}, "
The database is installed

Any advice would be highly appreciated! Thanks.

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/