Learn R Programming

Peptides (version 2.4.6)

crossCovariance: Compute the cross-covariance index of a protein sequence

Description

This function computes the Cruciani et al (2004) cross-covariance index. The lagged crossCovariance index is calculated for a lag 'd' using two descriptors 'f1' and 'f2' (centred) over a sequence of length 'L'.

Usage

crossCovariance(sequence, lag, property1, property2, center = TRUE)

Value

The computed cross-covariance index for a given amino-acids sequence

Arguments

sequence

An amino-acids sequence

lag

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

property1

A property to use as value to evaluate the cross-covariance.

property2

A property to use as value to evaluate the cross-covariance.

center

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

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

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

# Calculate the cross-covariance index for a lag=1
crossCovariance(
  sequence = "SDKEVDEVDAALSDLEITLE",
  lag = 1,
  property1 = AAdata$Hydrophobicity$KyteDoolittle,
  property2 = AAdata$Hydrophobicity$Eisenberg,
  center = TRUE
)
# [1] -0.3026609

# Calculate the cross-correlation index for a lag=5
crossCovariance(
  sequence = "SDKEVDEVDAALSDLEITLE",
  lag = 5,
  property1 = AAdata$Hydrophobicity$KyteDoolittle,
  property2 = AAdata$Hydrophobicity$Eisenberg,
  center = TRUE
)
# [1] 0.02598035

Run the code above in your browser using DataLab