Docsity

Pairwise Sequence Alignment - Introduction to Bioinformatics - Notes | CISC 636, Exams of Computer Science

Partial preview of the text

Download Pairwise Sequence Alignment - Introduction to Bioinformatics - Notes | CISC 636 and more Exams Computer Science in PDF only on Docsity!

CISC 636 Intro to Bioinformatics

(Spring 2008)

Pairwise sequence alignment

Needleman-Wunsch (global alignment)

Sequence Alignment

Motivation

  • Sequence assembly: reconstructing long DNA sequences from overlapping sequence fragments
  • Annotation: assign functions to newly discovered genes
    • Raw genomic (DNA) sequences  coding sequences (CDS), candidate for genes  protein sequence  function
    • Terminologies: cDNA, RNA, mRNA
    • Evolution: mutation  sequence diversity (versus homology)  (new) phenotype?
    • Basis for annotation: sequence similarity  sequence homology  same function - Caveat: homology can only be inferred, not affirmed, since we can not rewind to see how evolution actually happened.

Alignment algorithms

  • What is an alignment? A one-to-one matching of two sequences so that each character in a pair of sequences is associated with a single character of the other sequence orwith a null character (gap). Alignments are often displayed as two rows with an optional third row in between pointing out regions of similarity.
  • Example:
  • Types of alignment:
    • – pairwise vs multiple;global vs local
  • Algorithms – Rigorous
    • heuristic

Substitution Score matrix

  • Alignments are used to reveal homologous proteins/genes
  • Substitution scores are used to assess how good the alignments of a pair of residues are.
  • Under the assumption that each mutation (i.e., del etion, ins ertion, and sub stitution) is independent, the total score of an alignment is the sum of scores at each position.
  • Substitution score matrix is a 20 x 20 matrix that gives the score for every pair of amino acids.
  • The ways to derive a substitution score matrix.
    • Ad hoc
    • Physical/chemical properties of amino acids
    • Statistical

PAM (cont’d) caveat:

  • Sequences s1 and s2 are x PAM divergent does not imply s and s2 have x percent sequence difference ( should be equal or less). facts:
  1. even amino acid sequences that have diverged by 200 PAM units are expected to be identical in about 25% of their positions.
  2. sequences that are 250 PAM units diverged can generally be distinguished from a pair of random sequences.

PAM matrix is a 20 by 20 matrix, and each element pij represents the expected evolutionary exchange between the two corresponding amino acids for sequences that are a specific number of PAM units diverged. That is, pij = log[f(i,j)/f(i)f(j)] where f(i) and f(j) are the frequencies that amino acids Ai and Aj appear in the sequences, and f(i,j) the frequency that Ai and Aj are aligned. By construction, PAM n matrices with n > 1 are extrapolated from those with lower n. Namely, it assumes that the frequencies of the amino acids remain constant over time and that the mutational processes causing replacements in an interval of one PAM unit operate in the same way for longer periods.

BLOSUM matrices [Steven and Jorja Henikoff]

  • BLOSUM x matrix is a 20 by 20 matrix. Its elements are defined like those of PAM matrices but the frequencies are collected from sequences in BLOCKs database that are less than x percent identical (generally x is between 50 and 80).
  • By their construction, BLOSUM matrices are believed to be more effectively detect distant homology.
  • Taking the place of PAM 250, BLOSUM 62 is now the default matrix used in database search.

Needleman-Wunsch algorithm (Global Pairwise optimal alignment, 1970) To align two sequences x[1...n] and y[1...m], i) if x at i aligns with y at j , a score s(xi, yj) is added; if either xi or yj is a gap, a score of d is subtracted (penalty). ii) The best score up to (i,j) will be F(i,j) = max { F(i-1, j-1) + s(xi, yj), F(i-1,j)  d, // gap in y F(i, j-1)  d // gap in x }

Needleman-Wunsch (cont’d) iii) Tabular computing to get F(i,j) for all 1<i<n and i<j<m Draw a diagram: F(i-1, j-1) F(i, j-1)

s(xi,yj) -d

F(i-1, j) F(i,j)

By definition, F(n,m) gives the best score for an alignment of x[1...n] and y[1...m].

-d

Example: Align HEAGAWGHEE and PAWHEAE. Use BLOSUM 50 for substitution matrix and d=-8 for gap penalty.

H E A G A W G H E E P -8^0 -8 -2^ -16 -9^ -24 -17^ -32 -25^ -40-33^ -48-42^ -56-49^ -64-57^ -72-65^ -80- W^ A^ -16-24^ -10-18^ -11-3^ -4-6^ -12-7 -20 -15^ -28 -5^ -36 -13^ -44-21^ -52-29^ -60- H E -32-40 -14-22 -18-8 -13-16 (^) -16-8 -9-9 -13-12 (^) -15-7 -3 -7 (^) -11 3 -19- A -48 -30 -16 -3 -11 -11 -12 -12 -15 -5 2 E -56 -38 -24 -11 -6 -12 -14 -15 -12 -9 1

HEAGAWGHE-E --P-AW-HEAE

Time complexity: O(nm) Space complexity: O(nm)

Big-O notation: f(x) = O(g(x)) => f is upper bound by g f(x) = (g(x)) => f is lower bound by g f(x) = (g(x)) => f is bound to g within constant factors