|
Arthur:
NWALIGN and SWALIGN by default use the scale stored in the Blosum matrices (help blosum50). You can pass directly only the scoring matrix to the functions and there will not be any scale:
SM = BLOSUM50; %this a numeric matrix, not a string !
[Score, Alignment] = nwalign(A,B, 'Alphabet', 'AA', 'ScoringMatrix',SM,'GapOpen', 8, 'ExtendGap', 8,'Showscore', true);
Hope this helps
Lucio
"Arthur Zheng" <hzheng7@gatech.edu> wrote in message <gcqutm$2ss$1@fred.mathworks.com>...
> I am using the "nwalign" function of matlab R2007a to do global alignment. I use the example on P21 from the book "Biological sequence analysis bu R. Durbin".
> Below is my code:
> ****************************************************
> A = 'HEAGAWGHEE';
> B = 'PAWHEAE';
> ScoringMatrixValue = 'BLOSUM50';
>
> [Score, Alignment] = nwalign(A, B, 'Alphabet', 'AA', 'ScoringMatrix', ScoringMatrixValue,'GapOpen', 8, 'ExtendGap', 8,'Showscore', true);
> ****************************************************
> The result is:
> Score = 0.3333
>
> Alignment =
> HEAGAWGHE-E
> || || |
> --P-AW-HEAE
>
> While the Alignment is right (the same as in the book), but why the Score is 0.3333? You can easily calculate the alignment score,which should be 1 as shown in the book.
>
> Is there something wrong with the function "nwalign"??
|