# Metaphlan heatmap

**URL:** <https://forum.biobakery.org/t/metaphlan-heatmap/6930>\
**Category:** MetaPhlAn\
**Created:** [April 15, 2024, 5:26pm UTC](https://forum.biobakery.org/t/metaphlan-heatmap/6930 "2024-04-15T17:26:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![caizhangbin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/caizhangbin/32/2537_2.png) [@caizhangbin](https://forum.biobakery.org/u/caizhangbin)\
**Post date:** [April 15, 2024, 5:26pm UTC](https://forum.biobakery.org/t/metaphlan-heatmap/6930/1 "2024-04-15T17:26:52Z")

</div>

Hi there,

I am trying to create a heat map from metaphlan output. However, there seems to be an issue with the file labeling on the x-axis. Instead of displaying the correct labels, it’s showing random numbers.

[merged\_abundance\_table.txt](https://forum.biobakery.org/uploads/short-url/yhPtBxaLo43oWIptms6CCZ6RbX7.txt) (6.6 KB)  
[merged\_abundance\_table\_species.txt](https://forum.biobakery.org/uploads/short-url/2z4XGGpnCUkLSQQsYyD17i6i0T5.txt) (548 Bytes)

 ![metaphlan4_abundance_heatmap_species](https://canada1.discourse-cdn.com/flex027/uploads/biobakery/original/2X/6/64c529398b458436cd17a0b8787d42c8ed56eca5.png)

---

<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:** [April 16, 2024, 10:00am UTC](https://forum.biobakery.org/t/metaphlan-heatmap/6930/2 "2024-04-16T10:00:13Z")

</div>

Hi @caizhangbin,  
when you create the species level abundance table make sure you always include as first row the header with information about which samples the relative abundance is computed from, which is present in the original table. In your case you could use `grep -E "s __|D7" merged_abundance_table.txt | grep -v "t__" | sed "s/^.*|//g" > merged_abundance_table_species.txt` to retain the sample names.
