Minimap2 Database Files for MetaPhlAn 4.2.2

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!

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

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!

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?

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?

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!

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