# Extraction of mapped reads

**URL:** https://forum.biobakery.org/t/extraction-of-mapped-reads/2399
**Category:** MetaPhlAn
**Created:** [July 21, 2021, 9:10am UTC](https://forum.biobakery.org/t/extraction-of-mapped-reads/2399 "2021-07-21T09:10:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![janik](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@janik](https://forum.biobakery.org/u/janik)
#### Post date: [July 21, 2021, 9:10am UTC](https://forum.biobakery.org/t/extraction-of-mapped-reads/2399/1 "2021-07-21T09:10:22Z")

</div>

Hi,

While using MetaPhlAn3, is it possible to extract the reads (16S rRNA and/or marker gene sequences) used for the taxonomic assignment of the query sequences?  
I am using a combination of meta-genomics and culture dependent approach. I wanted to specifically extract the gene sequences related to _Lactobacillus plantarum_ from my metagenome data.

Thank you  
Kunal

---

<div class="post-metadata">

### Author: ![fbeghini](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/fbeghini/32/81_2.png) [@fbeghini](https://forum.biobakery.org/u/fbeghini)
#### Post date: [July 27, 2021, 10:14am UTC](https://forum.biobakery.org/t/extraction-of-mapped-reads/2399/2 "2021-07-27T10:14:06Z")

</div>

Hi Kunal,  
You can extract the all the marker genes for your species using the `extract_markers.py` script included with MetaPhlAn by running `extract_markers.py -c s__Lactobacillus_plantarum -o lactobacillus_p_markers` and then screen the bowtie2out file to determine which markers were mapped to the metagenome.

---

<div class="post-metadata">

### Author: ![janik](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@janik](https://forum.biobakery.org/u/janik)
#### Post date: [July 27, 2021, 10:38am UTC](https://forum.biobakery.org/t/extraction-of-mapped-reads/2399/3 "2021-07-27T10:38:55Z")

</div>

Hello Francesco,

Thank you very much for your response and the solution.

Best,  
Kunal
