setRootAge | R Documentation |
This function uses a table of fixed dates for operational-taxon-units (tip taxa) to calculate the absolute
age of the root divergence for a tree with branch lengths, and then appends this root age to the tree
as a $root.time
element, and then outputs the tree. Function setRootAges
is a wrapper for
setRootAge
for use with multiple trees in a object of class multiPhylo
.
This function was mainly written for dealing with trees of extinct taxa dated in units of
absolute time from Bayesian analyses, such as with MrBayes,
with trees scaled to time units by functions such as obtainDatedPosteriorTreesMrB
.
setRootAge(tree, fixedAges = NULL) setRootAges(trees, fixedAges = NULL)
tree |
A phylogeny with branch lengths of class |
fixedAges |
A table of fixed ages for tip taxa, generally as a dataframe where the
first column is of type character, and the second column is of type |
trees |
A list of class |
Trees of fossil taxa come with one issue rarely encountered by those dealing with molecular
phylogenies: the absolute timing of when tips and divergences is not certain. With the vast
majority of molecular phylogenies, it can be assumed the youngest tips occur at time 0
– in other words , the modern.
This knowledge gives the tree an 'anchor' for fixing the absolute timing of events.
Many programs and other software designed for depicting and analyzing phylogenetic hypotheses
assumes such an apparent absolute time-scale (in R and elsewhere).
A phylogenetic analysis of Paleozoic brachiopods that include no
extant members has no such anchor at time = 0, and such a default assumption in available
software can be misleading. The $root.time
protocol is intended to grant this
absolute time-scale to a dated tree of fossil taxa, and is appended by most of the
dating functions in package paleotree. However, trees dated by other approaches, such as via tip-dating in
programs such as MrBayes and BEAST, will not have $root.time
elements when read into R.
The input tree is output, with a new $root.time
element.
David W. Bapst
setRootAges
is designed to work by default with trees on relative
time-scales dated by obtainDatedPosteriorTreesMrB
, particularly
when the argument with getFixedTimes = TRUE
, which is used to obtain fixed tip
ages for anchoring the tree against an absolute time-scale. The functions described here
will be applied automatically with obtainDatedPosteriorTreesMrB
if argument getRootAges = TRUE
.
set.seed(444) tree <- rtree(10) tipAges <- cbind(c("t1","t2"), c(15,10)) absTimeTree <- setRootAge(tree = tree,tipAges) plot(absTimeTree) axisPhylo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.