View source: R/create_tral_file.R
create_tral_file | R Documentation |
The simulation is performed by create_true_alignment.
create_tral_file(phylogeny, alignment_params, verbose = FALSE)
phylogeny |
a phylogeny of class phylo |
alignment_params |
parameters to simulate an alignment, as can be created by create_alignment_params |
verbose |
if TRUE, show more output |
nothing
Richèl J.C. Bilderbeek
Use create_true_alignment to only simulate the alignment, without saving the alignment to 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 (and where to save) 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 and save the alignment
create_tral_file(
phylogeny = phylogeny,
alignment_params = alignment_params
)
# 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.