Skip to main content

User account menu

  • Contact
  • Log in
Home

Main navigation

  • Home
  • File
    • File concatenation
    • File separation
    • Sequence Format Converter
    • Tree Format Converter
  • Alignment
    • Alignment trimming
    • Multiple Sequence Alignment
  • Phylogeny
    • Distance Methods
    • Maximum Likelihood
    • Maximum Parsimony
    • Species Tree Inference
      • MP-EST
      • NJst
      • STAR
    • Tree Summary
      • Consensus Trees
      • Root/reroot
      • Tree Distance
      • Unroot
    • Model Selection/Validation
      • Concatenation model validation
      • Molecular Clock
      • Substitution model selection
      • Substitution model validation
  • Simulation
    • Simulate DNA Sequences
    • Simulate Gene Trees
  • Training
    • Alignment
      • Pairwise Alignment
      • Multiple Sequence Alignment
    • Phylogeny
      • Substitution Models
      • Phylogenetic tree reconstruction
      • Tree Distance
  • Help
  • Service

Smith–Waterman algorithm

Breadcrumb

  • Home
  • Alignment
  • Pairewise Alignment
  • Smith–Waterman algorithm
By lliu | Fri, 04/23/2021 - 15:43

Smith–Waterman is a dynamic programming algorithm for local alignment. The main difference to the Needleman–Wunsch algorithm is that negative scores are set to zero in the SW algorithm.

$$M_{i,j} = \max\left\{0, M_{i−1,j−1}+S(a_i,b_j), M_{i−1,j}+d, M_{i,j−1}+d\right\}$$

Algorithm

  • Two sequences are arranged in a matrix form
  • Calculating $M_{i,j}$ for each cell
  • Tracing back from the lower-right corner to the upper-left corner

 R code

Book traversal links for Smith–Waterman algorithm

  • ❮ Needleman–Wunsch algorithm
  • Up
  • Multiple Sequence Alignment ❯
Rating (5 = Best)

Copyright 2021 - All Rights Reserved