fossils.to.BEAST.constraints {FossilSim} | R Documentation |
Create a set of BEAST2 constraints to construct a DPPDIV style fixed extant topology FBD analysis
Description
If complete = FALSE, only the extant taxa are used to construct the taxon constraints, resulting in a DPPDIV style analysis in which the extant topology is fixed and fossils can float in the tree. The resulting output uses the stronglyMonophyletic taxon constraint on the root, this means that all fossil taxa will be sampled in the crown group, and never in a position below the root.
Usage
fossils.to.BEAST.constraints(
fossils,
tree,
file = "BEASTconstraints.xml",
complete = FALSE,
tree.name = "beastTree"
)
Arguments
fossils |
an object of class "fossils" that corresponds to fossil occurrences for the "tree" argument. |
tree |
an object of class "phylo", representing the tree upon which the fossil occurrences were simulated. |
file |
the name of the file to which the constraints will be written, defaults to "BEASTconstraints.xml". |
complete |
logical, if TRUE then taxon constraints are built for the complete tree, if FALSE then constraints are built for the crown clades only. Default value is FALSE. |
tree.name |
the name of the tree as used in the BEAST2 xml format. |
Value
NULL.
Examples
t = TreeSim::sim.bd.taxa(10, 1, 0.1, 0.05)[[1]]
f = sim.fossils.poisson(0.1, t, root.edge = FALSE)
fossils.to.BEAST.constraints(f, t, file = tempfile(), complete = TRUE)