rosenberg: Rosenberg's probability of reciprocal monophyly

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This function computes Rosenberg's probability of reciprocal monophyly for each dichotomous node of a phylogenetic tree.

Usage

1
rosenberg(phy)

Arguments

phy

A tree of class ‘phylo’.

Details

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.

Value

A numeric vector with names giving the node numbers of phy.

Author(s)

Samuel Brown <s_d_j_brown@hotmail.com>

References

Rosenberg, N. A. (2007). Statistical tests for taxonomic distinctiveness from observations of monophyly. _Evolution_ *61* (2), 317-323.

See Also

nodelabels.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
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)

spider documentation built on May 2, 2019, 7:31 a.m.