# Building a MetaPhlAn database from fasta sequences

**URL:** https://forum.biobakery.org/t/building-a-metaphlan-database-from-fasta-sequences/4953
**Category:** MetaPhlAn
**Created:** [March 9, 2023, 3:52pm UTC](https://forum.biobakery.org/t/building-a-metaphlan-database-from-fasta-sequences/4953 "2023-03-09T15:52:32Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [March 13, 2023, 8:46am UTC](https://forum.biobakery.org/t/building-a-metaphlan-database-from-fasta-sequences/4953/2 "2023-03-13T08:46:13Z")

</div>

Hi @ecalfapietra  
Currently, there is not script to generate a new metaphlan 4 database from scratch.  
But if you are interested on doing it, the procedure goes as follows:

1. Classify your genomes into species-level genome bins (SGB) by clustering them at 95% genome identity
2. For each SGB, annotate the FASTA sequences and define a set of core gene families (clustering the CDS at 90% identity)
3. Map all the core gene families against the initial set of genomes to define SGB-specific and unique set of marker genes  
For a deeper explanation, you can have a look at the m&m of the metaphlan 4 paper: [Extending and improving metagenomic taxonomic profiling with uncharacterized species using MetaPhlAn 4 | Nature Biotechnology](https://www.nature.com/articles/s41587-023-01688-w#Sec12)

---

_[View the full topic](https://forum.biobakery.org/t/building-a-metaphlan-database-from-fasta-sequences/4953)._
