# Merge\_metaphlan\_tables.py with rel\_ab\_w\_read\_stats

**URL:** <https://forum.biobakery.org/t/merge-metaphlan-tables-py-with-rel-ab-w-read-stats/2278>\
**Category:** MetaPhlAn\
**Created:** [June 21, 2021, 11:07am UTC](https://forum.biobakery.org/t/merge-metaphlan-tables-py-with-rel-ab-w-read-stats/2278 "2021-06-21T11:07:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ekopylova](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/ekopylova/32/3662_2.png) [@ekopylova](https://forum.biobakery.org/u/ekopylova)\
**Post date:** [June 21, 2021, 11:07am UTC](https://forum.biobakery.org/t/merge-metaphlan-tables-py-with-rel-ab-w-read-stats/2278/1 "2021-06-21T11:07:25Z")

</div>

Hello!

I ran metaphlan 3.0.8 using the option **-t rel\_ab\_w\_read\_stats** for multiple samples. I want to merge all samples into a single feature table using the estimated read counts, however although each individual input file includes 5 header rows, the merged feature table merges on **relative\_abundance** rather than **estimated\_number\_of\_reads\_from\_the\_clade** which I would like. I see [a post](https://forum.biobakery.org/t/merge-metaphlan-tables-py-with-absolute-abundance/1839) with an alternative script to allow merging using **estimated\_number\_of\_reads\_from\_the\_clade** , however is it possible to include this directly as an option of **merge\_metaphlan\_tables.py**? Thank you,

#mpa\_v30\_CHOCOPhlAn\_201901  
#/miniconda/envs/metaphlan/bin/metaphlan paired\_1.fastq.gz,paired\_2.fastq.gz --bowtie2out bowtie2.bz2 --nproc 16 --bowtie2db /home/metaphlan\_db -o profile.txt --sample\_id sampleID --input\_type fastq -t rel\_ab\_w\_read\_stats --bt2\_ps very-sensitive-local --samout bowtie2.sam  
#SampleID sampleID  
#estimated\_reads\_mapped\_to\_known\_clades:34927653  
#clade\_name clade\_taxid relative\_abundance coverage estimated\_number\_of\_reads\_from\_the\_clade

---

<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:** [June 29, 2021, 9:49am UTC](https://forum.biobakery.org/t/merge-metaphlan-tables-py-with-rel-ab-w-read-stats/2278/2 "2021-06-29T09:49:15Z")

</div>

Hi Jenya,  
Yes, of course, I can add it as a flag in the original script, I’ll keep you posted here when I’ll push this update!

---

<div class="post-metadata">

**Author:** ![saras22](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@saras22](https://forum.biobakery.org/u/saras22)\
**Post date:** [January 16, 2022, 11:13am UTC](https://forum.biobakery.org/t/merge-metaphlan-tables-py-with-rel-ab-w-read-stats/2278/3 "2022-01-16T11:13:32Z")

</div>

@fbeghini  
Has this flag been added to the script cuz even I want to use it for getting the merged table for the read counts instead of rel abundances.

Thanks

---

<div class="post-metadata">

**Author:** ![cirodri1](https://avatars.discourse-cdn.com/v4/letter/c/e9bcb4/32.png) [@cirodri1](https://forum.biobakery.org/u/cirodri1)\
**Post date:** [December 7, 2022, 7:22pm UTC](https://forum.biobakery.org/t/merge-metaphlan-tables-py-with-rel-ab-w-read-stats/2278/4 "2022-12-07T19:22:00Z")

</div>

@fbeghini I would also like to know if this flag has been implemented in the original script. Thank you!
