SelacSimulator: Simulate DNA under the SELAC model

Description Usage Arguments Details

View source: R/selacSim.R

Description

Simulates nucleotide data based on parameters under the SELAC model

Usage

1
2
3
4
SelacSimulator(phy, pars, aa.optim_array, codon.freq.by.aa = NULL,
  codon.freq.by.gene = NULL, numcode = 1, aa.properties = NULL,
  nuc.model, include.gamma = FALSE, gamma.type = "quadrature",
  ncats = 4, k.levels = 0, diploid = TRUE, site.cats.vector = NULL)

Arguments

phy

The phylogenetic tree with branch lengths.

pars

A vector of parameters used for the simulation. They are ordered as follows: C.q.phi, alpha, beta, Ne, base.freqs for A C G, and the rates for the nucleotide model.

aa.optim_array

A vector of optimal amino acids for each site to be simulated.

codon.freq.by.aa

A matrix of codon frequencies for each possible optimal amino acid. Rows are aa (including stop codon), cols are codons.

codon.freq.by.gene

A matrix of codon frequencies for each gene.

numcode

The ncbi genetic code number for translation. By default the standard (numcode=1) genetic code is used.

aa.properties

User-supplied amino acid distance properties. By default we assume Grantham (1974) properties.

nuc.model

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

include.gamma

A logical indicating whether or not to include a discrete gamma model.

gamma.type

Indicates what type of gamma distribution to use. Options are "quadrature" after the Laguerre quadrature approach of Felsenstein 2001 or median approach of Yang 1994.

ncats

The number of discrete categories.

k.levels

Provides how many levels in the polynomial. By default we assume a single level (i.e., linear).

diploid

A logical indicating whether or not the organism is diploid or not.

site.cats.vector

A vector designating the rate category for phi when include.gamma=TRUE.

Details

Simulates a nucleotide matrix using parameters under the SELAC 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.