grantham_distance_exact: Grantham's distance (exact)

View source: R/grantham_distance.R

grantham_distance_exactR Documentation

Grantham's distance (exact)

Description

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.

Usage

grantham_distance_exact(
  x,
  y,
  alpha = 1.833,
  beta = 0.1018,
  gamma = 0.000399,
  rho = 50.723
)

Arguments

x

A character vector of amino acid three-letter codes, e.g. "Ala" (Alanine).

y

A character vector of amino acid three-letter codes.

alpha

The constant \alpha in the equation of Grantham's paper, in page 863.

beta

The constant \beta in the equation of Grantham's paper, in page 863.

gamma

The constant \gamma in the equation of Grantham's paper, in page 863.

rho

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.

Details

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.

Value

A tibble of Grantham's distances for each amino acid pair.

Source

\Sexpr[results=rd]{tools:::Rd_expr_doi("10.1126/science.185.4154.862")}

.

See Also

grantham_equation()

Examples

grantham_distance_exact(c('Ser', 'Ser'), c('Pro', 'Trp'))


maialab/grantham documentation built on Aug. 1, 2024, 2:32 a.m.