SA_globalAlignment
Usage:
Score = SA_globalAlignment(String1, String2, GapPenalty)
String1: [M x k] Matrix; The first string.
String2: [N x k] Matrix; The second string.
GapPenalty: Float; The gap penalty parameter.
Score: [T+1 x 1] Matrix; The score of the alignment and the alignment
itself.
Description
SA_globalAlignment computes the Needleman-Wunsch alignment score for the two strings String1 and String2
using GapPenalty for gaps. The input strings are expected to be of the form [L x k] where L can be
variable for each string and k must be the same, as it is the vector dimension.
The result Score is a [T+1 x 1] Vector with the first element beeing the score. The remaining T elements
are the alignment in form of numbers:
1 = Match
2 = Gap in String1
3 = Gap in String2
The score between two vectors of the string is computed by the correlation between those two.
NOTE: The parameter GapPenalty is expected to be a positive number as it will be substracted during
the algorithm.
|