View source: R/create_true_alignment.R
create_true_alignment | R Documentation |
We call this the true alignment, as it could thruthfully be found in nature, when assuming the true phylogeny is the true evolutionary history.
create_true_alignment(true_phylogeny, alignment_params)
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 |
an alignment of type DNAbin
Richèl J.C. Bilderbeek, Giovanni Laudanno
Use create_tral_file to save the created alignment directly to a file
# Check cleanup by other functions
beastier::check_empty_beaustier_folders()
# Create the ancestor's DNA sequence
n_base_pairs <- 4
root_sequence <- create_blocked_dna(length = n_base_pairs)
# How to simulate the alignment
alignment_params <- create_alignment_params(
root_sequence = root_sequence
)
# Create a phylogeny to simulate the DNA sequences on
n_taxa <- 5
phylogeny <- ape::rcoal(n_taxa)
# Simulate the alignment
alignment <- create_true_alignment(
true_phylogeny = phylogeny,
alignment_params = alignment_params
)
check_alignment(alignment)
# Cleanup
beastier::remove_beaustier_folders()
beastier::check_empty_beaustier_folders()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.