get_clockrate_table_BEAST2 {EvoPhylo}R Documentation

Extract evolutionary rates from Bayesian clock trees produced by BEAST2

Description

BEAST2 stores the rates for each clock in a separate file. All trees need to be loaded using treeio::read.beast.

Usage

get_clockrate_table_BEAST2(..., summary = "median", drop_dummy = NULL)

Arguments

...

treedata objects containing the summary trees with associated data on the rates for each separate clock.

summary

summary metric used for the rates. Currently supported: "mean" or "median", default "median".

drop_dummy

if not NULL, will drop the dummy extant tip with the given label from the BEAST2 summary trees 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 containing the clock rates for each tree provided, in the same order as the trees.

See Also

get_clockrate_table_MrBayes() for the equivalent function for MrBayes 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

#Import all clock summary trees produced by BEAST2 from your local directory
## Not run: 
tree_clock1 <- treeio::read.beast("tree_file_clock1.tre")
tree_clock2 <- treeio::read.beast("tree_file_clock2.tre")

## End(Not run)

#Or use the example BEAST2 multiple clock trees that accompany EvoPhylo.
data(tree_clock1)
data(tree_clock2)

# obtain the rate table from BEAST2 trees
rate_table <- get_clockrate_table_BEAST2(tree_clock1, tree_clock2, summary = "mean")


[Package EvoPhylo version 0.3.2 Index]