473,548 Members | 2,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3104
On Thu, 09 Oct 2008 03:33:17 -0700, al*****@altavis ta.com
<al*****@altavi sta.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
3983
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 column gives me a serialized string of varname|datatype:data; for each variable. I'm having a bit of trouble with deserializing the data. I could...
4
2039
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 main(int argc, char* argv)
4
1297
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 me why it doesn't work? Thanks Nick. Code:
2
6242
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 that enables the items -- this works perfectly. However, when I then click a LinkButton that does a postback and I loop through the items on...
1
1425
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 then return to the next element in the list but suspend looping until I have the users desired action... For example, for(mybill in allbills) {
6
1807
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 Request.Querystring("id") = "" then TidF=Request.Form("TidF") Else
4
1933
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.. but it not works... is it possible ...if so how....
20
2802
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 then
0
1301
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 (DocType='OrderResponse') Loop on OrderProductLineItem (DocType='OrderResponse') PurchaseOrderLineItemNumber If ...
4
5755
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 is looping through the repeater: Dim rc As RepeaterItemCollection = rptReport.Items Dim ri As RepeaterItem Dim chkSelected As...
0
7518
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7444
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7711
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7954
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7467
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7805
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6039
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3497
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3478
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.