The twin alignment is simulated from the twin tree. The number of mutations it will have is counted by comparing it to the root sequence. The twin alignment will have an equal amount of mutations as the true alignment.
get_sim_twal_same_n_muts_fun(
mutation_rate = 1,
site_model = beautier::create_jc69_site_model(),
max_n_tries = 100,
verbose = FALSE
)the function sim_twal_with_same_n_mutation
the mutation rate per base pair per time unit. Use check_mutation_rate to check if a mutation rate is valid.
a nucleotide substitution model, which can be:
A standard nucloetide substitution model, as created by create_site_model
lns: a linked node-substitution model
uns: an unlinked node-substitution model
maximum number of tries before giving up
if TRUE, show more output
This is an adapter function
(see https://en.wikipedia.org/wiki/Adapter_pattern),
with the purpose of passing check_sim_twal_fun,
by being a function with the function arguments twin_phylogeny
and true_alignment.
See check_sim_twal_fun to the the other functions to simulate a twin alignment. Use sim_twin_alignment to use this function to create a twin alignment.