sim_normal: Simulate sequences for a given evolutionary tree, using a...

View source: R/sim_normal.R

sim_normalR Documentation

Simulate sequences for a given evolutionary tree, using a standard model of sequence evolution along the branches. Code for this function was heavily inspired by the function simSeq from the phangorn package.

Description

Simulate sequences for a given evolutionary tree, using a standard model of sequence evolution along the branches. Code for this function was heavily inspired by the function simSeq from the phangorn package.

Usage

sim_normal(x, l = 1000, Q = NULL, bf = NULL, rootseq = NULL, rate = 1)

Arguments

x

a phylogenetic tree tree, i.e. an object of class phylo

l

length of the sequence to simulate.

Q

the rate matrix.

bf

base frequencies.

rootseq

a vector of length l containing the root sequence, other root sequence is randomly generated.

rate

mutation rate

Value

list with four items

  1. alignment Phydat object with the resulting alignment

  2. rootseq the rootsequence used

  3. total_branch_substitutions total number of substitutions accumulated on the branches

  4. total_node_substitutions total number of substitutions accumulated at the nodes

Author(s)

Klaus Schliep klaus.schliep@gmail.com


nodeSub documentation built on Nov. 14, 2023, 5:10 p.m.