This function calculates the Grantham's distance for pairs of amino acids. It uses the values for the amino acid properties as published in Table 1 of Science (1974). 185(4154): 862--4 by R. Grantham.
grantham_distance_exact(
x,
y,
alpha = 1.833,
beta = 0.1018,
gamma = 0.000399,
rho = 50.723
)
A tibble of Grantham's distances for each amino acid pair.
A character vector of amino acid three-letter codes, e.g. "Ala"
(Alanine).
A character vector of amino acid three-letter codes.
The constant \(\alpha\) in the equation of Grantham's paper, in page 863.
The constant \(\beta\) in the equation of Grantham's paper, in page 863.
The constant \(\gamma\) in the equation of Grantham's paper, in page 863.
Grantham's distances reported in Table 2, Science (1974).
185(4154): 862--4 by R. Grantham, are scaled by a factor (here named
\(\rho\)) such that the mean value of all distances are 100. The rho
parameter allows this factor \(\rho\) to be changed. By default
\(\rho=50.723\), the same value used by Grantham. This value is
originally mentioned in the caption of Table 2 of the aforementioned paper.
Contrary to Grantham's distances presented in Table 2 of Grantham's paper, the distances returned by this function are calculated anew starting from the amino acid properties (composition, polarity and molecular volume). No rounding to nearest integer is performed.
grantham_equation()
grantham_distance_exact(c("Ser", "Ser"), c("Pro", "Trp"))
Run the code above in your browser using DataLab