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 treedata; a Bayesian clock tree imported using treeio::read.mrbayes for Mr. Bayes summary trees.

summary

The name of the rate summary. Should be one of "mean" or "median".

drop_dummy

if not NULL, will drop the dummy extant tip with the given label from the Mr. Bayes summary tree prior to extracting the clock rates (when present). Default is NULL.

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)

[Package EvoPhylo version 0.3.2 Index]