Learn R Programming

TKF (version 0.0.8)

PAMn: PAM and Dayhoff matrices calculation

Description

These functions calculate the mutation matrix or Dayhoff matrix from the mutation matrix at PAM 1 and base backrgound frequency.

Usage

PAMn(PAM1, n) Dayhoffn(PAM1, BF, n)

Arguments

PAM1
A matrix of numeric: the mutation probability from one AA to another AA at PAM distance 1. The order of AA in the matrix should be identical to AACharacterSet.
n
A numeric: the PAM distance.
BF
A numeric vector: the backrgound frequency of AAs. The order of AA in the vector should also be identical to AACharacterSet.

Value

A numeric matrix is returned.

Details

Calculate the n-PAM matrices from PAM1 mutation matrix and n. To compute n-PAM matrices, we multiply the PAM1 matrix through itself N times, which is most efficiently achieved through n additions in log space. Computing Dayhoff matrices from PAM mutation matrices and AA frequency. Dayhoff matrices are the ratios P("alignment i and j arose through evolution") / P("alignment i and j arose by chance")

References

Dayhoff, M.O., and Schwartz, R.M. (1978). A model of evolutionary change in proteins. In In Atlas of Protein Sequence and Structure,.

Gonnet, G.H., and Scholl, R. (2009). Scientific Computation (Cambridge, UK; New York: Cambridge University Press).

Examples

Run this code
  data(GONNET)
  data(GONNETBF)
  ## PAM 250 mutation matrix
  PAM250 <- PAMn(GONNET, 250)
  
  ## Dayhoff 250 matrix
  Dayhoff250 <- Dayhoffn(GONNET, GONNETBF, 250)
  

Run the code above in your browser using DataLab