Simulates nucleotide data based on parameters under the SELAC model but assumes either Phi or Ne evolves along the tree.
SelacSimulatorEvolvingRates(phy, pars, aa.optim_array,
root.codon.frequencies, numcode = 1, aa.properties = NULL, nuc.model,
k.levels = 0, diploid = TRUE, pars.to.evolve = "phi",
evolve.type = "BM", evolve.pars = c(1, 0), Ne.vals.evolved = NULL)
The phylogenetic tree with branch lengths.
A vector of parameters used for the simulation. They are ordered as follows: C.q.phi, alpha, beta, and Ne.
A vector of optimal amino acids for each site to be simulated.
A vector of codon frequencies for each possible optimal amino acid. Thus, the vector is of length 64x64.
The The ncbi genetic code number for translation. By default the standard (numcode=1) genetic code is used.
User-supplied amino acid distance properties. By default we assume Grantham (1974) properties.
Indicates what type nucleotide model to use. There are three options: "JC", "GTR", or "UNREST".
Provides how many levels in the polynomial. By default we assume a single level (i.e., linear).
A logical indicating whether or not the organism is diploid or not.
Indicates which parameters to assume evolve along the tree. Only two options: "phi" or "Ne".
The process by which the focal parameter evovles. There are two options: Brownian motion ("BM") or Ornstein-Uhlenbeck ("OU").
The process parameters used to simulate focal parameter evolution. Under "BM", the order is root.state, rate; under "OU", the order is alpha, sigma.sq, and the mean.
Under selac we assume a global Ne for all genes. Thus, when the focal parameter to evolve is "Ne", then a user specified vector of simulated Ne values are provided here.
Simulates a nucleotide matrix using parameters under the SELAC model, but allows either Phi or Ne to evolve along the tree. Note that the output can be written to a fasta file using the write.dna() function in the ape
package.