command of alignment for general sequences

1 view (last 30 days)
huda nawaf
huda nawaf on 27 Nov 2011
hi, is there a command of sequence alignment for any sequence generally ? I did not mean swalign or nwalign, these just for biological sequences. if not are there anyone wrote a code of sequence alignment for non biological sequences in matlab?
huda nawaf
huda nawaf on 29 Nov 2011
thanks walter,
i did not see the last comment by Lucio.
really thanks

Sign in to comment.

Answers (1)

Hin Kwan Wong
Hin Kwan Wong on 28 Nov 2011
What sequence? If you mean any two numerical sequences which are correlated. Their alignment can be done by using cross correlation and finding where the peak is in terms of the delay, then shifting one of the sequence by the delay.
xcorr = ifft(fft(signalA).*conj(fft(signalB));
delay = find((xcorr==max(xcorr))==1);
AlignedA = circshift(signalA,1-delay);


Find more on Genomics and Next Generation Sequencing in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by