View source: R/autocovariance.R
autoCovariance | R Documentation |
This function computes the Cruciani et al (2004) auto-corvariance index. The autoCovariance
index is calculated for a lag 'd' using a descriptor 'f' (centred) over a sequence of length 'L'.
autoCovariance(sequence, lag, property, 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. |
property |
A property to use as value to evaluate the covariance. |
center |
A logical value |
The computed auto-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 auto-covariance index for a lag=1
autoCovariance(
sequence = "SDKEVDEVDAALSDLEITLE",
lag = 1,
property = AAdata$Hydrophobicity$KyteDoolittle,
center = TRUE
)
# [1] -0.4140053
# Calculate the auto-covariance index for a lag=5
autoCovariance(
sequence = "SDKEVDEVDAALSDLEITLE",
lag = 5,
property = AAdata$Hydrophobicity$KyteDoolittle,
center = TRUE
)
# [1] 0.001000336
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.