Description Usage Arguments Value Examples
This uses a birth death process (TreeSim::sim.bd.taxa.age) to make a tree, then randomly adds hybridization events. The events are placed uniformly with time (not with numbers of taxa). If you use the phy.graph argument, you can pass in an existing phylogenetic network and it will add hybridization events to that; if you use a phy argument, it will add hybridization events to that. Note that currently there is no checking for multiple events between the same two branches. While hybridization events happen between taxa alive at the same instant of time, it is possible that the donor taxon later goes extinct with no descendants (other than the taxa of hybrid origin). These are basically ghost lineages, and this process (which then looks like gene flow going forward in time) is permitted if allow.ghost is TRUE.
1 2 3 4 5 6 7 8 9 10 11 | SimulateNetwork(
ntax = 100,
nhybridizations = 10,
birth = 1,
death = 1,
sample.f = 0.5,
tree.height = 1,
allow.ghost = FALSE,
phy.graph = NULL,
phy = NULL
)
|
ntax |
How many surviving taxa to have on the tree (extinct taxa are pruned, with the exception of donors if allow.ghost=TRUE) |
nhybridizations |
How many hybridization events to have |
birth |
Birth rate (instantaneous rate) |
death |
Extinction rate (instantaneous) |
sample.f |
What fraction of taxa alive at the present to sample (resulting in the final ntax) |
tree.height |
Root to tip height of the final tree |
allow.ghost |
Allow a hybridization events from an unsampled ancestor |
phy.graph |
If not NULL, uses this network and adds hybridizations to it to reach nhybridizations in total |
phy |
If not NULL, uses this tree to create hybridization events on |
A phy.graph object with hybridizations
1 2 | p <- SimulateNetwork(ntax=10 ,nhybridizations=2)
plot(p)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.