GY94: The GY94 class

Description Usage Arguments Fields and Methods Author(s) References See Also Examples

Description

This class implements the codon substitution model of Goldman and Yang (1994). The transition/transversion rate ratio is stored in the kappa virtual field. The nonsynonymous/synonymous substitution rate ratio (omega) is a site-process specific parameter with a default value of one. Hence, after the attachment of the process the variation of omega ratios among sites follows the M0 model (see Yang et al. 2000).

The rate matrix of the GY94 model is scaled in a way that the expected number of potential substiutions per site is equal to one at equlibrium. The codeml program from the PAML package scales the rate matrix in order to have the expected number of accepted substiutions per site equal to one. Use the getOmegaScalingFactor.GY94 method to claculate a branch length scaling factor which allows to switch to a PAML-style scaling given an average omega.

If the scale.nuc constructor argument is TRUE, the rates of the returned Event objects will be multiplied by 3 to obtain a process which has the expected number of nucleotide substitutions (not codon substitutions) equal to one at equilibrium. This is useful when simulating mixed sequences. This option doesn't affect the rate matrix in any way.

The M1-M4 models are implemented in the omegaVarM[1-4].CodonSeqeunce methods. Simulations under more complex models (M5-M13) can be achieved by first discretizing them using the M5-13 tool from the INDELible software package (http://abacus.gene.ucl.ac.uk/software/indelible/). After discretization, the M5-M13 models can be simulated through the M3 (discrete) model.

Package:
Class GY94

Object
~~|
~~+--PSRoot
~~~~~~~|
~~~~~~~+--Process
~~~~~~~~~~~~|
~~~~~~~~~~~~+--GeneralSubstitution
~~~~~~~~~~~~~~~~~|
~~~~~~~~~~~~~~~~~+--CodonUNREST
~~~~~~~~~~~~~~~~~~~~~~|
~~~~~~~~~~~~~~~~~~~~~~+--GY94

Directly known subclasses:

public static class GY94
extends CodonUNREST

Usage

1
2
GY94(name="Anonymous", table.id=1, kappa=1, omega.default=1, codon.freqs=NA,
  scale.nuc=FALSE, ...)

Arguments

name

Name of the object.

table.id

The identifier of the genetic code table to use (1 by default).

kappa

The transition/transversion rate ratio (1 by default).

omega.default

The default value of the omega site-process specific parameter (1 by default).

codon.freqs

A vector of codon frequencies.

scale.nuc

Scale to nucleotide substitutions if TRUE (see above).

...

Additional arguments.

Fields and Methods

Methods:

checkConsistency -
getCodonFreqs -
getEventsAtSite -
getKappa -
getOmegaScalingFactor -
is -
setCodonFreqs -
setKappa -
setRate -
summary -

Methods inherited from CodonUNREST:
checkConsistency, is

Methods inherited from GeneralSubstitution:
as.character, checkConsistency, clone, getAlphabet, getEquDist, getEventRate, getEventRateAtSite, getEventsAtSite, getQMatrix, getRate, getRateList, hasUndefinedRate, is, plot, rescaleQMatrix, sampleState, setAlphabet, setEquDist, setQMatrix, setRate, setRateList, summary

Methods inherited from Process:
!=, ==, as.character, checkConsistency, clone, getAlphabet, getEventsAtSite, getId, getName, getParameterAtSite, getSiteSpecificParamIds, getSiteSpecificParamList, getWriteProtected, hasSiteSpecificParameter, hasUndefinedRate, is, setAlphabet, setId, setName, setParameterAtSite, setSiteSpecificParamIds, setSiteSpecificParamList, setWriteProtected, summary

Methods inherited from PSRoot:
checkConsistency, enableVirtual, getComments, getMethodsList, globalConsistencyCheck, intersect.list, is, is.na, ll, my.all.equal, plot, setComments, setMethodsList, summary, virtualAssignmentForbidden

Methods inherited from Object:
$, $<-, [[, [[<-, as.character, attach, attachLocally, clearCache, clearLookupCache, clone, detach, equals, extend, finalize, getEnvironment, getFieldModifier, getFieldModifiers, getFields, getInstantiationTime, getStaticInstance, hasField, hashCode, ll, load, names, objectSize, print, save

Author(s)

Botond Sipos, Gregory Jordan

References

Goldman, N., Yang, Z. (1994) A codon-based model of nucleotide substitution for protein-coding DNA sequences - Mol Biol Evol 11(5):725-36 http://bit.ly/aSVEoa

Yang, Z., Nielsen, R., Goldman, N., Pedersen Krabbe, A-M. (2000) Codon-Substitution Models for Heterogeneous Selection Pressure at Amino Acid Sites - Genetics 155:431-449 http://bit.ly/bvjucn

See Also

CodonUNREST GeneralSubstitution CodonSequence GTR WAG

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
	# create a GY94 object
	p<-GY94(kappa=2)
	# check if inherits from GY94
	is.GY94(p)
	# get object summary
	summary(p)
	# display a bubble plot
	plot(p)
	# create a codon sequence, attach process
	s<-CodonSequence(length=5, processes=list(list(p)))
	# sample states
	sampleStates(s)
	# make first three positions invariable
	setRateMultipliers(s,p,0,1:3)
	# sample omega values from the M3 (discrete) model.
	omegaVarM3(s,p,omegas=c(0,1,2,3),probs=c(2/5,1/5,1/5,1/5))
	# get a histogram of omega values in s
	omegaHist(s,p,breaks=50)
       sim<-PhyloSim(root.seq=s,phylo=rcoal(2))
       # run simulation
       Simulate(sim)
	# get the list of recorded per-branch event counts
	getBranchEvents(sim)
	# export the number of synonymous substitutions as a phylo object
	syn.subst<-exportStatTree(sim,"nr.syn.subst")
	syn.subst
	# plot the exported phylo object
	plot(syn.subst)
	# print alignment
	sim$alignment
 

phylosim documentation built on Nov. 22, 2019, 1:07 a.m.