Description Usage Arguments Details Value References Examples
Given a species tree simulates a locus or gene family tree along the species tree. Short for simulates a locus tree under a birth-death-transfer process.
1 2 3 4 5 6 7 8 9 10 | sim_ltBD(species_tree, gbr, gdr, lgtr, num_loci, transfer_type = "random")
sim_locustree_bdp(
species_tree,
gbr,
gdr,
lgtr,
num_loci,
transfer_type = "random"
)
|
species_tree |
species tree to simulate along |
gbr |
gene birth rate |
gdr |
gene death rate |
lgtr |
gene transfer rate |
num_loci |
number of locus trees to simulate |
transfer_type |
The type of transfer input. Acceptable options: "cladewise" or "random" |
Given a species tree will perform a birth-death process coupled with transfer. The simulation runs along the species tree speciating and going extinct in addition to locus tree birth and deaths. Thus with parameters set to 0.0 a tree identical to the species tree is returned (it is relabel however).
Transfers are implemented as a birth-death process. One descendant lineage retains its species identity the other gains a new identity. At present, two types of transfers are implemented: "random" an "cladewise". The random transfer mode transfers one randomly chooses a contemporaneous lineage. Cladewise transfers choose lineages based on relatedness with more closely related lineages being more likely.
List of objects of the tree class (as implemented in APE)
Rasmussen MD, Kellis M. Unified modeling of gene duplication, loss, and coalescence using a locus tree. Genome Res. 2012;22(4):755–765. doi:10.1101/gr.123901.111
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # first simulate a species tree
mu <- 0.5 # death rate
lambda <- 2.0 # birth rate
numb_replicates <- 10
numb_extant_tips <- 4
# simulate trees under the GSA so first simulates a tree with
# numb_extant_tips * 100 tips counting each time we have a tree with 10 tips
# then randomly picks one of those trees
sp_tree <- sim_stBD(sbr = lambda,
sdr = mu,
numbsim = numb_replicates,
n_tips = numb_extant_tips)
gene_br <- 1.0
gene_dr <- 0.2
transfer_rate <- 0.2
sim_ltBD(species_tree = sp_tree[[1]],
gbr = gene_br,
gdr = gene_dr,
lgtr = transfer_rate,
num_loci = 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.