get_clockrate_table_MrBayes {EvoPhylo} | R Documentation |
Extract evolutionary rates from a Bayesian clock tree produced by Mr. Bayes
Description
Extract evolutionary rate summary statistics for each node from a Bayesian clock summary tree produced by Mr. Bayes and stores them in a data frame.
Usage
get_clockrate_table_MrBayes(tree, summary = "median",
drop_dummy = NULL)
Arguments
tree |
An S4 class object of type |
summary |
The name of the rate summary. Should be one of |
drop_dummy |
if not |
Value
A data frame with a column containing the node identifier (node
) and one column for each relaxed clock partition in the tree object containing clock rates.
See Also
vignette("rates-selection")
for the use of this function as part of an analysis pipeline.
get_clockrate_table_BEAST2
for the equivalent function for BEAST2 output files.
clockrate_summary
for summarizing and examining properties of the resulting rate table. Note that clade membership for each node must be customized (manually added) before these functions can be used, since this is tree and dataset dependent.
Examples
# See vignette("rates-selection") for how to use this
# function as part of an analysis pipeline
## Import summary tree with three clock partitions produced by
## Mr. Bayes (.t or .tre files) from your local directory
## Not run:
tree3p <- treeio::read.mrbayes("Tree3p.t")
## End(Not run)
#Or use the example Mr.Bayes multi-clock tree file (\code{tree3p})
data("tree3p")
# obtain the rate table from MrBayes tree
rate_table <- get_clockrate_table_MrBayes(tree3p)
head(rate_table)