genGrowTree {poweRbal} | R Documentation |
Generation of rooted binary trees under tree growing models (no extinction)
Description
genGrowTree
- Generates a rooted binary tree in phylo
format with the given number of n
leaves under a specified
discrete-time tree growing model without extinction.
These tree growing models act at the leaves by varying their speciation
rates according to a parameter ZETA
or variance SIGMA
. They
may also depend on so-called trait values of the leaves (e.g., continuous or
discrete age, or another numeric trait that affects fitness).
You may choose an already built-in model (see use_built_in
) or
specify a (new) model by defining how the rates (and optionally traits)
change in every time step (see parameters childRates
and
otherRates
as well as childTraits
and
otherTraits
; see also Table 5 of the supplementary material of
the corresponding manuscript).
Due to the restrictions of the phylo
or multiphylo
format
the number of leaves must be at least 2 since there must be at
least one edge.
Usage
genGrowTree(
n,
STARTING_RATE = 1,
STARTING_TRAIT = 10,
ZETA = 1,
SIGMA = 0,
childRates,
otherRates,
childTraits = NULL,
otherTraits = NULL,
use_built_in = NULL
)
Arguments
n |
Integer value that specifies the desired number of leaves, i.e., vertices with in-degree 1 and out-degree 0. |
STARTING_RATE |
Positive numeric value (default = 1) which specifies the initial rate at which the speciation events occur (has only influence on the edge length, not on the tree topology). |
STARTING_TRAIT |
Numeric value (default = 10) which specifies the initial state of a trait. |
ZETA |
Constant non-negative numeric value (default = 1) which can
influence the speciation rates. Can also be a vector if used as such when
defining the functions |
SIGMA |
Constant positive numeric value (default = 0) which can influence
the speciation rates. Can also be a vector if used as such when defining the
functions |
childRates |
A function that generates two speciation rates for the
children emerging from a speciation event based on various factors.
|
otherRates |
A function that generates a new speciation rate for all
leaves not affected by the speciation event (all but parent and children)
based on various factors. The function is applied after the speciation event,
i.e., after
|
childTraits |
An optional function (default = NULL) that generates two
trait values for the children emerging from a speciation event based on
various factors. |
otherTraits |
An optional function (default = NULL) that generates a new
trait value for all leaves not affected by the speciation event (all but
parent and children) based on various factors. |
use_built_in |
Optional (default = NULL): Character specifying which of
the already implemented models should be used. Overwrites
|
Value
genGrowTree
A single tree of class phylo
is
returned.
Author(s)
Sophie Kersting
References
S. J. Kersting, K. Wicke, and M. Fischer. Tree balance in phylogenetic models. arXiv:2406.05185, 2024.
S. J. Kersting, K. Wicke, and M. Fischer. Tree balance in phylogenetic models: Supplementary material. https://tinyurl.com/278cwdh8, 2024.
M. G. B. Blum and O. Francois. On statistical tests of phylogenetic tree imbalance: the Sackin and other indices revisited. Mathematical Biosciences, 195(2):141–153, 2005.
S. B. Heard. Patterns in phylogenetic tree balance with variable and evolving speciation rates. Evolution, 50(6):2141–2148, 1996.
S. J. Kersting. Genetic programming as a means for generating improved tree balance indices (Master’s thesis, University of Greifswald), 2020.
M. Kirkpatrick and M. Slatkin. Searching for evolutionary patterns in the shape of a phylogenetic tree. Evolution, 47(4):1171–1181, 1993.
Examples
genGrowTree(n = 5, use_built_in = "IF_sym", ZETA = 2)