NucSimulator: Simulate DNA under General-Time Reversible model

Description Usage Arguments Details

View source: R/selacSim.R

Description

Simulates nucleotide data based on parameters under the GTR+G model

Usage

1
2
3
NucSimulator(phy, pars, nsites, nuc.model, base.freqs,
  include.gamma = TRUE, gamma.type = "median", ncats = 4,
  start.vals_array = NULL, user.rate.cats = NULL, user.rates = NULL)

Arguments

phy

The phylogenetic tree with branch lengths.

pars

A vector of parameters used for the simulation. They are ordered as follows: gamma shape and the rates for the nucleotide model.

nsites

The number of sites to simulate.

nuc.model

Indicates what type nucleotide model to use. There are three options: "JC", "GTR", or "UNREST".

base.freqs

The base frequencies for A C G T (in that order).

include.gamma

Boolean on whether to use a gamma model

gamma.type

How the gamma bins are used

ncats

The number of discrete gamma categories.

start.vals_array

A vector of nucleotides to be used as the starting nucleotide for each site in the simulation.

user.rate.cats

The user supplied gamma categories to use instead of choosing at random.

user.rates

The user supplied rates to use instead of choosing categories at random.

Details

Simulates a nucleotide matrix using parameters under the GTR+G model. Note that the output can be written to a fasta file using the write.dna() function in the ape package.


bomeara/selac documentation built on Nov. 11, 2021, 12:37 a.m.