Plotting ancestral states from MCMCglmm example

2019-02-22T10:27:51Z (GMT) by Ben Longdon
R code that takes tip and internal node model estimates from MCMCglmm phylogenetic mixed model, and associates them with the tree, so it you can output a tree file and read into figtree (https://github.com/rambaut/figtree/releases) to make pretty colour gradients of states across the tree e.g. https://doi.org/10.1371/journal.ppat.1007185.g002

Make sure to add the Nexus block to the final .tre file:

"#NEXUS
Begin trees;”

then your tree

“End;”

Data from Roberts et al. 2018 https://journals.plos.org/plospathogens/article?id=10.1371/journal.ppat.1007185