View source: R/crosscovariance.R
crossCovariance | R Documentation |
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'.
crossCovariance(sequence, lag, property1, property2, center = TRUE)
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 |
The computed cross-covariance index for a given amino-acids sequence
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.
# 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.