So you want to simulate a nested set of trees? First you need to figure out the
parameters you would like to simulate under. We will use the helpful
treeduckenTools
package to assist us.
library(treeduckenTools) num_tips <- 15 birth_rate <- rexp(n = 1, rate = 1) death_rate <- birth_rate * 0.5 gene_birth_rate <- rexp(n = 1, rate = 2) gene_death_rate <- 0 lgt_rate <- rexp(n = 1, rate = 2) num_loci <- 3 num_genes <- 9 individuals_per_pop <- 3 pop_size <- 6
Now you can print out the settings you would like with these
library(magrittr) make_td_settings_list(birth_rate, death_rate, lgt_rate, lgt_rate, gene_birth_rate, gene_death_rate, num_tips, individuals_per_pop, pop_size, reps = 1, num_loci, num_genes, sout = 1) %>% write_td_settings(output_prefix = "test")
And run treeducken
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.