grantham_distance_exact: Grantham's distance (exact)

Description Usage Arguments Details Value Source See Also Examples

View source: R/grantham_distance.R

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

1
2
3
4
5
6
7
8
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 α in the equation of Grantham's paper, in page 863.

beta

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

gamma

The constant γ 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 ρ) such that the mean value of all distances are 100. The rho parameter allows this factor ρ to be changed. By default ρ=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

doi: 10.1126/science.185.4154.862.

See Also

grantham_equation()

Examples

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

grantham documentation built on Jan. 7, 2022, 9:06 a.m.