X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=man%2Fboot.phylo.Rd;h=2e166656c4e858f6ccca93f7f57a49a854828eaf;hb=5090ae602c33e1cd3bbdbd2429a43daa8188b8c3;hp=fa39eb7ce126a3c16913a3412d59cdbc843ca20c;hpb=c827059eeafc8cbe41c812b26979543ab287803e;p=ape.git diff --git a/man/boot.phylo.Rd b/man/boot.phylo.Rd index fa39eb7..2e16665 100644 --- a/man/boot.phylo.Rd +++ b/man/boot.phylo.Rd @@ -7,9 +7,10 @@ \alias{plot.prop.part} \title{Tree Bipartition and Bootstrapping Phylogenies} \usage{ -boot.phylo(phy, x, FUN, B = 100, block = 1) -prop.part(..., check.labels = FALSE) -prop.clades(phy, ..., part = NULL) +boot.phylo(phy, x, FUN, B = 100, block = 1, + trees = FALSE, quiet = FALSE, rooted = FALSE) +prop.part(..., check.labels = TRUE) +prop.clades(phy, ..., part = NULL, rooted = FALSE) \method{print}{prop.part}(x, ...) \method{summary}{prop.part}(object, ...) \method{plot}{prop.part}(x, barcol = "blue", leftmar = 4, ...) @@ -23,14 +24,18 @@ prop.clades(phy, ..., part = NULL) \item{B}{the number of bootstrap replicates.} \item{block}{the number of columns in \code{x} that will be resampled together (see details).} + \item{trees}{a logical specifying whether to return the bootstraped + trees (\code{FALSE} by default).} + \item{quiet}{a logical: a progress bar is displayed by default.} + \item{rooted}{a logical specifying whether the trees should be treated + as rooted or not (the default).} \item{\dots}{either (i) a single object of class \code{"phylo"}, (ii) a series of such objects separated by commas, or (iii) a list containing such objects. In the case of \code{plot} further arguments for the plot (see details).} \item{check.labels}{a logical specifying whether to check the labels - of each tree. If \code{FALSE} (the default), it is assumed that all - trees have the same tip labels, and that they are in the same order - (see details).} + of each tree. If \code{FALSE}, it is assumed that all trees have the + same tip labels, and that they are in the same order (see details).} \item{part}{a list of partitions as returned by \code{prop.part}; if this is used then \code{\dots} is ignored.} \item{object}{an object of class \code{"prop.part"}.} @@ -43,7 +48,9 @@ prop.clades(phy, ..., part = NULL) These functions analyse bipartitions found in a series of trees. \code{prop.part} counts the number of bipartitions found in a series - of trees given as \code{\dots}. + of trees given as \code{\dots}. If a single tree is passed, the + returned object is a list of vectors with the tips descending from + each node (i.e., clade compositions indexed by node number). \code{prop.clades} counts the number of times the bipartitions present in \code{phy} are present in a series of trees given as \code{\dots} or @@ -61,11 +68,11 @@ prop.clades(phy, ..., part = NULL) be resampled altogether. For instance, if one wants to resample at the codon-level, then \code{block = 3} must be used. - Using (the default) \code{check.labels = FALSE} in \code{prop.part} - results in considerable decrease in computing times. This requires that - (i) all trees have the same tip labels, \emph{and} (ii) these labels - are ordered similarly in all trees (in other words, the element - \code{tip.label} are identical in all trees). + Using \code{check.labels = FALSE} in \code{prop.part} decreases + computing times. This requires that (i) all trees have the same tip + labels, \emph{and} (ii) these labels are ordered similarly in all + trees (in other words, the element \code{tip.label} are identical in + all trees). The plot function represents a contingency table of the different partitions (on the \emph{x}-axis) in the lower panel, and their observed @@ -83,6 +90,10 @@ prop.clades(phy, ..., part = NULL) passed as \code{\dots} fulfills conditions (i) and (ii) above, then it might be faster to first call, e.g., \code{pp <- prop.part(...)}, then use the option \code{part}: \code{prop.clades(phy, part = pp)}. + + You have to be careful that by default \code{prop.clades} considers + the trees as unrooted and this may result in spurious results if the + trees are rooted (see examples). } \value{ \code{prop.part} returns an object of class \code{"prop.part"} which @@ -95,7 +106,10 @@ prop.clades(phy, ..., part = NULL) \code{prop.clades} and \code{boot.phylo} return a numeric vector which \emph{i}th element is the number associated to the \emph{i}th - node of \code{phy}. + node of \code{phy}. If \code{trees = TRUE}, \code{boot.phylo} returns + a list whose first element (named \code{"BP"}) is like before, and the + second element (\code{"trees"}) is a list with the bootstraped + trees. \code{summary} returns a numeric vector. } @@ -107,26 +121,34 @@ prop.clades(phy, ..., part = NULL) Felsenstein, J. (1985) Confidence limits on phylogenies: an approach using the bootstrap. \emph{Evolution}, \bold{39}, 783--791. } -\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}} +\author{Emmanuel Paradis} \seealso{ \code{\link{dist.topo}}, \code{\link{consensus}}, \code{\link{nodelabels}} } \examples{ data(woodmouse) -tr <- nj(dist.dna(woodmouse)) +f <- function(x) nj(dist.dna(x)) +tr <- f(woodmouse) ### Are bootstrap values stable? for (i in 1:5) - print(boot.phylo(tr, woodmouse, function(xx) nj(dist.dna(xx)))) + print(boot.phylo(tr, woodmouse, f, quiet = TRUE)) ### How many partitions in 100 random trees of 10 labels?... -TR <- replicate(100, rtree(10), FALSE) +TR <- rmtree(100, 10) pp10 <- prop.part(TR) length(pp10) ### ... and in 100 random trees of 20 labels? -TR <- replicate(100, rtree(20), FALSE) +TR <- rmtree(100, 20) pp20 <- prop.part(TR) length(pp20) plot(pp10, pch = "x", col = 2) plot(pp20, pch = "x", col = 2) + +set.seed(1) +tr <- rtree(10) # rooted by default +prop.clades(tr, tr) # clearly wrong +prop.clades(tr, tr, rooted = TRUE) +tr <- rtree(10, rooted = FALSE) +prop.clades(tr, tr) # correct } \keyword{manip} \keyword{htest}