550 likes | 714 Views
Lesson 3. Aligning sequences and searching databases . Some Terminology. Matrix = Table. Probability = סיכוי Likelihood = סבירות. Global and Local pairwise alignments. Global vs. Local . Global alignment – finds the best alignment across the entire two sequences.
E N D
Lesson 3 Aligning sequences and searching databases
Global vs. Local Global alignment – finds the best alignment across the entire two sequences. Local alignment – finds regions of similarity in parts of the sequences. ADLGAVFALCDRYFQ |||| |||| | ADLGRTQN-CDRYYQ ADLG CDRYFQ |||| |||| | ADLG CDRYYQ
The sequence similarity is restricted to a single domain PTK2 Domain A Protein tyrosine kinase domain Domain B Domain X Protein tyrosine kinase domain Leukocyte TK
Which alignment is the correct one? AAGTGAATTCGAA AGGCTCATTTCTGA A-AG-TGAATTC--GAA AG-GCTCA-TTTCTGA- AAG-TGAATT-C-GAA AGGCT-CATTTCTGA-
Scoring system (naïve) Perfect match: +1 Mismatch: -2 Indel (gap): -1 A-AG-TGAATTC--GAA AG-GCTCA-TTTCTGA- AAG-TGAATT-C-GAA AGGCT-CATTTCTGA- Score: =(+1)x9 + (-2)x2 + (-1)x5= 0 Score: =(+1)x8 + (-2)x2 + (-1)x6 = -1 Higher score Better alignment
DNA scoring matrices Uniform substitutions between all nucleotides: Match Mismatch
Scoring gaps (I) Gap extension penalty < Gap opening penalty
Protein matrices – actual substitutions The idea: Given an alignment of a large number of closely related sequences we can score the relation between amino acids based on how frequently they substitute each other M G Y D E M G Y D E M G Y E E M G Y D E M G Y Q E M G Y D E M G Y E E M G Y E E In the fourth column E and D are found in 7 / 8
PAM Matrices Family of matrices PAM 80, PAM 120, PAM 250 The number on the PAM matrix represents evolutionary distance Larger numbers are for larger distances
Example: PAM 250 Similar amino acids have greater score
PAM - limitations Based only on a single, and limited dataset Examines proteins with few differences (85% identity) Based mainly on small globular proteins so the matrix is biased
BLOSUM Henikoff and Henikoff (1992) derived a set of matrices based on a much larger dataset BLOSUM observes significantly more replacements than PAM, even for infrequent pairs
BLOSUM:BlocksSubstitutionMatrix Based on BLOCKS database ~2000 blocks from 500 families of related proteins Families of proteins with identical function Blocks are short conserved patterns of 3-60 amino acids without gaps AABCDA----BBCDA DABCDA----BBCBB BBBCDA-AA-BCCAA AAACDA-A--CBCDB CCBADA---DBBDCC AAACAA----BBCCC
Example : Blosum62 Derived from blocks where the sequences share at least 62% identity
PAM vs. BLOSUM PAM100 = BLOSUM90 PAM120 = BLOSUM80 PAM160 = BLOSUM60 PAM200 = BLOSUM52 PAM250 = BLOSUM45 More distant sequences
Intermediate summary • Scoring system = substitution matrix + gap penalty. • Used for both global and local alignment • For amino acids, there are two types of substitution matrices: PAM and Blosum
Many possible alignments AAGCTGAATTCGAA AGGCTCATTTCTGA • Which alignment has the best score? • Two sequences of length 10 have >> 1,000,000 possible alignments • Two sequences of length 20 have >> 1,000,000,000,000 possible alignments • Two sequences of length 30 have >> 1,000,000,000,000,000,000 possible alignments AAGCTGAATT-C-GAA AGGCT-CATTTCTGA- AAG-CTGAATT-C-GAA AGGCT-CATTT-CTGA- AAGCT-GAATT-C-GAA A-GGCT-CATTTCTGA-
Optimal alignment algorithms • Needleman-Wunsch (global) [1970] • Smith-Waterman (local) [1981] • Two sequences of length 10: 100 computer operations (instead of 1,000,000). • Two sequences of length 20: 400 computer operations (instead of 1,000,000,000,000). • Two sequences of length 30: 900 computer operations (instead of 1,000,000,000,000,000,000).
T S score(AAAC,AGC) = -1 Matrix Representation Match = 1 Mismatch = -1 Indel = -2 AAAC A-GC
T S Matrix Representation Match = 1 Mismatch = -1 Indel = -2 AAA A-G score(AAA,AG) = -2
T S Matrix Representation Match = 1 Mismatch = -1 Indel = -2 -- AG score(,AG) = -2
T S Matrix Representation Match = 1 Mismatch = -1 Indel = -2 How do we fill in the alignment scores in the matrix? That’s where the algorithm comes into play
A Useful Link • http://alggen.lsi.upc.es/docencia/ember/frame-ember.html • Gives a step by step illustration of the algorithm for any given pair of sequences.
A suggestion A. Take the two sequences Compute score. B. Take one sequence randomly shuffle it -> find score with the second sequence. Repeat 100,000 times. If the score in A is at the top 5% of the scores in B the similarity is significant.
Craig Venter’s cruise A sequence found in Craig Venter’s cruise: …AGGTAGACTAGAGCAGTTAGAACGTTAGTTTA… Which organism is it coming from??
Database GTGAGCAGAGAATAGTTTAAC… GAGCTATGTGAGCAGAGAATA… CTACGTGAGCAGAGAATAGTT… CATAGCTACTATGTGAGCAGA… GAGACCAGAGACTACGATAGC… CTAAACTGTGAGCAGACTCGT… GGGGACAGAGAATAGTTTAAC… TAGCTGAGCTATGTGAGCAGA… … … Query AGGTAGACTAGAGCAGTTAGAACGTTAGTTTA
Searching a sequence database The idea: Use your sequence as a query to find homologous sequences in a sequence database Database A sequence takenfrom Venter’s trip
Searching a sequence database Database query
Searching a sequence database Database hit query
Terminology Query sequence - the sequence with which we are searching Hit – a sequence found in the database, suspected as homologous
Query sequence: DNA or protein? For coding sequences, we can use the DNA sequence or the protein sequence to search for similar sequences. Which is preferable if we want to learn about homology?
Amino acids are better! Selection (and hence conservation) works (mostly) at the protein level:CTTTCA = Leu-SerTTGAGT=Leu-Ser
Query type • Nucleotides: a four letter alphabet • Amino acids: a twenty letter alphabet • Two random DNA sequences will, on average, have 25% identity • Two random protein sequences will, on average, have 5% identity
Searching a sequence database Assuming 10 comparisons in every second, a full comparison of the query to the database requires 11.5 days. Database query 107 sequences
How do we search a database? 11.5 days is ok if we are doing it once. 150,000 searches (at least!!) are performed per day. >82,000,000 sequence records in GenBank.
Heuristic Definition: a heuristic is a design to solve a problem that does not provide an exact solution (but is not too bad) but reduces the time complexity of the exact solution
BLAST BLAST - Basic Local Alignment and Search Tool A heuristic for searching a database for similar sequences
BLAST - underlying hypothesis The underlying hypothesis: when two sequences are similar there are short ungapped regions of high similarity between them The heuristic: Discard irrelevant sequences Perform exact local alignment only with the remaining sequences