Questions tagged [needleman-wunsch]

The Needleman and Wunsch algorithm strives to compute the optimal global alignment of two RNA sequences.

12 questions
3
votes
2 answers

How does the Needleman Wunsch algorithm compare to brute force?

I'm wondering how you can quantify the results of the Needleman-Wunsch algorithm (typically used for aligning nucleotide/protein sequences). Consider some fixed scoring scheme and two sequences of varying length S1 and S2. Say we calculate every…
2
votes
1 answer

R - nested loop alternatives/optimization

I'm currently trying to implement an algorithm in R that requires to loop through the rows and columns of a matrix and that for every cell it computes a value based on the value of previously computed cells. Here is the code that does what I said…
Marco
  • 53
  • 8
2
votes
2 answers

LCS algorithm: How to find out from a Table, how many longest common subsequences are found?

I implement the Longest Common Subsequence problem in C#. I need to detect ALL the common maximal subsequences between two strings. To do this, I create a table using Needleman-Wunsch algorithm to store the LCS sequence for each step of the…
1
vote
0 answers

Optimization of a Needleman Wunsch algorithm

For some Time, I've written a Needleman Wunsch algorithm for listening to NCBI data streams, but as I've been done with it i knew it could be done better but i by far to stupid to do so. If some of you know what I've done stupid overcomplicated, I…
1
vote
0 answers

Can a weght be applied to each element is a pattern matching algorithm?

Is there a way to write an algorithm for the following example without terrible runtime ? This algorithm should be able to match two strings however each value in the string has a weight. (0-1: 0 meaning non essential, 1 meaning essential) If the…
SwimMaster
  • 351
  • 3
  • 17
0
votes
0 answers

Plotting NeedlemanWunsch - Alignment in Python: How to create GridArrows + heatmap plots?

I am searching for a way to plot the Global Alignment in Python, such that it looks like in the appended image.Global ALignment Despite going through many documentaries of matplotlib and seaborn, I wasn't able to find a satisfying solution. I tried…
0
votes
1 answer

Sequence alignment given two strings

I have two sequences and I need to perform sequence alignment to determine all possible sequence alignments. I have created the matrix and managed to find 16 alignments. I wanted to understand if I had correctly approached this because I need to…
0
votes
0 answers

Parallelizing Needleman-Wunsch Algorithm usinh OpenMP

As we know Global Sequence alignment problem can be solved using Needleman-Wunsch algorithm.To solve the problem it has three steps 1. Initializing the matrix 2. Matrix filling step 3. Trace back the residues for appropriate alignment. To make it…
0
votes
1 answer

Needleman algorithm not working when matrix values are the same

I am trying to solve the "Longest Common Subsequence" question using needleman. Example: Input: text1 = "abcde", text2 = "ace" Output: 3 Explanation: The longest common subsequence is "ace" and its length is 3. I am very confused on how the…
Javator
  • 3
  • 1
0
votes
0 answers

Implementing global sequence alignment

i am going to create a needleman-wunsch global sequence alignment. But my answer is wrong. Please help me check my code. Sometimes when two sequence match, but it will still runs the mismatch function. Ignore my poor english , thanks. #include…
derk
  • 43
  • 3
0
votes
1 answer

Needleman Wunsch with affine gap penalty

Can someone provide an example where an affine gap penalty would eventually give a different result than running NW on two sequences with a fixed gap penalty ?
Mbaps
  • 143
  • 1
  • 1
  • 11
-1
votes
2 answers

Is Levenshtein distance algorithm performs better than Needleman Wunsch Algorithm?

I know that both Levenshtein and Needleman Wunsch has the time complexity of O(N*M) but I was curious to know which one performs better than the other and why?