This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Cross correlation analysis in R

Hi,

I have some data in form of vectors generated from DNA sequences. Each data vector represent stretch of DNA sequence. Visually data looks like signals and and they follow some patterns. Problem here is they are not aligned so i can not compare those signals with each other. I want to align them in such a way that I can get maximum correlation. I know there is a command in MATLAB which can easily find cross correlation between two signals. Does anyone know if similar thing can also be done in R ?

Thanks, Chirag.

r crosscorrelation signalprocessing

1 answer

You can align numerical sequences using dynamic time warping. Classical dynamic time warping and many variants are implemented in the R package dtw.

In R, cross-correlation is implemented in the ccf() function.

Log in to answer this question.