Thread Subject: doubt of "nwalign" function

Subject: doubt of "nwalign" function

From: Arthur Zheng

Date: 11 Oct, 2008 19:31:02

Message: 1 of 2

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"??

Subject: doubt of "nwalign" function

From: Lucio Andrade-Cetto

Date: 12 Oct, 2008 00:50:04

Message: 2 of 2

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"??

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
nwalign Arthur Zheng 11 Oct, 2008 15:35:06
sequence alignment Arthur Zheng 11 Oct, 2008 15:35:06
bioinformatics Arthur Zheng 11 Oct, 2008 15:35:06
global alignment Arthur Zheng 11 Oct, 2008 15:35:06
rssFeed for this Thread

Contact us at files@mathworks.com