| bootstrap.pml {phangorn} | R Documentation |
bootstrap.pml performs (non-parametric) bootstrap analysis and
bootstrap.phyDat produces a list of bootstrapped data sets.
plotBS plots a phylogenetic tree with the with the bootstrap values
assigned to the (internal) edges.
bootstrap.pml(x, bs = 100, trees = TRUE, multicore = FALSE, mc.cores = NULL, ...) bootstrap.phyDat(x, FUN, bs = 100, multicore = FALSE, mc.cores = NULL, jumble = TRUE, ...) plotBS(tree, BStrees, type = "unrooted", bs.col = "black", bs.adj = NULL, p = 50, frame = "none", ...)
x |
an object of class |
bs |
number of bootstrap samples. |
trees |
return trees only (default) or whole |
multicore |
logical, whether models should estimated in parallel. |
mc.cores |
The number of cores to use during bootstrap. Only supported on UNIX-alike systems. |
... |
further parameters used by |
FUN |
the function to estimate the trees. |
jumble |
logical, jumble the order of the sequences. |
tree |
The tree on which edges the bootstrap values are plotted. |
BStrees |
a list of trees (object of class "multiPhylo"). |
type |
the type of tree to plot, so far "cladogram", "phylogram" and "unrooted" are supported. |
bs.col |
color of bootstrap support labels. |
bs.adj |
one or two numeric values specifying the horizontal and vertical justification of the bootstrap labels. |
p |
only plot support values higher than this percentage number (default is 80). |
frame |
a character string specifying the kind of frame to be printed around the bootstrap values. This must be one of "none" (the default), "rect" or "circle". |
It is possible that the bootstrap is performed in parallel, with help of the multicore package. Unfortunately the multicore package does not work under windows or with GUI interfaces ("aqua" on a mac). However it will speed up nicely from the command line ("X11").
bootstrap.pml returns an object of class multi.phylo
or a list where each element is an object of class pml. plotBS
returns silently a tree, i.e. an object of class phylo with the
bootstrap values as node labels. The argument BStrees is optional and
if not supplied the tree with labels supplied in the node.label slot.
Klaus Schliep klaus.schliep@gmail.com
Felsenstein J. (1985) Confidence limits on phylogenies. An approach using the bootstrap. Evolution 39, 783–791
Penny D. and Hendy M.D. (1985) Testing methods evolutionary tree construction. Cladistics 1, 266–278
Penny D. and Hendy M.D. (1986) Estimating the reliability of evolutionary trees. Molecular Biology and Evolution 3, 403–417
optim.pml, pml,
plot.phylo,
nodelabels,consensusNet and
SOWH.test for parametric bootstrap
## Not run:
data(Laurasiatherian)
dm <- dist.logDet(Laurasiatherian)
tree <- NJ(dm)
# NJ
set.seed(123)
NJtrees <- bootstrap.phyDat(Laurasiatherian,
FUN=function(x)NJ(dist.logDet(x)), bs=100)
treeNJ <- plotBS(tree, NJtrees, "phylogram")
# Maximum likelihood
fit <- pml(tree, Laurasiatherian)
fit <- optim.pml(fit, rearrangements="NNI")
set.seed(123)
bs <- bootstrap.pml(fit, bs=100, optNni=TRUE)
treeBS <- plotBS(fit$tree,bs)
# Maximum parsimony
treeMP <- pratchet(Laurasiatherian)
treeMP <- acctran(treeMP, Laurasiatherian)
set.seed(123)
BStrees <- bootstrap.phyDat(Laurasiatherian, pratchet, bs = 100)
treeMP <- plotBS(treeMP, BStrees, "phylogram")
add.scale.bar()
# export tree with bootstrap values as node labels
# write.tree(treeBS)
## End(Not run)