1 / 114

Chapter 2

Chapter 2. Pairwise Alignment. Pairwise Alignment. Ask if two sequences are related First align the sequences (or parts of them) and then decide whether that alignment is more likely to have occurred because the sequences are related, or just by chances. Sequence Alignment.

liseli
Download Presentation

Chapter 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 2 Pairwise Alignment

  2. Pairwise Alignment • Ask if two sequences are related • First align the sequences (or parts of them) and then decide whether that alignment is more likely to have occurred because the sequences are related, or just by chances

  3. Sequence Alignment • Definition: Procedure for comparing two or more sequences by searching for a series of individual characters or character patterns that are in the same order in the sequences • Pair-wise alignment: compare two sequences • Multiple sequence alignment: compare more than two sequences

  4. Example sequence alignment • Task: align “abcdef” with “abdgf” • Write second sequence below the first abcdef abdgf • Move sequences to give maximum match between them • Show characters that match using the identical letter

  5. Example sequence alignment abcdef ab abdgf • Insert gap between b and d on lower sequence to allow d and f to align

  6. Example sequence alignment abcdef ab d f ab-dgf

  7. Example sequence alignment abcdef ab d f ab-dgf • Note e and g don’t match

  8. Matching Similarity vs. Identity • Alignments can be based on finding only identical characters, or (more commonly) can be based on finding similar characters • More on how to define similarity later

  9. Global vs. Local Alignment • We distinguish • Global alignment algorithms which optimize overall alignment between two sequences • Local alignment algorithms which seek only relatively conserved pieces of sequence • Alignment stops at the ends of regions of strong similarity • Favors finding conserved patterns in otherwise different pairs of sequences

  10. Global vs. Local Alignment • Global LGPSSKQTGKGS-SRIWDN L k GKG R D LN-ITKSAGKGAIMRLGDA • Local --------GKG-------- GKG --------GKG--------

  11. Why do sequence alignments? • To find whether two (or more) genes or proteins are evolutionarily related to each other • To find structurally or functionally similar regions within proteins

  12. Key Issues • What sorts of alignment should be considered • The scoring system used to rank alignments • The algorithm used to find optimal (or good) scoring alignments • The statistical methods used to evaluate the significance of an alignment score

  13. Example • The following figure shows an example of three pairwise alignments, all to the same region of the human alpha globin protein sequence (SWISS-POTR database identifier HBA_HUMAN). • Identical positions with letters, and ‘similar’ positions with a plus (+) sign

  14. Example • In the first alignment, there are many “matches”; many others are functionally conservative (D-E towards the end) • The second alignment shows a biologically meaningful alignment (evolutionarily related, the same 3D structure, and same function in oxygen binding); many fewer identities • The third alignment has a similar number of identities or conservative changes; A spurious alignment to a protein that has a completely different structure and function

  15. Challenges • How to distinguish the second one from the third one? • The determination of the scoring system is crucial • It is difficult to distinguish true alignments from spurious alignments

  16. The Scoring Model • When comparing sequences, we look for evidence that they have diverged from a common ancestor by a process of mutation and selection • Basic mutational processes • Substitutions: change residues in a sequence • Insertions and deletions: add or remove residues • Insertions and deletions are referred to as “gaps” • The total score assigned to an alignment will be a sum of terms for each aligned pair of residues, plus terms for each gap

  17. The Scoring Model • We expect identities and conservative substitutions to be more likely in alignments than we expect by chance, and so to contribute positive score terms • Non-conservative changes are expected to be observed less frequently in real alignments than we expect by chance, and so these contribute negative score terms

  18. Assumption • We can consider mutations at different sites in a sequence to have occurred independently • This is reasonable for DNA and protein sequences • The interactions between residues also play a very critical role • Long range dependencies should be considered for structural RNAs

  19. Substitution Matrices • Consider a pair of sequences, x and y, of lengths n and m • Let xibe the ith symbol in x and yjbe the jth symbol in y • These symbols come from somealphabet A; in the case of DNA this will be the four bases {A, G, C, T}, and in the case of proteins the twenty amino acids • We will only consider ungapped global pairwise alignments, i.e., two completely aligned equal-length sequences

  20. Rationale • Given a pair of aligned sequences, we want to assign a score to the alignment that gives a measure of the relatively likelihood that the sequences are related as opposed to being unrelated • Assign a probability to the alignment in each of the two cases • We consider the ratio of the two probabilities

  21. Unrelated or Random Model • Let R be the unrelated model • The letter a occurs independently with some frequency qa, and hence the probability of the two sequences is just the product of the probabilities of each amino acid:

  22. Alternative Match Model • Let M be the alternative match model • Aligned pairs of residues occur with a joint probability pab • A probability for the whole alignment is

  23. The Odds Ratio The ratio of these two likelihoods is known as the odds ratio:

  24. The Log Odds Ratio We take the logarithm of the odds ratio: is the log likelihood ratio of the residue pair (a, b) occurring as an aligned pair, as opposed to an unaligned pair

  25. Substitution Matrices • The s(a,b) scores can be arranged in a matrix • For proteins, they form a 20X20 matrix (score matrix or substitution matrix) • Using BLOSUM50 matrix, the first alignment gets a score of 130 • PAM matrices • Any substitution matrix is making a statement about the probability of observing ab pairs in real alignment

  26. BLOSUM50

  27. BLOSUM62

  28. Gap Penalties The standard cost associated with a gap of length g is given by a linear score where d is called the gap-open penalty and e is called the gap-extension penalty.

  29. Gap Penalties • The gap-extension penalty e is usually set to something less than the gap-open penalty d, allowing long insertions and deletions to be penalized less than they would be by the linear gap cost • This is desirable when gaps of a few residues are expected almost as frequently as gaps of a single residue

  30. Gap Probability The probability of a gap occurring at a particular site in a given sequence is qa probabilities are the same as those used in the random model. When we divide by the probability of this region according to the random model to form the odds ratio, the qxi terms cancel out, so we are left only with a term dependent on length γ(g)=log(f(g)); i.e., gap penalties correspond to the log probability of a gap of that length.

  31. Alignment Algorithms • Given a scoring system, we need to have an algorithm for finding an optimal alignment for a pair of sequences • While both sequences have the same length n, there is only one possible global alignment of the complete sequences • When gaps are allowed, there are possible global alignments between two sequences of length n

  32. Example (1) ab (2) ab- (3) ab- (4) -ab cd -cd c-d cd- (5) ab-- (6) -ab- --cd c--d

  33. Dynamic Programming • Guarantee to find the optimal scoring alignment or set of alignments • Central to computational sequence analysis • Maximize the score to find the optimal alignment

  34. Example • We wish to align two short amino acid sequences: HEAGAWGHEE & PAWHEAE • We use the BLOSUM50 score matrix, and a gap cost per unaligned residue of d=-8

  35. Global Alignment: Needleman-Wunsch Algorithm • Construct a matrix F indexed by i, j, one index from each sequence • F(i, j) is the score of the best alignment between the initial segment x1…i of x up to xi and the initial segment y1…j of y up to yj • Begin F(0,0)=0, we then fill the matrix from top left to bottom right • If F(i-1, j-1), F(i-1, j), and F(i, j-1) are known, it is possible to calculate F(i, j)

  36. Three Ways of Alignments • xi is aligned to yj IGA xi LGVyj • xi is aligned to a gap AIG A xi GVyj - - • yj is aligned to a gap GA xi - - SLG Vyj

  37. Three Ways of Alignments • xi is aligned to yj, F(i, j)= F(i-1, j-1)+s(xi, yj) • xi is aligned to a gap, F(i, j)= F(i-1, j)-d • yj is aligned to a gap, F(i, j)= F(i, j-1)-d

  38. Three Ways of Alignments

  39. The Diagram F(i-1,j-1) F(i,j-1) s(xi,yj) -d F(i-1,j) F(i,j) -d

  40. The F Matrix • As we fill in the F(i, j), we also keep a pointer in each cell back to the cell from its F(i, j) was derived • Along the top row, where j=0, the values F(i, j-1) and F(i-1, j-1) are not defined, so the values F(i, 0) must be handled specially • The values F(i, 0) represent alignments of a prefix of x to all gaps in y, so we can define F(i, 0) =-id. Likewise, F(0, j)=-jd • F(n, m) is the best score for an alignment of x1…n to y1…m

  41. The Global Dynamic Programming Matrix

  42. Local Alignment: Smith-Waterman Algorithm • In previous section, we know which sequences we want to align, and we are looking for the best match between them from one end to the other • Most often, we are looking for the best alignment between subsequence of x and y • When it is suspected that two protein sequence may share a common domain, or when comparing extended sections of genomic DNA sequence

  43. Local Alignment • It is the most sensitive way to detect similarity when comparing two very highly diverged sequences, even if they may share evolutionary origin • In this case, only part of the sequence has been under strong enough selection to preserve detectable similarity; the rest will have accumulated so much noise through mutation that it is no longer alignable • The highest scoring alignment of subsequences of x and y is called the best local alignment

  44. The Algorithm • The algorithm is closely related to that for global alignments However, there are two differences. • In each cell in the table, F(i, j) is allowed to take 0 if all other options have values less than 0 • An alignment can end anywhere in the matrix

  45. The Algorithm

  46. The First Difference • Taking the option 0 corresponds to starting a new alignment • If the best alignment up to some point has a negative score, it is better to start a new one, rather then extend the old one • The top row and left column will be filled with 0s, not –id and –jd as for global alignment

  47. The Second Difference • We look for the highest value of F(i, j) over the whole matrix, and start the traceback from there • The traceback ends when we meet a cell with value 0, which corresponds to the start of the alignment

  48. Example

More Related