This function adds missing taxa to a chronogram given in dated_tree
.
It is still work in progress.
tree_add_dates(
dated_tree = NULL,
missing_taxa = NULL,
dating_method = "mrbayes",
adding_criterion = "random",
mrbayes_output_file = "mrbayes_tree_add_dates.nexus"
)
A phylo
object.
a tree (newick or phylo) with branch lengths proportional to absolute time
A tree, a data frame or a vector enlisting all missing taxa you want to include.
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.
data.frame
It contains two columns named "taxon" and "clade". The first one contains a character vector of missing taxon names. The second one contains a character or numeric vector of nodes from a constraint tree to which each taxon will be assigned.
It contains the names of the missing taxa. They will be added at random to the constraint tree.
The method used for tree dating, options are "mrbayes" and "bladj".
Only used when dating_method = "mrbayes"
. A character vector to specify how missing_taxa should be added to dated_tree.
Choose one of:
missing_taxa will be added at random to dated_tree.
taxa will be added to dated_tree following a dataframe with taxonomic assignations given in missing_taxa argument. If no dataframe is given, OpenTree's reference taxonomy will be used.
taxa will be added to dated_tree following a tree given in missing_taxa argument. If no tree is given, OpenTree's synthetic tree will be used.
A character vector specifying the name of mrBayes run file and outputs (can specify directory too).