Needleman-Wunsch_pairwise_sequence_alignment.png
Summary
Sequences Best Alignments --------- ---------------------- GCATGCG GCATG-CG GCA-TGCG GCAT-GCG GATTACA G-ATTACA G-ATTACA G-ATTACA
The Needleman-Wunsch algorithm is a dynamic programming algorithm that finds the best possible alignments between two strings.
It takes three score parameters: match, mismatch, and gap.
Since it is a dynamic programming algorithm, the problem is solved by filling a two dimensional matrix. It requires O(nm) space and time where n and m are the lengths of the first and second string, respectively.
All best possible alignments are found by filling the matrix according to the defined score parameters.
Some optimizations of the algorithm avoid filling values distant from the diagonal, since those values are only needed for the poorest alignments.
Source code: https://gist.github.com/slowkow/508393Description Needleman-Wunsch pairwise sequence alignment.png |
English:
The score matrix for an alignment between GATTACA and GCATGCU.
|
Date | |
Source | Own work |
Author | Slowkow |
Licensing
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication . | |
The person who associated a work with this deed has dedicated the work to the
public domain
by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.en CC0 Creative Commons Zero, Public Domain Dedication false false |