# Minimap2 Database Files for MetaPhlAn 4.2.2

**URL:** https://forum.biobakery.org/t/minimap2-database-files-for-metaphlan-4-2-2/8504
**Category:** MetaPhlAn
**Created:** [September 17, 2025, 4:36pm UTC](https://forum.biobakery.org/t/minimap2-database-files-for-metaphlan-4-2-2/8504 "2025-09-17T16:36:21Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![GNas](https://avatars.discourse-cdn.com/v4/letter/g/7bcc69/32.png) [@GNas](https://forum.biobakery.org/u/GNas)
#### Post date: [September 17, 2025, 4:36pm UTC](https://forum.biobakery.org/t/minimap2-database-files-for-metaphlan-4-2-2/8504/1 "2025-09-17T16:36:21Z")

</div>

I am trying to use the new long-read feature for ONT reads. I tried to install the database and so did one of the IT people for my HPC. However, it does not include .mmi files for minimap and when I run MetaPhlAn I get this error:

FileNotFoundError: [Errno 2] No such file or directory: ‘/projects/datasets/metaphlan\_databases/vJan25/mpa\_vJan25\_CHOCOPhlAnSGB\_202503\_xasm20\_B3\_O3\_12.mmi’

Is there a way to get these files? Thank you!

---

<div class="post-metadata">

### Author: ![Claudia\_Mengoni](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/claudia_mengoni/32/2871_2.png) [@Claudia\_Mengoni](https://forum.biobakery.org/u/Claudia_Mengoni)
#### Post date: [September 18, 2025, 11:42am UTC](https://forum.biobakery.org/t/minimap2-database-files-for-metaphlan-4-2-2/8504/2 "2025-09-18T11:42:07Z")

</div>

Hi @GNas

We do not provide the minimap indexes because they’re quick to be built and therefore the first time you run metaphlan with minimap the indexes should get built very quickly. Could you (1) Share the command you used to download the database and run metaphlan (2) Show the content of ‘/projects/datasets/metaphlan\_databases/vJan25’ (3) Confirm this is the folder where you downloaded the database

Thanks

---

<div class="post-metadata">

### Author: ![GNas](https://avatars.discourse-cdn.com/v4/letter/g/7bcc69/32.png) [@GNas](https://forum.biobakery.org/u/GNas)
#### Post date: [September 18, 2025, 1:14pm UTC](https://forum.biobakery.org/t/minimap2-database-files-for-metaphlan-4-2-2/8504/3 "2025-09-18T13:14:02Z")

</div>

I see, the command used to install the database is:

`metaphlan --install --index mpa_vJan25_CHOCOPhlAnSGB_202503 --db_dir`

The contents are:

`mpa_latest`  
`mpa_vJan25_CHOCOPhlAnSGB_202503.1.bt2l`  
`mpa_vJan25_CHOCOPhlAnSGB_202503.2.bt2l`  
`mpa_vJan25_CHOCOPhlAnSGB_202503.3.bt2l`  
`mpa_vJan25_CHOCOPhlAnSGB_202503.4.bt2l`  
`mpa_vJan25_CHOCOPhlAnSGB_202503.fna`  
`mpa_vJan25_CHOCOPhlAnSGB_202503.pkl`  
`mpa_vJan25_CHOCOPhlAnSGB_202503.rev.1.bt2l`  
`mpa_vJan25_CHOCOPhlAnSGB_202503.rev.2.bt2l`  
`mpa_vJan25_CHOCOPhlAnSGB_202503_VINFO.csv`  
`mpa_vJan25_CHOCOPhlAnSGB_202503_VSG.fna`

Does that mean that MetaPhlAn will build them or am I running an additional command? Thanks!

---

<div class="post-metadata">

### Author: ![Claudia\_Mengoni](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/claudia_mengoni/32/2871_2.png) [@Claudia\_Mengoni](https://forum.biobakery.org/u/Claudia_Mengoni)
#### Post date: [September 18, 2025, 1:35pm UTC](https://forum.biobakery.org/t/minimap2-database-files-for-metaphlan-4-2-2/8504/4 "2025-09-18T13:35:01Z")

</div>

MetaPhlAn should check that and build the database for you. Just to confirm, did you add `--db_dir /projects/datasets/metaphlan_databases/vJan25` both in the installation and when running metaphlan?

---

<div class="post-metadata">

### Author: ![GNas](https://avatars.discourse-cdn.com/v4/letter/g/7bcc69/32.png) [@GNas](https://forum.biobakery.org/u/GNas)
#### Post date: [September 18, 2025, 2:02pm UTC](https://forum.biobakery.org/t/minimap2-database-files-for-metaphlan-4-2-2/8504/5 "2025-09-18T14:02:18Z")

</div>

I did include `-–db_dir /projects/datasets/metaphlan_databases/vJan25` when running the command. However I did not know metaphlan was making the files. I do not have write access to that directory, it was made by the HPC group. Does that mean I need write access to wherever the database is? If that is the case, can they run metaphlan once and then when I do it, I can use the .mmi files produced?

If possible, can you provide a sample run command, both for myself (as a check) and for them to know what to run?

---

<div class="post-metadata">

### Author: ![Claudia\_Mengoni](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/claudia_mengoni/32/2871_2.png) [@Claudia\_Mengoni](https://forum.biobakery.org/u/Claudia_Mengoni)
#### Post date: [September 18, 2025, 2:22pm UTC](https://forum.biobakery.org/t/minimap2-database-files-for-metaphlan-4-2-2/8504/6 "2025-09-18T14:22:11Z")

</div>

Yes, that would work.

This is a sample command:

`metaphlan metagenome.fastq --long_reads --input_type fastq --mapout -o profiled_metagenome.txt --db_dir <PATH_TO_DB>`

hope it solves the problem, if not let me know!

---

<div class="post-metadata">

### Author: ![GNas](https://avatars.discourse-cdn.com/v4/letter/g/7bcc69/32.png) [@GNas](https://forum.biobakery.org/u/GNas)
#### Post date: [September 18, 2025, 3:04pm UTC](https://forum.biobakery.org/t/minimap2-database-files-for-metaphlan-4-2-2/8504/7 "2025-09-18T15:04:17Z")

</div>

Thank you! I will let you know how it goes.

---

<div class="post-metadata">

### Author: ![Derek\_Smith](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/derek_smith/32/3490_2.png) [@Derek\_Smith](https://forum.biobakery.org/u/Derek_Smith)
#### Post date: [November 20, 2025, 9:31pm UTC](https://forum.biobakery.org/t/minimap2-database-files-for-metaphlan-4-2-2/8504/8 "2025-11-20T21:31:55Z")

</div>

I believe this causes a conflict with parallel execution on HPC. Maybe it would be better to build the .mmi index build to the install step to avoid this? Additionally, as previously reported the concatenation of the VNA and SGB.fna files has to be manually completed by the user as the SGB.fna file is deleted and no .fna is retained when installing to a custom directory via the install script as of MetaPhlAn version 4.2.4 (21 Oct 2025). I believe the .mmi database issue resolved by running the workflow once to compile the database with a single sample. Excited to give this a try out, thanks for all your hard work!
