How to let the ggtree know the node

155 views
Skip to first unread message

Alvin Liu

unread,
Jun 20, 2022, 11:43:19 PM6/20/22
to ggtree
Hi team, I sincerely think you guys were making this package.
I'm trying to use it to visualize my tree like this

trb <- ggtree(tr) %<+% dd

MRCA(tr,'XP_003030690.1')

ggtree(trb[["data"]],branch.length = "none",layout = "circular")+
  geom_tiplab(size = 2.4,align = TRUE)+
  geom_cladelab(node= 1 ,barcolor=" #94b6c6 ",barsize=35,extend=0.5,offset=1)+
  geom_cladelab(node= 2 ,barcolor=" #94b6c6 ",barsize=35,extend=0.5,offset=1)

And I received Error feedback

Error in `ggplot_add()`:
! mapping and node or label can't be NULL simultaneously, we can't get the
              data to be displayed in this layer, please provide a data or subset, node
              and label in mapping, we will extract the node and label from tree data,
              or provide node and label!

Am I missing something?

Yu Guangchuang

unread,
Jun 21, 2022, 3:15:41 AM6/21/22
to Alvin Liu, ggtree
you need to provide a reproducible example

From: bioc-...@googlegroups.com <bioc-...@googlegroups.com> on behalf of Alvin Liu <alvinl...@gmail.com>
Sent: Tuesday, June 21, 2022 11:43 AM
To: ggtree <bioc-...@googlegroups.com>
Subject: How to let the ggtree know the node
 
--
1. Data Integration, Manipulation and Visualization of Phylogenetic Trees (1st ed.). Chapman and Hall/CRC. 2022. ISBN: 9781032233574
2. ggtreeExtra: Compact visualization of richly annotated phylogenetic data. Molecular Biology and Evolution. 2021, 38(9):4039-4042. doi: 10.1093/molbev/msab166
3. Using ggtree to visualize data on tree-like structures. Current Protocols in Bioinformatics. 2020, 69:e96. doi: 10.1002/cpbi.96
4. 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. doi: 10.1093/molbev/msz240
5. Two methods for mapping and visualizing associated data on phylogeny using ggtree. Molecular Biology and Evolution, 2018, 35(2):3041-3043. doi: 10.1093/molbev/msy194
6. 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
---
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/ce053537-1287-4f26-9679-3afe84879095n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages