SlideShare a Scribd company logo
1 of 20
Needleman-Wunsch
Algorithm 1
11-Dec-2015
Presented By:
• Proshanta Kumar Shil
ID:141-15-3140
Section:B
Department of CSE
Daffodil International University
11-Dec-2015
2
What is Needleman-Wunsch algorithm?
The Needleman–Wunsch algorithm is an algorithm used
in bioinformatics to align protein or nucleotide sequences.
• It was one of the first applications of dynamic programming to compare
biological sequences.
• The algorithm was developed by Saul B. Needleman and Christian D.
Wunsch and published in 1970.
3
11-Dec-2015
Alignment methods
• Global and local sequence alignment methods
• Global : Needleman-Wunch
• Local : Smith-Waterman
• Database Search
• BLAST
• FASTA
4
11-Dec-2015
Goals of sequence databases
• To know about a newly sequenced database.
• To find the similarity of a unique sequence to another gene that
has a known function.
• To find the similarity of a new protein in a lower organism to a
protein from another species.
5
11-Dec-2015
Alignment Algorithms
• Global : Needleman-Wunch
• Local : Smith-Watermann
•  These two dynamic programming alignment algorithm are
guaranteed to give OPTIMAL alignments
•  But O(m*n) quadratic
6
11-Dec-2015
Needleman-Wunsch Method
• For example, the two hypothetical sequences
• abcdefghajklm
• abbdhijk
• could be aligned like this
• abcdefghajklm
• || | | ||
• abbd...hijk
• As shown, there are 6 matches,
• 2 mismatches, and one gap of length 3.
7
11-Dec-2015
Needleman-Wunsch Method
• The alignment is scored according to a payoff matrix
• $payoff = { match => $match,
• mismatch => $mismatch,
• gap_open => $gap_open,
• gap_extend => $gap_extend };
• For correct operation, match must be positive,
• and the other entries must be negative.
8
11-Dec-2015
Needleman-Wunsch Method
• Given the payoff matrix
• $payoff = { match => 4,
• mismatch => -3,
• gap_open => -2,
• gap_extend => -1 };
9
11-Dec-2015
Needleman-Wunsch Method
• The sequences
• abcdefghajklm
• abbdhijk
• are aligned and scored like this
• a b c d e f g h a j k l m
• | | | | | |
• a b b d . . . h i j k
• match 4 4 4 4 4 4
• mismatch -3 -3
• gap_open -2
• gap_extend -1-1-1
• for a total score of 24-6-2-3 = 13.
10
11-Dec-2015
Steps:
• 1. Initialization
• 2 Matrix fill or scoring
• 3. Traceback and alignment
11
11-Dec-2015
Lets see an example…
12
11-Dec-2015
Fill in the Table 13
11-Dec-2015
A G C
A
A
C
C
Two sequences will be aligned.
AGC (sequence #1)
AACC (sequence #2)
A simple scoring scheme will be used
Initialization step:
Create Matrix with M + 1
columns
and N + 1 rows.
For match=+1; Mismatch=-1;
Gap=-2
14
11-Dec-2015
A G C
0 -2 -4 -6
A -2
A -4
C -6
C -8
15
11-Dec-2015
Fill in the Table
A G C
0 -2 -4 -6
A -2 1
A -4
C -6
C -8
Matrix fill step: Each position Mi,j is defined to be the
MAXIMUM score at position i,j
Mi,j = MAXIMUM [
Mi-1, j-1 + si,,j (match or mismatch in the diagonal)
Mi, j-1 + w (gap in sequence #1)
Mi-1, j + w (gap in sequence #2)]
Continuing
the procedure 16
11-Dec-2015
A G C
0 -2 -4 -6
A -2 1 -1 -3
A -4 -1 0 -2
C -6 -3 -2 -1
C -8 -5 -4 -1
Traceback step:
Position at current cell
and look at direct
predecessors
17
11-Dec-2015
A G C
0 -2 -4 -6
A -2 1 -1 -3
A -4 -1 0 -2
C -6 -3 -2 -1
C -8 -5 -4 -1
Traceback step:
Position at current cell and
look at direct predecessors
18
11-Dec-2015
A G C
0 -2 -4 -6
A -2 1 -1 -3
A -4 -1 0 -2
C -6 -3 -2 -1
C -8 -5 -4 -1
AG-C
AAAC
-AGC
AAAC
A-GC
AAAC
Summary
• The algorithm essentially divides a large problem into a series of
smaller problems and uses the solutions to the smaller problems to
reconstruct a solution to the larger problem.
• It is also sometimes referred to as the optimal matching algorithm
and the global alignment technique.
• The Needleman–Wunsch algorithm is still widely used for optimal
global alignment, particularly when the quality of the global
alignment is of the utmost importance.
11-Dec-2015
19
Any Question?
Thanks to All
20

More Related Content

What's hot

What's hot (20)

Secondary Structure Prediction of proteins
Secondary Structure Prediction of proteins Secondary Structure Prediction of proteins
Secondary Structure Prediction of proteins
 
methods for protein structure prediction
methods for protein structure predictionmethods for protein structure prediction
methods for protein structure prediction
 
sequence alignment
sequence alignmentsequence alignment
sequence alignment
 
Multiple sequence alignment
Multiple sequence alignmentMultiple sequence alignment
Multiple sequence alignment
 
Dynamic programming and pairwise sequence alignment
Dynamic programming and pairwise sequence alignmentDynamic programming and pairwise sequence alignment
Dynamic programming and pairwise sequence alignment
 
Scop database
Scop databaseScop database
Scop database
 
Sequence alignment global vs. local
Sequence alignment  global vs. localSequence alignment  global vs. local
Sequence alignment global vs. local
 
Proteins databases
Proteins databasesProteins databases
Proteins databases
 
Fasta
FastaFasta
Fasta
 
Protein database
Protein databaseProtein database
Protein database
 
Phylogenetic analysis
Phylogenetic analysis Phylogenetic analysis
Phylogenetic analysis
 
Secondary protein structure prediction
Secondary protein structure predictionSecondary protein structure prediction
Secondary protein structure prediction
 
UPGMA
UPGMAUPGMA
UPGMA
 
Pairwise sequence alignment
Pairwise sequence alignmentPairwise sequence alignment
Pairwise sequence alignment
 
Clustal
ClustalClustal
Clustal
 
Protein structure visualization tools-RASMOL
Protein structure visualization tools-RASMOLProtein structure visualization tools-RASMOL
Protein structure visualization tools-RASMOL
 
dot plot analysis
dot plot analysisdot plot analysis
dot plot analysis
 
sequence of file formats in bioinformatics
sequence of file formats in bioinformaticssequence of file formats in bioinformatics
sequence of file formats in bioinformatics
 
Global and Local Sequence Alignment
Global and Local Sequence AlignmentGlobal and Local Sequence Alignment
Global and Local Sequence Alignment
 
Sequence alignment
Sequence alignmentSequence alignment
Sequence alignment
 

Recently uploaded

UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spaintimesproduction05
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 

Recently uploaded (20)

UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 

Needleman-Wunsch Algorithm

  • 2. Presented By: • Proshanta Kumar Shil ID:141-15-3140 Section:B Department of CSE Daffodil International University 11-Dec-2015 2
  • 3. What is Needleman-Wunsch algorithm? The Needleman–Wunsch algorithm is an algorithm used in bioinformatics to align protein or nucleotide sequences. • It was one of the first applications of dynamic programming to compare biological sequences. • The algorithm was developed by Saul B. Needleman and Christian D. Wunsch and published in 1970. 3 11-Dec-2015
  • 4. Alignment methods • Global and local sequence alignment methods • Global : Needleman-Wunch • Local : Smith-Waterman • Database Search • BLAST • FASTA 4 11-Dec-2015
  • 5. Goals of sequence databases • To know about a newly sequenced database. • To find the similarity of a unique sequence to another gene that has a known function. • To find the similarity of a new protein in a lower organism to a protein from another species. 5 11-Dec-2015
  • 6. Alignment Algorithms • Global : Needleman-Wunch • Local : Smith-Watermann •  These two dynamic programming alignment algorithm are guaranteed to give OPTIMAL alignments •  But O(m*n) quadratic 6 11-Dec-2015
  • 7. Needleman-Wunsch Method • For example, the two hypothetical sequences • abcdefghajklm • abbdhijk • could be aligned like this • abcdefghajklm • || | | || • abbd...hijk • As shown, there are 6 matches, • 2 mismatches, and one gap of length 3. 7 11-Dec-2015
  • 8. Needleman-Wunsch Method • The alignment is scored according to a payoff matrix • $payoff = { match => $match, • mismatch => $mismatch, • gap_open => $gap_open, • gap_extend => $gap_extend }; • For correct operation, match must be positive, • and the other entries must be negative. 8 11-Dec-2015
  • 9. Needleman-Wunsch Method • Given the payoff matrix • $payoff = { match => 4, • mismatch => -3, • gap_open => -2, • gap_extend => -1 }; 9 11-Dec-2015
  • 10. Needleman-Wunsch Method • The sequences • abcdefghajklm • abbdhijk • are aligned and scored like this • a b c d e f g h a j k l m • | | | | | | • a b b d . . . h i j k • match 4 4 4 4 4 4 • mismatch -3 -3 • gap_open -2 • gap_extend -1-1-1 • for a total score of 24-6-2-3 = 13. 10 11-Dec-2015
  • 11. Steps: • 1. Initialization • 2 Matrix fill or scoring • 3. Traceback and alignment 11 11-Dec-2015
  • 12. Lets see an example… 12 11-Dec-2015
  • 13. Fill in the Table 13 11-Dec-2015 A G C A A C C Two sequences will be aligned. AGC (sequence #1) AACC (sequence #2) A simple scoring scheme will be used
  • 14. Initialization step: Create Matrix with M + 1 columns and N + 1 rows. For match=+1; Mismatch=-1; Gap=-2 14 11-Dec-2015 A G C 0 -2 -4 -6 A -2 A -4 C -6 C -8
  • 15. 15 11-Dec-2015 Fill in the Table A G C 0 -2 -4 -6 A -2 1 A -4 C -6 C -8 Matrix fill step: Each position Mi,j is defined to be the MAXIMUM score at position i,j Mi,j = MAXIMUM [ Mi-1, j-1 + si,,j (match or mismatch in the diagonal) Mi, j-1 + w (gap in sequence #1) Mi-1, j + w (gap in sequence #2)]
  • 16. Continuing the procedure 16 11-Dec-2015 A G C 0 -2 -4 -6 A -2 1 -1 -3 A -4 -1 0 -2 C -6 -3 -2 -1 C -8 -5 -4 -1
  • 17. Traceback step: Position at current cell and look at direct predecessors 17 11-Dec-2015 A G C 0 -2 -4 -6 A -2 1 -1 -3 A -4 -1 0 -2 C -6 -3 -2 -1 C -8 -5 -4 -1
  • 18. Traceback step: Position at current cell and look at direct predecessors 18 11-Dec-2015 A G C 0 -2 -4 -6 A -2 1 -1 -3 A -4 -1 0 -2 C -6 -3 -2 -1 C -8 -5 -4 -1 AG-C AAAC -AGC AAAC A-GC AAAC
  • 19. Summary • The algorithm essentially divides a large problem into a series of smaller problems and uses the solutions to the smaller problems to reconstruct a solution to the larger problem. • It is also sometimes referred to as the optimal matching algorithm and the global alignment technique. • The Needleman–Wunsch algorithm is still widely used for optimal global alignment, particularly when the quality of the global alignment is of the utmost importance. 11-Dec-2015 19