View source: R/sim_true_alignment.R
sim_true_alignment | R Documentation |
Simulate the true alignment from the true phylogeny
sim_true_alignment(
true_phylogeny,
alignment_params = pirouette::create_alignment_params(),
verbose = FALSE
)
true_phylogeny |
the true phylogeny; the actual evolutionary history of the species, of class phylo |
alignment_params |
parameters to simulate an alignment, as can be created by create_alignment_params |
verbose |
if TRUE, show more output |
an alignment of type DNAbin
Richèl J.C. Bilderbeek
Use create_tral_file to save the simulated alignment directly to a file
# Create the phylogeny to simulate the alignment on
n_taxa <- 5
true_phylogeny <- ape::rcoal(n_taxa)
root_sequence <- "aaaacgt"
# Use default settings to create the alignment
alignment_params <- create_alignment_params(
sim_tral_fun =
get_sim_tral_with_std_nsm_fun(
mutation_rate = 1.0
),
root_sequence = root_sequence
)
# Simulate the alignment
alignment <- sim_true_alignment(
true_phylogeny = true_phylogeny,
alignment_params = alignment_params,
)
check_alignment(alignment)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.