Description Usage Arguments Details Value See Also Examples
View source: R/read.annot.beast.R
This function reads a nexus formated beast file and appends all meta-data and annotations.
1 |
file |
The path to the MCC file from BEAST |
Node ordering is the same as in the read.tree
/read.nexus
functions from ape (cladewise). The metadata is stored as a
data.frame named 'metadata'. Only node posterior
probabilites are passed as an additional numeric vector
named 'posterior'. Note that 'metadata' includes tip
annotations as well. The code might be a bit slow for large trees.
annotated phylo
object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | file <- system.file("data/mcc.tre", package="rBt")
tr <- read.annot.beast(file)
class(tr)
# [1] "phylo"
names(tr)
#[1] "edge" "edge.length" "Nnode" "root.edge" "tip.label"
#[6] "metadata" "posterior"
# for add pp to nodes you could try:
plot(tr)
nodelabels(text=round(tr$posterior,2), cex=0.5)
# for edges, try:
tr$ordered.edges <- order.edges(tr)
plot(tr)
edgelabels(edge=tr$ordered.edges, text=round(tr$posterior,2), cex=0.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.