autoCorrelation: Compute the auto-correlation index of a protein sequence

View source: R/autocorrelation.R

autoCorrelationR Documentation

Compute the auto-correlation index of a protein sequence

Description

This function computes the Cruciani et al (2004) auto-correlation index. The autoCorrelation index is calculated for a lag 'd' using a descriptor 'f' (centred) over a sequence of length 'L'.

Usage

autoCorrelation(sequence, lag, property, center = TRUE)

Arguments

sequence

An amino-acids sequence

lag

A value for a lag, the max value is equal to the length of shortest peptide minus one.

property

A property to use as value to be correlated.

center

A logical value TRUE or FALSE if the property must be centered.

Value

The computed auto-correlation index for a given amino-acids sequence

References

Cruciani, G., Baroni, M., Carosati, E., Clementi, M., Valigi, R., and Clementi, S. (2004) Peptide studies by means of principal properties of amino acids derived from MIF descriptors. J. Chemom. 18, 146-155.

Examples

# Loading a property to evaluate its autocorrelation
data(AAdata)

# Calculate the auto-correlation index for a lag=1
autoCorrelation(
  sequence = "SDKEVDEVDAALSDLEITLE",
  lag = 1,
  property = AAdata$Hydrophobicity$KyteDoolittle,
  center = TRUE
)
# [1] -0.3519908

# Calculate the auto-correlation index for a lag=5
autoCorrelation(
  sequence = "SDKEVDEVDAALSDLEITLE",
  lag = 5,
  property = AAdata$Hydrophobicity$KyteDoolittle,
  center = TRUE
)
# [1] 0.001133553

Peptides documentation built on May 29, 2024, 11:02 a.m.