First generation sequencing and pairwise alignment (High-tech, not high throughput) Analysis of Biological Sequences 140.638
where do sequences come from? DNA is not hard to extract (getting DNA from a strawberry is a classic elementary school project). The trick is to get a lot of DNA that has exactly the same sequence.
where do sequences come from? sequence-specific cleavage enzymes (restriction enzymes) and PCR (polymerase chain reaction) Molecular Cell Biology. 4th edition. 2000 Holland-Frei Cancer Medicine. 5th edition. 2000
dye-terminator sequencing (sequencing by synthesis) AATTCAGTGAATCATCGAATCTTTGAACGCACATTGCGCCCTTTGGTATTCCAAAGGGCATGCCTG AATTC* AATTCA* AATTCAG* AATTCAGT* AATTCAGTG* smaller products are read first
dye-terminator sequencing (sequencing by synthesis) when fluorophore intensities are low, the identity of the base is unclear!
so now we have our sequence! what is it? what does it do? Two approaches: analyze properties of the sequence look for similarities to well-described sequences
Goals of sequence alignment determine the function of an uncharacterized sequence look for matches to protein-coding or noncoding sequences look for conserved domains find the mutational distance between sequences (for species characterization, forensics etc)
Steps in sequence alignment Obtain sequences Align sequences Score alignment Is it significant, mathematically? Biologically?
Example alignment PLSQETFSDLWKLL---PENNVLSPLPSQAMD---------DLMLSPDDIEQWFTE PLSQETF+ LW L +N L+ + +Q +D DL + + IE PLSQETFNQLWTTLGDITDNGNLTQIVTQPLDFSFSETGVADLDIHENRIEMEVER human TP53 vs acorn worm genome is this a statistically significant similarity? is this biologically significant?
Dot matrix analysis The simplest, most visual, most intuitive way to create an alignment Reference: Gibbs AJ, McIntyre GA. The diagram, a method for comparing sequences. Its use with amino acid and nucleotide sequences. Eur J. Biochem 1970 16(1):1-11.
Dot matrix alignment PKD protein against itself
Dot matrix alignment PKD vs itself with better parameters
Dot matrix alignment Lots of variations can align DNA vs DNA, protein vs protein, many scoring schemes Sequence repeats and inverse repeats readily apparent Can be used to find self-complementary portions of sequences (e.g. RNA) to help predict secondary structure Still used today you will see it even in major papers
Elements of an alignment ACC--TAGCTAGCCGAT- ACCCCTAGG----CGAAA Matches Mismatches Gaps/indels
Creating alignments from scratch Example: ACCTAGCTAGCCGAT And ACCCCTAGGCGAAA Possible alignment: ACC--TAGCTAGCCGAT- ACCCCTAGG----CGAAA
Choosing the best alignment ACC--TAGCTAGCCGAT- ACCCCTAG---G-CGAAA ACCTAGCTAGCCGAT- ACCC--CTAG-CGAAA ACC--TAGCTAGCCGAT- ACCCC----TAGGCGAAA
Need Scoring Rules For example: score = (#matches) - (#mismatches) - (#gaps)x2 ACCCCTAG---G-CGAAA Score = 10-1 - 7x2 = -5 ACCC--CTAG-CGAAA Score = 10-2 - 4x2 = 0 ACC--TAGCTAGCCGAT- ACCTAGCTAGCCGAT- ACC--TAGCTAGCCGAT- ACCCC----TAGGCGAAA Score = 9-1 - 7x2 = -6
Need Scoring Rules For example: score = 3x(#matches) - 4x(#mismatches) - (#gaps) ACCCCTAG---G-CGAAA Score = 3x10-4x1-7 = 19 ACCC--CTAG-CGAAA Score = 3x10-4x2-4 = 18 ACC--TAGCTAGCCGAT- ACCTAGCTAGCCGAT- ACC--TAGCTAGCCGAT- ACCCC----TAGGCGAAA Score = 3x9-4x1-7 = 16
Global alignment: Needleman-Wunsch algorithm (Gotoh) Dynamic programming: achieve optimal alignment by constructing optimal alignments of smaller subsequences Assume that the optimal alignment is known up to a point, and then extend the alignment optimally to create a new optimal alignment
Global alignment: Needleman-Wunsch-Gotoh Algorithm: ACTTGAA CACA AGTTGTA CTCA ACTTGAAC AGTTGTAC ACTTGAA- AGTTGTAC ACA TCA ACTTGAAC AGTTGTA- CACA TCA ACA CTCA
Dynamic programming algorithm: example DNA alignment rules: match = 2, mismatch = -1, gap = -2 Global alignment: start at the beginning of the sequences and progress to the end Score of the alignment = score of the alignment up to the previous character + maximum score of aligning the next two symbols or adding a gap in either sequence.
Implementation: dynamic programming - A C C T G - 0-2 -4-6 -8-10 A -2 rules: match +2 mismatch -1 gap -2 C -4 T -6 T -8 G -10
Implementation: dynamic programming - A C C T G - 0-2 -4-6 -8-10 A -2 2 rules: match +2 mismatch -1 gap -2 C -4 T -6 T -8 G -10
Implementation: dynamic programming - A C C T G - 0-2 -4-6 -8-10 A -2 2 0 C -4 0 T -6 T -8 G -10 rules: match +2 mismatch -1 gap -2 Cross vertical line = put gap in sequence B Cross horizontal line = put gap in sequence A Cross at an intersection = align two residues
Implementation: dynamic programming - A C C T G - 0-2 -4-6 -8-10 A -2 2 0 rules: match +2 mismatch -1 gap -2 C -4 0 4 A C T -6 G -8 A 2 0 G -10 C 0 4-2 -2
Implementation: dynamic programming - A C C T G - 0-2 -4-6 -8-10 A -2 2 0-1 -1-1 rules: match +2 mismatch -1 gap -2 C -4 0 4 2 0-2 T -6-2 2 3 4 2 G -8-4 0 1 2 6 G -10-6 -2-1 0 4
Implementation: dynamic programming Backtracking step - A C C T G - 0-2 -4-6 -8-10 A -2 2 0-1 -1-1 C -4 0 4 2 0-2 T -6-2 2 3 4 2 G -8-4 0 1 2 6 G -10-6 -2-1 0 4 GTCCA GGTCA G-TCCA GGT-CA G-TCCA GGTC-A -GTCCA GGTC-A -GTCCA GGT-CA
Reference Needleman and Wunsch, A general method applicable to the search for similarities in the amino acid sequence of two proteins J. Mol. Biol. (1970) 48:443-453 (available through PubMed)
Local alignment A local alignment between two sequences is an alignment with maximum similarity between a substring of sequence a and a substring of sequence b Smith and Waterman, Identification of Common Molecular Subsequences, J. Mol Biol. (1981) 147:195-197 (available through PubMed)
Local alignment: Smith-Waterman Exactly the same algorithm as NWG except that if the score drops below zero, the alignment is terminated. This means that subsequences can be aligned optimally, without incurring penalties from surrounding irrelevant sequence that aligns badly Can end up with more than one optimal alignment, and the same piece of sequence can have more than one alignment to the other sequence
Local alignment: Smith-Waterman Algorithm: ACTTGAA CACA AGTTGTA CTCA ACTTGAAC AGTTGTAC ACA TCA ACTTGAAC AGTTGTA- ACA CTCA ACTTGAA AGTTGTA CACA CTCA ACTTGAA- AGTTGTAC CACA TCA
Implementation: dynamic programming for local alignment - A C C T G - 0 0 0 0 0 0 A 0 2 rules: match +2 mismatch -1 gap -2 C 0 A C T 0 G 0 A 2 0 4-2 X G 0 C 0-2 X
Implementation: dynamic programming for local alignment - A C C T G - 0 0 0 0 0 0 A 0 2 0 0 0 0 rules: match +2 mismatch -1 gap -2 C 0 0 4 2 0 0 T 0 0 2 3 4 2 G 0 0 0 1 2 6 G 0 0 0 0 0 4
Implementation: dynamic programming for local alignment - A C C T G - 0 0 0 0 0 0 A 0 2 0 0 0 0 C 0 0 4 2 0 0 T 0 0 2 3 4 2 G 0 0 0 1 2 6 G 0 0 0 0 0 4 rules: match +2 mismatch -1 gap -2 GTCCA GT-CA GTCCA GTC-A
Local vs global Scoring matrix or match/mismatch scores will determine whether a local alignment is obtained Needleman-Wunsch can return a local alignment depending on the weighting of end gaps and other scoring parameters Look at alignment: if there are long internal gaps, the alignment is local The best way to tell what s going on is to align random or unrelated sequences under the same conditions (next lecture)
Local vs global - A C T rules: match +2 - mismatch -1 gap -2 A C
Local vs global - A C T rules: match +2 - mismatch -1 gap -2 A C
Scoring rules/matrices Why are they important? Choice of scoring rule can dramatically influence the sequence alignments obtained and, therefore, the analysis being done Different scoring matrices have been developed for different situations; using the wrong one can make a big difference (choosing the wrong sequence as a potential functional ortholog, for example)
Scoring rules/matrices What do they mean? Your goal is to figure out whether the two sequences have a common ancestor Scoring matrices implicitly represent a particular theory of evolution Elements of the matrices reflect significance of co-occurence of each pair of amino acid residues or nucleotides
Substitution Matrices We need scoring terms for each aligned residue pair Models: Random model (R): letter a occurs with frequency q a
Substitution Matrices random model x = ACCTGCC y = ACGTCCA ACCTGCC ACGTCCA p(a)= 0.2 p(t)= 0.2 p(c)= 0.3 p(g)= 0.3
Substitution Matrices match model Models: Match model (M): aligned pairs of residues have joint probability p ab p ab =probability that a and b came from common ancestor residue
Substitution Matrices Odds ratio: = =
Substitution Matrices Change to a sum by using logarithms... Score = Where s(a,b) is just the score of aligning a residue of type a to a residue of type b
Substitution Matrices s(a,b) A G M Y A 4 0-1 -3 G 0 6-3 -2 M -1-3 5-1 Y -1-2 -1 11
Substitution Matrices s(a,b) A G M Y A 4 0-1 -3 = G 0 6-3 -2 = M -1-3 5-1 Y -1-2 -1 11 MAGA MAGY
Two major scoring matrices PAM = accepted point mutation derived from 71 trees with 1572 accepted mutations, sequences with >85% identity accepted means new amino acid doesn t disrupt the protein s function too severely BLOSUM = Blocks substitution matrices Based on BLOCKS database (Henikoff & Henikoff, 1992) of over 2000 conserved amino acid patterns in over 500 proteins
PAM overview based on well-accepted phylogenetic trees STTWC SSTWC STTPC STTPC observations: one S/T change between close relatives, one P/Q change over distant branches, no change from C
BLOSUM overview based on alignments of known protein motifs, evolutionary relationship unknown STTWC SSTWC STTPC STTWC observations: three T/S mismatches, three P/Q mismatches, no change from C
PAM matrices Each matrix describes changes expected for a given period of evolutionary time (measured by expected similarity of proteins) Count # of changes to each amino acid in the phylogenetic group and divide by the exposure to mutation of the residue Exposure to mutation = frequency of occurrence of amino acid * #amino acid changes in the group/100 sites
PAM matrices assumptions P(X->Y) = P(Y->X) P(X->Z->Y) is low in a single PAM period changes are independent across time neighboring amino acids have no influence on probability of substitution All sequences have similar amino acid composition
BLOSUM Henikoff & Henikoff used PROTOMAT program to create BLOCKS database from Prosite catalog of aligned proteins PROTOMAT looks for A1-d1-A2-d2-A3 where A1, A2, A3 are conserved residues and d1,d2 < 25 residue intervening sequence
BLOSUM construction 1. Count mutations VVAPV AAAPA PVAPV PAAAV N AA = 0+1+6+0+0 = 7 N VV = 0+1+0+0+3 = 4 N PP = 1+0+0+3+0 = 4 N AV = 1+4+0+0+3 = 8 N AP = 2+0+0+3+0 = 5 N PV = 2+0+0+0+0 = 2
BLOSUM construction 2. Tallying mutation frequencies q ij = # times amino acid j mutates to amino acid i Since we don t know ancestry, each mutation gets entered twice VVAPV AAAPA PVAPV PAAAV qij A V P A 14 8 5 V 8 8 2 P 5 2 8 q AA = 14 q AV = q VA = 8
BLOSUM construction 3. Matrix of mutation probabilities Create probabilities from mutation frequencies by dividing by total number of observations (60) pij A V P A 14/60 8/60 5/60 V 8/60 8/60 2/60 P 5/60 2/60 8/60
BLOSUM construction 4. Calculate probability of observing each residue p i is the marginal probability, meaning the expected probability of occurrence of amino acid i VVAPV AAAPA PVAPV PAAAV pi A 9/20 V 6/20 P 5/20
BLOSUM construction 5. Obtaining a BLOSUM matrix BLOSUM is a log-likelihood matrix: S ij = 2log 2 (p ij /(p i p j )) Sij A V P A 0.41 AAPVA APPVA V -0.04 1.13 P -0.87-2.34 2.19
Choice of matrix High PAM numbers (up to PAM250) are derived from multiplying lots of PAM1 matrices. Low BLOSUM numbers (down to BLOSUM 30) come from very similar sequence blocks Long sequences and sequences from very distantly related organisms should be aligned with high PAM or low BLOSUM #s. The best alignments between sequences with high similarity come from high BLOSUM or low PAM numbers.
BLOSUM vs PAM BLOSUM: based on short conserved sequences (blocks) Based on a range of evolutionary periods Each matrix constructed separately Indirectly accounts for interdependence of residues Range of sequences, range of replacements Overcounts related mutations PAM: evolutionary model Based on extrapolation from a short evolutionary period Errors in PAM1 are magnified through PAM250 Assumes Markov process Many sequences depart from average composition Rare replacements too infrequent to be represented accurately
Issues Both BLOSUM and PAM matrices are derived from small sets of sequences from biased databases Both types of matrices require aligned sequences for their construction Both types of matrices depend on global, ungapped alignments