sim_linked: simulate a sequence assuming conditional substitutions on the...

View source: R/sim_linked.R

sim_linkedR Documentation

simulate a sequence assuming conditional substitutions on the node.

Description

simulate a sequence assuming conditional substitutions on the node.

Usage

sim_linked(
  phy,
  Q = rep(1, 6),
  rate = 0.1,
  node_mut_rate_double = 1e-09,
  l = 1000,
  bf = rep(0.25, 4),
  rootseq = NULL,
  node_time = 0.01
)

Arguments

phy

tree for which to simulate sequences

Q

substitution matrix along the branches, default = JC

rate

mutation rate , default = 1

node_mut_rate_double

mutation rate on the node, default = 1e-9

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

time spent at the node

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.