How to maintain spaces in tip labels?

527 views
Skip to first unread message

Kevin Keegan

unread,
May 10, 2018, 9:16:32 AM5/10/18
to ggtree
Hello,

I'm trying to annotate a circular tree with tip labels that have spaces between the genus and species name using geom_tiplab2() like so:

 geom_tiplab2(aes(node=node,label=label))

Spaces between the genus and species get removed. For instance Bison bison becomes Bisonbison. Is there a way to preserve spaces?

Perhaps I could use regular expressions to create a string and explicitly add a space between the genus and species names?

Best,
Kevin

Yu, Guangchuang

unread,
May 15, 2018, 9:41:34 PM5/15/18
to Kevin Keegan, ggtree
the spaces were remove when parsing the tree file.

Any sample file to reproduce this issue?



--
G Yu, DK Smith, H Zhu, Y Guan, TTY Lam*. ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data, Methods in Ecology and Evolution, 2017, 8(1):28-36. doi:10.1111/2041-210X.12628
 
Homepage: https://guangchuangyu.github.io/software/ggtree
---
You received this message because you are subscribed to the Google Groups "ggtree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bioc-ggtree+unsubscribe@googlegroups.com.
To post to this group, send email to bioc-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bioc-ggtree/8261a7de-107b-4016-82e7-edf1c5022d6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
--~--~---------~--~----~------------~-------~--~----~
Guangchuang Yu PhD
Postdoc researcher
State Key Laboratory of Emerging Infectious Diseases
School of Public Health
The University of Hong Kong
Hong Kong SAR, China
-~----------~----~----~----~------~----~------~--~---
Reply all
Reply to author
Forward
0 new messages