# Unable to use MetaPhlAn-4 database

**URL:** https://forum.biobakery.org/t/unable-to-use-metaphlan-4-database/4440
**Category:** MetaPhlAn
**Created:** [November 24, 2022, 4:13pm UTC](https://forum.biobakery.org/t/unable-to-use-metaphlan-4-database/4440 "2022-11-24T16:13:55Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Afromm](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@Afromm](https://forum.biobakery.org/u/Afromm)
#### Post date: [November 24, 2022, 4:13pm UTC](https://forum.biobakery.org/t/unable-to-use-metaphlan-4-database/4440/1 "2022-11-24T16:13:55Z")

</div>

Dear Metaphlan developers,  
I have problems downloading and using MetaPhlAn-4 database.  
I downloaded Metaphlan using conda, then I tried to install the database using:

```auto
metaphlan --install--bowtie2db [my folder]

```

I then got an error:

```auto
Downloading http://cmprod1.cibio.unitn.it/biobakery4/metaphlan_databases/mpa_latest
Downloading file of size: 0.00 MB
0.01 MB 25600.00 % 43.29 MB/sec 0 min -0 sec
Downloading MetaPhlAn database
Please note due to the size this might take a few minutes

Downloading http://cmprod1.cibio.unitn.it/biobakery4/metaphlan_databases/mpa_vJan21_CHOCOPhlAnSGB_202103.tar
Downloading file of size: 2623.07 MB
2623.05 MB 100.00 % 261.05 MB/sec 0 min 0 sec
Warning: Unable to download http://cmprod1.cibio.unitn.it/biobakery4/metaphlan_databases/mpa_vJan21_CHOCOPhlAnSGB_202103.tar

Downloading http://cmprod1.cibio.unitn.it/biobakery4/metaphlan_databases/mpa_vJan21_CHOCOPhlAnSGB_202103.md5
Downloading file of size: 0.00 MB
MD5 checksums do not correspond! If this happens again, you should remove the database files and rerun MetaPhlAn so they are re-downloaded

```

After trying multiple times, I downloaded the files manually from  
[Index of /biobakery4/metaphlan\_databases](http://cmprod1.cibio.unitn.it/biobakery4/metaphlan_databases/), extracted the files, and got four files:

mpa\_vJan21\_CHOCOPhlAnSGB\_202103.pkl  
mpa\_vJan21\_CHOCOPhlAnSGB\_202103\_SGB.fna.bz2  
mpa\_vJan21\_CHOCOPhlAnSGB\_202103\_VINFO.csv  
mpa\_vJan21\_CHOCOPhlAnSGB\_202103\_VSG.fna.bz2

I built the larger one (SGB) with bowtie2.  
The output is as follows:

```auto
./mpa_vJan21_CHOCOPhlAnSGB_202103.md5
./mpa_vJan21_CHOCOPhlAnSGB_202103.pkl
./mpa_vJan21_CHOCOPhlAnSGB_202103.tar
./mpa_vJan21_CHOCOPhlAnSGB_202103_SGB.1.bt2l
./mpa_vJan21_CHOCOPhlAnSGB_202103_SGB.2.bt2l
./mpa_vJan21_CHOCOPhlAnSGB_202103_SGB.3.bt2l
./mpa_vJan21_CHOCOPhlAnSGB_202103_SGB.4.bt2l
./mpa_vJan21_CHOCOPhlAnSGB_202103_SGB.fna
./mpa_vJan21_CHOCOPhlAnSGB_202103_SGB.rev.1.bt2l
./mpa_vJan21_CHOCOPhlAnSGB_202103_SGB.rev.2.bt2l
./mpa_vJan21_CHOCOPhlAnSGB_202103_VINFO.csv
./mpa_vJan21_CHOCOPhlAnSGB_202103_VSG.fna
./mpa_vJan21_CHOCOPhlAnSGB_202103_marker_info.txt
./mpa_vJan21_CHOCOPhlAnSGB_202103_species.txt

```

I then used this code:

```auto
metaphlan example.fq.gz --input_type fastq -o example.txt --index mpa_vJan21_CHOCOPhlAnSGB_202103_SGB --bowtie2db ~/metaphlan4_db/

```

I get an error:

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

```

Maybe the problem is that the name of the pkl file is not similar to the index I used (mine has a suffix of \_SGB), but by removing the suffix, it doesn’t recognize the database at all.  
Also, why couldn’t I install the database in the first place?  
I’d be happy for your help.

Thanks in advance!

---

<div class="post-metadata">

### Author: ![aitor.blancomiguez](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aitor.blancomiguez/32/86_2.png) [@aitor.blancomiguez](https://forum.biobakery.org/u/aitor.blancomiguez)
#### Post date: [November 25, 2022, 8:32am UTC](https://forum.biobakery.org/t/unable-to-use-metaphlan-4-database/4440/2 "2022-11-25T08:32:45Z")

</div>

Hi @Afromm  
Exactly, the name of the pkl file and the bt2 indexes should be the same.

---

<div class="post-metadata">

### Author: ![ilapt](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/ilapt/32/1825_2.png) [@ilapt](https://forum.biobakery.org/u/ilapt)
#### Post date: [December 12, 2022, 5:02pm UTC](https://forum.biobakery.org/t/unable-to-use-metaphlan-4-database/4440/3 "2022-12-12T17:02:43Z")

</div>

Hi @Afromm,  
I have the same problem. Did you find a solution in the meantime?

Best,  
Ilaria

---

<div class="post-metadata">

### Author: ![aitor.blancomiguez](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aitor.blancomiguez/32/86_2.png) [@aitor.blancomiguez](https://forum.biobakery.org/u/aitor.blancomiguez)
#### Post date: [December 19, 2022, 5:49pm UTC](https://forum.biobakery.org/t/unable-to-use-metaphlan-4-database/4440/4 "2022-12-19T17:49:31Z")

</div>

Hi @ilapt  
Both pkls file and bt2 index should have the same name

---

<div class="post-metadata">

### Author: ![gaoxiaoyang](https://avatars.discourse-cdn.com/v4/letter/g/5f8ce5/32.png) [@gaoxiaoyang](https://forum.biobakery.org/u/gaoxiaoyang)
#### Post date: [October 11, 2023, 8:55am UTC](https://forum.biobakery.org/t/unable-to-use-metaphlan-4-database/4440/5 "2023-10-11T08:55:57Z")

</div>

helo, Aitor. I have downloaded the metaphlan4 database as follows:  
mpa\_vOct22\_CHOCOPhlAnSGB\_202212.1.bt2l mpa\_vOct22\_CHOCOPhlAnSGB\_202212.rev.2.bt2l  
mpa\_vOct22\_CHOCOPhlAnSGB\_202212.2.bt2l mpa\_vOct22\_CHOCOPhlAnSGB\_202212\_SGB.fna.bz2  
mpa\_vOct22\_CHOCOPhlAnSGB\_202212.3.bt2l mpa\_vOct22\_CHOCOPhlAnSGB\_202212\_species.txt  
mpa\_vOct22\_CHOCOPhlAnSGB\_202212.4.bt2l mpa\_vOct22\_CHOCOPhlAnSGB\_202212\_VINFO.csv  
mpa\_vOct22\_CHOCOPhlAnSGB\_202212\_marker\_info.txt mpa\_vOct22\_CHOCOPhlAnSGB\_202212\_VSG.fna.bz2  
mpa\_vOct22\_CHOCOPhlAnSGB\_202212.pkl  
mpa\_vOct22\_CHOCOPhlAnSGB\_202212.rev.1.bt2l

I run humann3 " humann --input C1.fq --output ./ --threads 10", then recieved the metaphlan error:

Error message returned from metaphlan :  
Error: Unable to find the mpa\_pkl file at: mpa\_pklExiting…

CRITICAL ERROR: Error executing: metaphlan C1.fq -t rel\_ab -o C1\_metaphlan\_bugs\_list.tsv --input\_type fastq --bowtie2out C1\_metaphlan\_bowtie2.txt --nproc 10

---

<div class="post-metadata">

### Author: ![eo24a](https://avatars.discourse-cdn.com/v4/letter/e/b9bd4f/32.png) [@eo24a](https://forum.biobakery.org/u/eo24a)
#### Post date: [March 25, 2024, 9:09pm UTC](https://forum.biobakery.org/t/unable-to-use-metaphlan-4-database/4440/6 "2024-03-25T21:09:00Z")

</div>

Hi,

I am also facing a similar issue. So, I have tried metaphlan --install to download the databases, it did not work properly. So I have downloaded them using wget option. the indexes, bt2.tar and bt2.md5 and mpa\_vJun23\_CHOCOPhlAnSGB\_202307.tar and md5 files. I downloaded them outside of miniconda3 to my own folder.

Then, when I ran humann3: this is my code.

path/to/humann --input fastq.gz --protein-database path/to/humann3\_databases/uniref --threads 16 --search-mode uniref50 --nucleotide-database path/to/humann3\_databases/chocophlan --bowtie2 path/to/miniconda3/bin/ --metaphlan-options “–bowtie2db path/to/metaphlan\_databases/” --metaphlan-options “–index path/to/metaphlan\_databases/mpa\_vJun23\_CHOCOPhlAnSGB\_202307” --output X\_uniref50.trimmed\_humann3

So, it stops during running metaphlan. and it deletes all the md5 and tar files from the database folder. not running aside, why does it deletes the files from the database folder. Do I need to re-download them each time I ran humann? Also, why does it stop? What am I doing wrong? Can someone please help?
