if (beautier::is_on_ci() && beastier::is_beast2_installed()) {
# Create a true phylogeny to simulate the DNA sequences on
n_taxa <- 5
set.seed(1)
phylogeny <- ape::rcoal(n_taxa)
# Simulate and save the true alignment
alignment_params <- create_test_alignment_params()
create_tral_file(
phylogeny = phylogeny,
alignment_params = alignment_params
)
# Create a twin phylogeny to simulate the DNA sequences on
set.seed(2)
twin_phylogeny <- ape::rcoal(n_taxa)
twinning_params <- create_twinning_params()
# Simulate and save the twin alignment
alignment <- create_twal_file(
twin_phylogeny = twin_phylogeny,
alignment_params = alignment_params,
twinning_params = twinning_params
)
# Bundle parameters in pir_params
pir_params <- create_test_pir_params()
pir_params$alignment_params <- alignment_params
pir_params$twinning_params <- twinning_params
pir_params <- init_pir_params(pir_params)
pir_run_twin_tree(
twin_phylogeny = twin_phylogeny,
pir_params = pir_params
)
}
Run the code above in your browser using DataLab