| rosenberg | R Documentation |
This function computes Rosenberg's probability of reciprocal monophyly for each dichotomous node of a phylogenetic tree.
rosenberg(phy)
phy |
A tree of class ‘phylo’. |
Because ape plots node labels in a different manner to the method in
which they are stored, when plotting the node labels made by
rosenberg, make sure the node argument is given as shown in
the examples below.
A numeric vector with names giving the node numbers of phy.
Samuel Brown <s_d_j_brown@hotmail.com>
Rosenberg, N. A. (2007). Statistical tests for taxonomic distinctiveness from observations of monophyly. _Evolution_ *61* (2), 317-323.
nodelabels.
data(anoteropsis)
anoTr <- ape::nj(ape::dist.dna(anoteropsis))
anoLab <- rosenberg(anoTr)
ape::plot.phylo(anoTr)
ape::nodelabels(round(anoLab,3), node=as.numeric(names(anoLab)))
data(dolomedes)
doloTr <- ape::nj(ape::dist.dna(dolomedes))
doloRose <- rosenberg(doloTr)
ape::plot.phylo(doloTr)
ape::nodelabels(round(doloRose, 3))
#Colour circles for nodes with a probability < 0.005
doloNodes <- doloRose < 0.005
doloLabs <- doloRose
doloLabs[doloNodes] <- "blue"
doloLabs[!doloNodes] <- "red"
ape::plot.phylo(doloTr, cex=0.7)
ape::nodelabels(pch=21, bg=doloLabs, node=as.numeric(names(doloLabs)), cex=2)
graphics::legend(x=0.015, y=16.13, legend=c("significant", "not significant"), pch=21,
pt.bg=c("blue", "red"), bty="n", pt.cex=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.