# Graphlan - Names overlapped

**URL:** <https://forum.biobakery.org/t/graphlan-names-overlapped/2380>\
**Category:** GraPhlAn\
**Created:** [July 16, 2021, 12:12pm UTC](https://forum.biobakery.org/t/graphlan-names-overlapped/2380 "2021-07-16T12:12:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valter](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/valter/32/939_2.png) [@Valter](https://forum.biobakery.org/u/Valter)\
**Post date:** [July 16, 2021, 12:12pm UTC](https://forum.biobakery.org/t/graphlan-names-overlapped/2380/1 "2021-07-16T12:12:00Z")

</div>

Graphlan - Names overlapped

Hi everyone,

I have been trying to separate the names on the figure to better visualization, but I couldn’t find a proper command to do it.

**Used commands:**

_tail -n +2 merged\_abundance\_table.txt | cut -f1,3- \> merged\_abundance\_table\_reformatted.txt_

\*export2graphlan.py --skip\_rows 1 -i merged\_abundance\_table\_reformatted.txt --tree merged\_abundance.tree.txt --annotation merged\_abundance.annot.txt --most\_abundant 100 --abundance\_threshold 1 --least\_biomarkers 10 --annotations 5,6 --external\_annotations 7 --min\_clade\_size 1 --def\_clade\_size 5 --def\_font\_size 8 --annotation\_legend\_font\_size 8 \*

_graphlan\_annotate.py --annot merged\_abundance.annot.txt merged\_abundance.tree.txt merged\_abundance.xml_

_graphlan.py --pad 1 --dpi 300 merged\_abundance.xml merged\_abundance.png --external\_legends_

Does anyone know the best way to fix it? If yes, could you please help me with it?

I appreciate any help with it.

Have a great weekend.

Kind regards,  
Valter

 ![1merged_abundance](https://canada1.discourse-cdn.com/flex027/uploads/biobakery/original/1X/4381b883e22592f7318c41e9ed5999315f26b984.jpeg)

---

<div class="post-metadata">

**Author:** ![aaron\_walsh](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aaron_walsh/32/554_2.png) [@aaron\_walsh](https://forum.biobakery.org/u/aaron_walsh)\
**Post date:** [July 16, 2021, 1:56pm UTC](https://forum.biobakery.org/t/graphlan-names-overlapped/2380/2 "2021-07-16T13:56:48Z")

</div>

Hi Valter,

Thanks for using GraPhlAn. One solution to this problem might be to use shortened versions of the taxa names. You could change _Lactobacillus_ to Lactob, _Lactococcus_ to Lactoc, _Faecalibacterium_ to Faecali, etc. You would do this by writing the annotation in your `.annot.txt` as follows:

| # | # | # |
| --- | --- | --- |
| Lactobacillus | annotation | Lactob:Lactobacillus |
| Lactococccus | annotation | Lactoc:Lactococcus |
| Faecalibacterium | annotation | Faecali:Faecalibacterium |

Here, the first column is the name of your node, the second column says that you are annotating this node, and the third column is the label. As you can see, in the third column I’ve written the shorthand before the colon. For example, `Lactob` occurs before `:Lactobacillus`, which tells GraPhlAn that you want to use a shorthand annotation for the _Lactobacillus_ node. Importantly, GraPhlAn will also produce a legend that explains what the abbreviations stand for.

I’d recommend doing this wherever there’s an overlap. It will involve some manual inspection of the tree but it should tidy up the labels.

Hope this helps! Let me know if you have any additional questions.

Regards,  
Aaron.

---

<div class="post-metadata">

**Author:** ![Valter](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/valter/32/939_2.png) [@Valter](https://forum.biobakery.org/u/Valter)\
**Post date:** [July 17, 2021, 12:46am UTC](https://forum.biobakery.org/t/graphlan-names-overlapped/2380/3 "2021-07-17T00:46:29Z")

</div>

> [@aaron\_walsh](#):
>
> GraPhlAn

Hi Aaron,

Thank you so much for your help and attention. Now I can shorten the taxa names, and, as a result, I have a much better GraPhlAn output.

I’d appreciate it if you could also let me know if it is possible to include all the taxon names in the output files. For instance, Treponema berlinense doesn’t show up on my output files. I have tried to change the settings of --abundance\_threshold and --most\_abundant without success.

Thank you, Aaron. I am delighted with my new GraPhlAn figures!

Kind regards,  
Valter

 ![Screen Shot 2021-07-17 at 12.40.33 PM](https://canada1.discourse-cdn.com/flex027/uploads/biobakery/original/1X/89c6d9841979d0d5915c1ab143665b83e0486500.jpeg)  
 ![5merged_abundance](https://canada1.discourse-cdn.com/flex027/uploads/biobakery/original/1X/827e35eda316a76c6f8b87913c5737f671c345af.jpeg)  
 ![5merged_abundance_annot](https://canada1.discourse-cdn.com/flex027/uploads/biobakery/original/1X/3375ab0debbd989bbb828583fae17f5ee2088e9b.png)
