make_mrbayes_tree: Takes a constraint tree and uses mrBayes to get node ages and...

Description Usage Arguments Value

View source: R/tree_makeup_dates.R


Takes a constraint tree and uses mrBayes to get node ages and branch lengths given a set of node calibrations without any data.


make_mrbayes_tree(constraint = NULL, taxa = NULL,
  ncalibration = NULL, missing_taxa = NULL,
  age_distribution = "fixed", root_calibration = FALSE,
  mrbayes_output_file = "")



The constraint tree: a phylo object or a newick character string, with or without branch lengths.


A character vector with taxon names to be mantained in tree


The node calibrations: a phylo object with branch lengths proportional to time; in this case all nodes from ncalibration will be used as calibration points. Alternatively, a list with two elements: the first is a character vector with node names from phy to calibrate; the second is a numeric vector with the corresponding ages to use as calibrations.


A tree, a data frame or a vector enlisting all missing taxa you want to include.

A tree.

Either as a phylo object or as a newick character string. It contains all taxa that you want at the end, both missing and non missing. This tree will be used as a hard constraint.

A data frame.

It contains two columns. taxon. A character vector of missing taxon names. clade. A character or numeric vector of nodes from a constraint tree to which each taxon will be assigned.

A character vector.

It contains the names of the missing taxa. They will be added at random to the constraint tree.


A character string specifying the type of calibration. Only "fixed" and "uniform" are implemented for now.


The age given in ncalibration will be used as fixed age.


The age given in ncalibration will be used as mean age. The standard deviation can be provided. # still need to add this option. By default, a 95 CI sd is used.


The age given in ncalibration will be used as mean age. Where min_age = 0.9 * mean age, and max_age = 1.1 * mean age.


Used to set a calibration at the root or not. Default to FALSE. Only relevant if ncalibration is specified.


A character vector specifying the name of mrBayes run file and outputs (can specify directory too).


A phylo tree with branch lengths proportional to time. It will save all mrBayes outputs in the working directory.

phylotastic/datelife documentation built on Jan. 22, 2019, 12:29 a.m.