Description Usage Arguments Details Value Author(s) References See Also Examples
createBifurcate and buildApe take a 'paleoPhylo' object and convert it to its fully bifurcating equivalent (i.e. all ancestors terminate if they speciate). createBifurcate converts the as.paleoPhylo object into one with only bifurcating speciations; buildApe does the conversion to ape.
1 2 | createBifurcate(pP)
buildApe(pP, label=TRUE)
|
pP |
An object of class 'paleoPhylo' (see |
label |
Should the tip and node labels be labels ( |
createBifurcate works by *walking* through the lineage phylogeny until a speciation event occurs. If the speciation event is a budding-type (where the ancestor lineage persists simultaneously with the descendant), then createBifurcate splits the ancestor such that the speciation is a bifurcating-type (new, but , unique IDs are generated). This process is repeated iteratively until extant (or most recently deceased) tips have been dealt with. The goal is to enable easy conversion to class 'phylo' for use with read.tree formats.
createBifurcate does not work for phylogenies with polytomies since the fully-birfurcating version would require resolution of said polytomy.
buildApe converts this into an object of class 'phylo' for use in ape (e.g. read.tree or plot.phylo), i.e. assigning of node labels and branch lengths, edge matrix and root definitions. The root is usually the first row of the data frame and needs to be unique. Phylogenies containing more than 500,000 species will not buildApe properly.
createBifurcate and buildApe are kept separate to enable less manipulation before plotting fully bifurcating trees with arguments in drawPhylo.
An object of class 'paleoPhylo' (see as.paleoPhylo).
Thomas H.G. Ezard t.ezard@soton.ac.uk
Ezard, T.H.G. & Purvis, A. (2009). paleoPhylo: free software to draw paleobiological phylogenies. Paleobiology 35, 460-464. doi: 10.1666/0094-8373-35.3.460.
1 2 3 4 5 6 7 8 9 10 | data(pearson93)
p93 <- with(pearson93, as.paleoPhylo(Code, Parent, Start, End, label=Name))
apeTree <- buildApe(createBifurcate(p93))
apeTree
##using ape, do some simple illustratory stuff
##plot a fully bifurcating phylogeny using plot.phylo
plot(apeTree)
##write apeTree using the Newick (aka New Hampshire) format.
write.tree(apeTree)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.