Learn R Programming

pirouette (version 1.6.9)

sim_alignment_with_std_nsm: Create an alignment with a standard site model using a raw interface

Description

Create an alignment with a standard site model using a raw interface

Usage

sim_alignment_with_std_nsm(phylogeny, root_sequence, mutation_rate, site_model)

Value

an alignment of type DNAbin

Arguments

phylogeny

a phylogeny of class phylo

root_sequence

the DNA sequence at the root of the phylogeny. By default, this will consist out of an equal amount of each letter Use check_root_sequence to check if a root sequence is valid.

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

Author

Richèl J.C. Bilderbeek

See Also

use sim_alignment_with_std_nsm_from_params to simulate an alignment from an alignment_params, as created by create_alignment_params.

Examples

Run this code

alignment <- sim_alignment_with_std_nsm(
  phylogeny = ape::read.tree(text = "((A:1, B:1):2, C:3);"),
  root_sequence = "aaaa",
  mutation_rate = 0.1,
  site_model = beautier::create_jc69_site_model()
)
check_alignment(alignment)

Run the code above in your browser using DataLab