How to adjust the transparency of edges or nodes of a tree produced by a BEAST phylogeographic analysis using ggtree
0
0
Entering edit mode
19 months ago
Qiao • 0

Dear all,

I have a BEAST tree generated by a phylogeographic model (multitype tree model), with edges and nodes of the tree colored by the geographic location.

When I imported the tree into R, the treedata contains the variable 'type.prob', which refers to the posterior probability of the inferred internal node location. My tree is quite large with many internal nodes, so a pie chart showing the probability of locations at each node is likely an unhelpful visual. So I was thinking to change the transparency of the edge according to the probability value, with more transparent edges indicating a lower probability. I tried to use 'alpha=type.prob' within the ggtree() function; however, type.prob is a chr variable and alpha=... would produce an error.

Does anyone have suggestions on how to solve this issue?

Thank you in advance.

ggtree tree phylogeographic analysis • 320 views
ADD COMMENT

Login before adding your answer.

Traffic: 2592 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6