Show mrbayes prob as proportionally sized circles

40 views
Skip to first unread message

Diego Caraballo

unread,
Sep 8, 2023, 11:29:14 AM9/8/23
to ggtree
Hi everybody,

I wanted to ask how to rescale internal nodes as black-filled circles with size proportional to posterior probability, from a mrbayes tree. I am working on a tree where I want to show tip colors according to host genus, and internal nodes proportional to bayesian posterior probability (bpp).

When I use this: 
p3 <- ggtree(tree_gg, layout = "circular")  %<+% d + geom_tippoint(aes(color=host_genus)) +
  geom_tiplab(size=2.5, align=TRUE, linesize=.5, offset = 0)

I get a nice tree (Rplot1).
Rplot1.jpeg


But when I add "prob" information:

p4 <- ggtree(tree_gg, layout = "circular") %<+% d + geom_tippoint(aes(color=host_genus)) +
  geom_tiplab(size = 2.5, align = TRUE, linesize = 0.5, offset = 0) +
  geom_nodepoint(color="#000000", aes(size = prob))

I get these warnings:
Warning messages:
1: Using size for a discrete variable is not advised.
2: Removed 1 rows containing missing values (`geom_point_g_gtree()`). 

I still get the tree (Rplot2) but the internal nodes are extremely big. In addtion, I get a scale in the legend showing the different sizes and support values, that I want to exclude from the plot.

Rplot2.jpeg


So, I wanted to ask how to rescale all internal nodes to a lower size (being yet proportional to bpp), and how to remove the legend of bpp, but keep that of hosts.

Thank you in advance,

Cheers,

Diego 



 
Reply all
Reply to author
Forward
0 new messages