prop.part counts the number of bipartitions found in a series
of trees given as ....
prop.clades counts the number of times the bipartitions present
in phy are present in a series of trees given as ... or
in the list previously computed and given with part.
boot.phylo performs a bootstrap analysis.
boot.phylo(phy, x, FUN, B = 100, block = 1)
prop.part(..., check.labels = FALSE)
prop.clades(phy, ..., part = NULL)
## S3 method for class 'prop.part':
print(x, ...)
## S3 method for class 'prop.part':
summary(object, ...)
## S3 method for class 'prop.part':
plot(x, barcol = "blue", leftmar = 4, ...)"phylo".boot.phylo: a taxa (rows) by characters
(columns) matrix; this may be presented as a list; in the case of
print and plot: an object of class "prop.part".phy (see details).x that will be resampled
together (see details)."phylo", (ii) a
series of such objects separated by commas, or (iii) a list
containing such objects. In the case of plot further
arguments for the plot (see details).FALSE (the default), it is assumed that all
trees have the same tip labels, and that they are in the same order
(see details).prop.part; if
this is used then ... is ignored."prop.part".prop.part returns an object of class "prop.part" which
is a list with an attribute "number". The elements of this list
are the observed clades, and the attribute their respective
numbers. If the default check.labels = FALSE is used, an
attribute "labels" is added, and the vectors of the returned
object contains the indices of these labels instead of the labels
themselves. prop.clades and boot.phylo return a numeric vector
which ith element is the number associated to the ith
node of phy.
summary returns a numeric vector.
FUN in boot.phylo must be the function used
to estimate the tree from the original data matrix. Thus, if the tree
was estimated with neighbor-joining (see nj), one maybe wants
something like FUN = function(xx) nj(dist.dna(xx)). block in boot.phylo specifies the number of columns to
be resampled altogether. For instance, if one wants to resample at the
codon-level, then block = 3 must be used.
Using (the default) check.labels = FALSE in prop.part
results in considerable decrease in computing times. This requires that
(i) all trees have the same tip labels, and (ii) these labels
are ordered similarly in all trees (in other words, the element
tip.label are identical in all trees).
The plot function represents a contingency table of the different
partitions (on the x-axis) in the lower panel, and their observed
numbers in the upper panel. Any further arguments (...) are used to
change the aspects of the points in the lower panel: these may be
pch, col, bg, cex, etc. This function
works only if there is an attribute labels in the object.
The print method displays the partitions and their numbers. The summary method extracts the numbers only.
Felsenstein, J. (1985) Confidence limits on phylogenies: an approach using the bootstrap. Evolution, 39, 783--791.
dist.topo, consensus, nodelabelsdata(woodmouse)
tr <- nj(dist.dna(woodmouse))
### Are bootstrap values stable?
for (i in 1:5)
print(boot.phylo(tr, woodmouse, function(xx) nj(dist.dna(xx))))
### How many partitions in 100 random trees of 10 labels?...
TR <- replicate(100, rtree(10), FALSE)
pp10 <- prop.part(TR)
length(pp10)
### ... and in 100 random trees of 20 labels?
TR <- replicate(100, rtree(20), FALSE)
pp20 <- prop.part(TR)
length(pp20)
plot(pp10, pch = "x", col = 2)
plot(pp20, pch = "x", col = 2)Run the code above in your browser using DataLab