How to combine strain information with a tree

508 views
Skip to first unread message

崔箐坡

unread,
Sep 28, 2020, 10:41:39 AM9/28/20
to ggtree
Is it possible to combine the strain information with the tree as the picture showed below. Any help or comments will be appreciate.WX20200928-224004@2x.png

xshua...@163.com

unread,
Oct 7, 2020, 4:43:53 AM10/7/20
to ggtree
Are you looking for http://yulab-smu.top/treedata-book/chapter10.html#api-to-link-ggtree-and-ggplot2. And the layout of tree can be rectangular.

崔箐坡

unread,
Oct 7, 2020, 8:27:06 PM10/7/20
to ggtree
Thanks for your comments. I want to add metadata next to the tree such as the "patient”,”mlst”,"k locus” columns in the picture. From the link you post, I did not find how to add these column. Do you know how to add metadata to the tree?

Yu, Guangchuang

unread,
Oct 10, 2020, 11:14:31 AM10/10/20
to 崔箐坡, ggtree

--
1. G Yu*. Using ggtree to visualize data on tree-like structures. Current Protocols in Bioinformatics. 2020, 69:e96. https://doi.org/10.1002/cpbi.96
2. LG Wang, TTY Lam, S Xu, Z Dai, L Zhou, T Feng, P Guo, CW Dunn, BR Jones, T Bradley, H Zhu, Y Guan, Y Jiang, G Yu*. treeio: an R package for phylogenetic tree input and output with richly annotated and associated data. Molecular Biology and Evolution. 2020, 37(2):599-603. http://dx.doi.org/10.1093/molbev/msz240
3. G Yu*, TTY Lam, H Zhu, Y Guan*. Two methods for mapping and visualizing associated data on phylogeny using ggtree. Molecular Biology and Evolution, 2018, 35(2):3041-3043. https://doi.org/10.1093/molbev/msy194
4. 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. https://doi.org/10.1111/2041-210X.12628
5. Book: https://yulab-smu.top/treedata-book/
---
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bioc-ggtree/4da290e2-5632-4bb8-b013-ae7ba7580ab3n%40googlegroups.com.


--
--~--~---------~--~----~------------~-------~--~----~
Guangchuang Yu PhD
Professor, Associate Director
Department of Bioinformatics
School of Basic Medical Sciences
Southern Medical University
Guangzhou, China
-~----------~----~----~----~------~----~------~--~---

崔箐坡

unread,
Oct 14, 2020, 4:28:43 AM10/14/20
to ggtree
Thanks, this answer my question. It works well.
Reply all
Reply to author
Forward
0 new messages