Rev Language Reference


fnK81

DNA evolution model proposed in Kimura (1981).

Aliases

  • fnKimura81

Usage

fnK81(RealPos kappa1, RealPos kappa2, Simplex baseFrequencies)

Arguments

kappa1 : RealPos (pass by const reference)
The transversion rate from purine to pyrimidine.
kappa2 : RealPos (pass by const reference)
The transversion rate from pyrimidine to purine.
baseFrequencies : Simplex (pass by const reference)
The stationary frequencies of the states.
Default : [ 0.250, 0.250, 0.250, 0.250 ]

Return Type

Details

In this model, transition and transversion rates are allowed to be different, and transversion rates for A <-> C, G <-> T and A <-> T, C <-> G transversions are different as well. The first argument, kappa1, defines the ratio between the rate of transitions and the rate of A <-> C, G <-> T transversions. The second argument, kappa2, defines the ratio between the rate of A <-> T, C <-> G transversions and the rate of A <-> C, G <-> T transversions. The third argument, baseFrequencies, defines the stationary frequencies of nucleotide bases. Note that the original Kimura (1981) model assumed equal base frequencies, so this function is more general (if ran without a baseFrequencies argument, however, this is equivalent to K81, since the default is all frequencies equal). The K81 rate matrix elements will be of the form: Q[i, j] = c, if i<->j is an A<->C/G<->T transversion = c * kappa1, if i<->j is a transition = c * kappa2, if i<->j is an A<->T/C<->G transversion where c is a constant needed to normalize the average rate to 1. If using the baseFrequencies parameter, those elements are multiplied by baseFrequencies[j].

Example

# the ratio between rates of transitions and A<->C/G<->T transversions
kappa1 ~ dnExp(0.5)

# the ratio between rates of A<->T/C<->G and A<->C/G<->T transversions
kappa2 ~ dnExp(0.5)

# create a K81 rate matrix
Q := fnK81(kappa1, kappa2)

# base frequencies
baseFrequencies ~ dnDirichlet(v(1,1,1,1))

# K81 rate matrix with non-equal base frequencies
Q := fnK81(kappa1, kappa2, baseFrequencies)

See Also