Description Usage Arguments Value Functions Examples
View source: R/sim_multilocus.R
Retrieve all gene trees of the parent tree from a list generated from sim_mlc
Retrieves the gene trees of the child subtrees
1 2 3 4 5 6 7 | retrieve_parent_genetrees(gene_tree_list)
get_parent_gts(gene_tree_list)
retrieve_child_genetrees(gene_tree_list)
get_child_gts(gene_tree_list)
|
gene_tree_list |
A list of length 2: "parent_tree" and "child_trees" both of which are of class "multiPhylo" |
A 'multiPhylo' object of only the gene trees generated on the parent subtree
retrieve_child_genetrees
: Returns a list of objects of class 'multiPhylo'
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #' # first simulate a species tree
mu <- 0.5
lambda <- 1.0
nt <- 6
tr <- sim_stBD(sbr = lambda, sdr = mu, numbsim = 1, n_tips = nt)
# for a locus tree with 100 genes sampled per locus tree
gene_br <- 0.1
gene_dr <- 0.02
transfer_rate <- 0.2
locus_tree <- sim_ltBD(species_tree = tr[[1]],
gbr = gene_br,
gdr = gene_dr,
lgtr = transfer_rate,
num_loci = 1)
effect_popsize <- 1e6
gene_tree_obj <- sim_mlc(locus_tree[[1]],
effect_popsize,
num_reps = 2)
parent_trees <- retrieve_parent_genetrees(gene_tree_obj)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.