sim_unlinked_explicit: Simulate a sequence assuming node substitutions are not...

View source: R/sim_unlinked_explicit.R

sim_unlinked_explicitR Documentation

Simulate a sequence assuming node substitutions are not shared amongst offspring, using the explicit simulation method (e.g. reverse substitutions are modeled explicitly)

Description

Simulate a sequence assuming node substitutions are not shared amongst offspring, using the explicit simulation method (e.g. reverse substitutions are modeled explicitly)

Usage

sim_unlinked_explicit(
  phy,
  Q1 = rep(1, 6),
  Q2 = rep(1, 6),
  rate1 = 0.1,
  rate2 = 0.1,
  l = 1000,
  bf = rep(0.25, 4),
  rootseq = NULL,
  node_time = 0.001
)

Arguments

phy

phylogenetic tree for which to simulate sequences

Q1

substitution matrix along the branches, default = JC

Q2

substitution matrix on the nodes, default = JC

rate1

mutation rate along the branch, default = 0.1

rate2

mutation rate on the node, default = 0.1

l

number of base pairs to simulate

bf

base frequencies, default = c(0.25, 0.25, 0.25, 0.25)

rootseq

sequence at the root, simulated by default

node_time

amount of time spent at the nodes

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


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