Loads trees, looks for a log file of tree likelihoods and parameter values, returns an rwty.chain object containing both
load.trees(
file,
type = NA,
format = "mb",
gens.per.tree = NA,
trim = 1,
logfile = NA,
skip = NA
)
output An rwty.chain object containing the multiPhylo and the table of values from the log file if available.
A path to a tree file containing an MCMC chain of trees
An argument that designates the type of tree file. If "nexus",
trees are loaded using ape's read.nexus
function. Otherwise, it's read.tree
.
If a "format" argument is passed, type will be determined from the format definition.
File format, which is used to find tree and log files. Currently accepted values are "mb" for MrBayes, "beast" for BEAST, "*beast" for *BEAST, and "revbayes" for RevBayes. If you would like RWTY to understand additional formats, please contact the authors and send us some sample data.
The number of generations separating trees. If not provided, RWTY will attempt to calculate it automatically.
Used for thinning the chain. If a number N is provided, RWTY keeps every Nth tree.
A path to a file containing model parameters and likelihoods. If no path is provided but a "format" argument is supplied, RWTY will attempt to find the log file automatically based on the format definition.
The number of lines that must be skipped to get to the header of the log file. MrBayes, for instance, prints a comment line at the top of the log file, so MrBayes files should be read in with a skip value of 1. If no "skip" value is provided but a "format" is supplied, RWTY will attempt to read logs using the skip value from the format definition.
read.tree
, read.nexus
#load.trees(file="mytrees.t", format = "mb")
Run the code above in your browser using DataLab