# Check cleanup by other functions
beastier::check_empty_beaustier_folders()
# Create a true phylogeny to simulate the DNA sequences on
n_taxa <- 5
set.seed(1)
phylogeny <- ape::rcoal(n_taxa)
# Create the ancestor's DNA sequence
n_base_pairs <- 4
root_sequence <- create_blocked_dna(length = n_base_pairs)
# Simulate and save the true alignment
alignment_params <- create_alignment_params(
root_sequence = root_sequence
)
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)
# File does not exist yet
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
)
# File is at twinning_params$twin_alignment_filename
# Cleanup
beastier::remove_beaustier_folders()
beastier::check_empty_beaustier_folders()
Run the code above in your browser using DataLab