get_sim_twal_with_std_nsm_fun: Get a function to simulate a twin alignment which uses a...

View source: R/get_sim_twal_with_std_nsm_fun.R

get_sim_twal_with_std_nsm_funR Documentation

Get a function to simulate a twin alignment which uses a standard site model

Description

Get a function to simulate a twin alignment which uses a standard site model

Usage

get_sim_twal_with_std_nsm_fun(
  mutation_rate = 0.1,
  site_model = beautier::create_jc69_site_model()
)

Arguments

mutation_rate

the mutation rate per base pair per time unit. Use check_mutation_rate to check if a mutation rate is valid.

site_model

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

Value

a partially evaluated function of sim_twal_with_std_nsm

See Also

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.

Examples


f <- get_sim_twal_with_std_nsm_fun(
  mutation_rate = 0.1
)
# This adapter function must be a sim_twin_alignment function
check_sim_twal_fun(f)

# Simulate a twin DNA alignment

alignment <- f(
  twin_phylogeny = ape::read.tree(text = "((A:1, B:1):2, C:3);"),
  root_sequence = "aaaa"
)
check_alignment(alignment)

richelbilderbeek/pirouette documentation built on Oct. 18, 2023, 3:09 p.m.