# Graphlan metadata name manipulation

**URL:** <https://forum.biobakery.org/t/graphlan-metadata-name-manipulation/2132>\
**Category:** GraPhlAn\
**Created:** [May 23, 2021, 11:06pm UTC](https://forum.biobakery.org/t/graphlan-metadata-name-manipulation/2132 "2021-05-23T23:06:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeffrey\_Chiu](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/jeffrey_chiu/32/637_2.png) [@Jeffrey\_Chiu](https://forum.biobakery.org/u/Jeffrey_Chiu)\
**Post date:** [May 23, 2021, 11:06pm UTC](https://forum.biobakery.org/t/graphlan-metadata-name-manipulation/2132/1 "2021-05-23T23:06:26Z")

</div>

So I have a tree generated for strainphlain with metadata added, but the png I generate with graphlan cuts off the value of the SubjectID I want.  
For example:  
My subject ID would be Rhyticeros\_undulatus in my tre.metadata, but the resulting image would show my subjectID as Rhyticeros.

Is there a way for graphlan to ignore “\_” when parsing the tre.metadata file? If not, if there a clever way to have metadata values as two terms without directly joining them like “RhyticerosUndulatus”?

input of tre.metadata file

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/biobakery/original/1X/dc47cb98134f07b6c2cee7ff73e992870aa55053.png)

output legend from graphlan  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/biobakery/original/1X/740b633a714ce0a8ce73f901cd59ad1aac550527.png)

Command I use to run graphlan:  
plot\_tree\_graphlan.py -t RAxML\_bestTree.s\_\_Escherichia\_coli.StrainPhlAn3.tre.metadata -m SubjectID

---

<div class="post-metadata">

**Author:** ![Kelsey\_Thompson](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/kelsey_thompson/32/65_2.png) [@Kelsey\_Thompson](https://forum.biobakery.org/u/Kelsey_Thompson)\
**Post date:** [June 2, 2021, 10:27pm UTC](https://forum.biobakery.org/t/graphlan-metadata-name-manipulation/2132/2 "2021-06-02T22:27:17Z")

</div>

Hi Jeffrey -

I am not sure why this is happening. It could be for several reasons. There are a couple of things we could try to debug-

1. Have you tried a different character for the \_ : perhaps a “.” or a space?
2. Use the regular GraPhlAn utility instead of this script: see [here](https://github.com/biobakery/graphlan/wiki)
3. Use the R-scripts (below this example on the tutorial) instead of the GraPhlAn version for tree construction. ggtree has some great tree visualizing abilities. The scripts themselves should be stored in the [breadcrumbs github](https://github.com/biobakery/breadcrumbs/tree/master/breadcrumbs/scripts)

If none of those options work for you - can you send us a minimally reproducible example of this issue?

Best,  
Kelsey
