First create a tree, then you can twin it. Currently there are two different way to do so. The first is generating the twin using a Birth-Death (bd) process. The second using a Yule process.
We pick this tree to twin:
The BD twinning parameters:
bd_twin <- create_twin_tree(
phylogeny = phylogeny,
twinning_params = create_twinning_params(
sim_twin_tree_fun = get_sim_bd_twin_tree_fun()
)
)
The Yule twinning parameters:
yule_twin <- create_twin_tree(
phylogeny = phylogeny,
twinning_params = create_twinning_params(
sim_twin_tree_fun = create_sim_yule_twin_tree_fun()
)
)
The copy twinning parameters:
copy_twin <- create_twin_tree(
phylogeny = phylogeny,
twinning_params = create_twinning_params(
sim_twin_tree_fun = create_copy_twtr_from_true_fun()
)
)
Show the true tree in red and bd twin tree in gray:
plot_densitree(
phylos = c(bd_twin, yule_twin, copy_twin),
col = c("red", "blue", "gray"),
width = 4,
consensus = phylogeny,
alpha = 0.5
)
Show the true tree in red and bd twin tree in green:
plot_densitree(
phylos = c(phylogeny, yule_twin),
col = c("red", "green"),
width = 4,
consensus = phylogeny,
alpha = 0.5
)