473,396 Members | 2,034 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Looping inside Needleman-Wunsch algorithm & good values for theSimilairity Matrix

Hi everyone,
Concerning the Needleman-Wunsch algorithm (cf.
http://en.wikipedia.org/wiki/Needleman-Wunsch_algorithm) I have
noticed a possible loop.

Inside the algorithm there is an important decision making mechanism.
Its a "if, else if, else if" structure like:

if(ScoreValue == DiagonalValue + SimilarityValue(i, j)
{
blah;
}
else if(Score == Left + d)
{
blah;
}
else if(Score == Up + d)
{
blah;
}
I've been playing with value of the similarity matrix and for certain
values I can get the algorithms to stick as there is no else clause to
offer an out if none of the above conditions are met. Now I know that
I could introuduce an else statement and avoid the loop but it does
not address the fundamental probalm of constructing a useful
Similarity matrix.

It's on this point issue that I want to ask for help. The similaity
Matrix that I built for my task is ultimately causing this problem. So
i need to make it better. My question is: what properties should a
good Similarity matrix have to avoid this loop? How does one go about
constructing an effective Similarity matrix? What properties should it
have? I'm not referring to the simple structure that score 1 for a
match and 0 for a mismatch. i'm referring to more complex
structures...
Any hints/advice/user-experiences/websites/papers much appreciated.

Thanking you,
Al.
Oct 9 '08 #1
1 3088
On Thu, 09 Oct 2008 03:33:17 -0700, al*****@altavista.com
<al*****@altavista.comwrote:
[...]
if(ScoreValue == DiagonalValue + SimilarityValue(i, j)
{
blah;
}
else if(Score == Left + d)
{
blah;
}
else if(Score == Up + d)
{
blah;
}
I've been playing with value of the similarity matrix and for certain
values I can get the algorithms to stick as there is no else clause to
offer an out if none of the above conditions are met. Now I know that
I could introuduce an else statement and avoid the loop but it does
not address the fundamental probalm of constructing a useful
Similarity matrix.
My recollection from the last time you asked about this algorithm is that
of those three conditions, at least one _must_ be true. This is because
of the way the result matrix is calculated in the first place. Each
element in the matrix is always one of those three, and so when you
compare it again later, one of those three conditions must hold.

Are you saying that you're using a similarity matrix that somehow violates
that assumption in the algorithm? Can you explain in more detail how that
happens?
It's on this point issue that I want to ask for help. The similaity
Matrix that I built for my task is ultimately causing this problem. So
i need to make it better. My question is: what properties should a
good Similarity matrix have to avoid this loop? How does one go about
constructing an effective Similarity matrix? What properties should it
have?
I would be surprised if there is much, if any, practical experience with
this algorithm here in this newsgroup. If you have questions that are
specific to its implementation in C#, then this is a great newsgroup to
ask questions. But for this kind of question -- how to create a
similarity matrix for use in this particular algorithm -- I think you need
to find people who actually have first-hand experience with the algorithm.

For what it's worth, as near as I can tell from my admittedly cursory look
at the algorithm over the course of these threads is that the only real
requirement of the matrix is that it should be symmetric, with positive
values for matches and negative values for non-matches. (It appears that
0 is also valid, though whether that's valid for matches I am not sure).

As long as the matrix meets those conditions (and possibly even broader
conditions...I'm not sure even symmetry is required, though you may get
weird output if it isn't), I think the algorithm should work as stated.

I could be mistaken, of course. That's why it'd be better for you to
track down someone who's actually used this algorithm before. The rest of
us may not have the time to do a sufficient review of the algorithm to be
able to answer the question intelligently. :)

Pete
Oct 9 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: ensnare | last post by:
Hi all, I'm using a database session handler and am looking to loop through data residing in the sessions table to make a 'Users online' array. I've found that using urldecode on the data...
4
by: ={ Advocated }= | last post by:
Hi there, im in need to use a loop, im not sure exactly how to do it :S ######################## /* * File: Payroll.c * Program to calculate the wage of a user */ #include <stdio.h> int...
4
by: Nick | last post by:
Hi - I'm trying to loop through the textboxes on a page to unlock them for editing. The Enabled property is set to false, and the following code is on an 'Edit' button on the form. Can anyone tell...
2
by: Bart Van Hemelen | last post by:
The situation: I have a CheckBoxList cblTest, the items are disabled in cblTest_DataBound in a foreach (ListItem oItem in cblTest.Items) loop. I provide a link that calls a client-side JavaScript...
1
by: delraydog | last post by:
I have an associative array that I need to loop through, allbills, however, each element in this array requires processing by the user and I need to capture the users actions on the element and...
6
by: Luke - eat.lemons | last post by:
Hi, Im pretty new to asp so all light on this question would be great. Basically i need to test to see what value is set (where to retrieve the data from) so ive done it like this: If...
4
by: seninfothil | last post by:
hai i wrote a program for sudoku puzzle .... for that i need to go for recursion function . inside the function i have go for looping.... where i have call the rec..function again.. ...
20
by: Ifoel | last post by:
Hi all, Sorry im beginer in vb. I want making programm looping character or number. Just say i have numbers from 100 to 10000. just sample: Private Sub Timer1_Timer() if check1.value= 1...
0
by: chitta | last post by:
Hi I have a problem when i am looping on multiple lines. the question as follows If OrderProductLineItem (DocType='OrderCreate'/'OrderChange') < OrderProductLineItem...
4
by: adiel_g | last post by:
I am trying to loop through a repeater to retrieve a dataitem field but am getting a NullReferenceException. I can find a checkbox control but cannot find a dataitem field. Here is the code that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.