Presentation is loading. Please wait.

Presentation is loading. Please wait.

Space/Time Tradeoff and Heuristic Approaches in Pairwise Alignment.

Similar presentations


Presentation on theme: "Space/Time Tradeoff and Heuristic Approaches in Pairwise Alignment."— Presentation transcript:

1 Space/Time Tradeoff and Heuristic Approaches in Pairwise Alignment

2  Given two sequences of length ~1,000 requires a table of size ~1,000,000 cells  Can we use less space if only wanted the alignment score  Hint: The construction was carried out one row at a time Alignment and Resources -GATTACA -0-2-4-6-8-10-1214 C-2-3-5-7-9-8-10 A-4-31-3-5-7-6 C -50-2-4-3-5 T-8-7-3120-2-4 A-10-9-50420 G-12-8-7-3-2231

3  If only alignment score is needed the alignment can be computed by using a matrix of only two rows Alignment and Resources -GATTACA -0-2-4-6-8-10-1214 C-2-3-5-7-9-8-10 A-4-31-3-5-7-6 C -50-2-4-3-5 T-8-7-3120-2-4 A-10-9-50420 G-12-8-7-3-2231

4  If only alignment score is needed the alignment can be computed by using a matrix of only two rows Alignment and Resources -GATTACA -0-2-4-6-8-10-1214 C A C T A G

5  If only alignment score is needed the alignment can be computed by using a matrix of only two rows Alignment and Resources -GATTACA -0-2-4-6-8-10-1214 C-2-3-5-7-9-8-10 A C T A G

6  If only alignment score is needed the alignment can be computed by using a matrix of only two rows Alignment and Resources -GATTACA - C-2-3-5-7-9-8-10 A C T A G

7  If only alignment score is needed the alignment can be computed by using a matrix of only two rows Alignment and Resources -GATTACA - C-2-3-5-7-9-8-10 A-4-31-3-5-7-6 C T A G

8  If only alignment score is needed the alignment can be computed by using a matrix of only two rows Alignment and Resources -GATTACA - C A-4-31-3-5-7-6 C T A G

9  If only alignment score is needed the alignment can be computed by using a matrix of only two rows Alignment and Resources -GATTACA - C A-4-31-3-5-7-6 C -50-2-4-3-5 T A G

10  If only alignment score is needed the alignment can be computed by using a matrix of only two rows Alignment and Resources -GATTACA - C A C-6-50-2-4-3-5 T A G

11  If only alignment score is needed the alignment can be computed by using a matrix of only two rows Alignment and Resources -GATTACA - C A C-6-50-2-4-3-5 T-8-7-3120-2-4 A G

12  If only alignment score is needed the alignment can be computed by using a matrix of only two rows Alignment and Resources -GATTACA - C A C T-8-7-3120-2-4 A G

13  If only alignment score is needed the alignment can be computed by using a matrix of only two rows Alignment and Resources -GATTACA - C A C T-8-7-3120-2-4 A-10-9-50420 G

14  If only alignment score is needed the alignment can be computed by using a matrix of only two rows Alignment and Resources -GATTACA - C A C T A-10-9-50420 G

15  If only alignment score is needed the alignment can be computed by using a matrix of only two rows Alignment and Resources -GATTACA - C A C T A-10-9-50420 G-12-8-7-3-2231

16  If the sequences have size m and n need 2*min(m, n) cells to compute alignment score (could have slid “window” vertically) Alignment and Resources -GATTACA - C A C T A-10-9-50420 G-12-8-7-3-2231

17  If the sequences have size m and n need 2*min(m, n) cells to compute alignment score (could have slid “window” vertically)  Cannot recover the alignment -- trace-back arrows not stored  Possible to design an algorithm that uses m+n cells but still allows to recover the alignment D. S. Hirschberg. Algorithms for the longest common subsequence problem. J.ACM, 24:664- 675, 1977. Alignment and Resources

18  Given two sequences each of length ~1,000  original algorithm required to store ~1,000,000 = 1,000*1,000 cells  modified version requires 2,000 = 2*min(1000, 1000)  If the value of a cell could be computed in 1μs how much time is required by each algorithm  The algorithms are impractical if you need to search through a database of hundreds of thousands of sequences  Heuristic approaches (BLAST, FASTA) have been developed to cope with this problem  May not find overall best alignment, but do well in practice Alignment and Resources

19  Basic Local Alignment Search Tool – computes local alignments and performs very well in practice Altschul, Gish, Miller, Myers, Lipman, Basic Local Alignment Search Tool. Journal of Molecular Biology, 215(3), 403-410. BLAST QUERY sequence(s) BLAST database BLAST program BLAST results

20  Main Idea: Identify short stretches of high scoring local alignments between query and target sequence and extend “The central idea of the BLAST algorithm is to confine attention to segment pairs that contain a word pair of length w with a score of at least T.” Altschul et al. (1990 )  The procedure:  use sliding window to extract all words of size w from query sequence  for each word build a “hit list” of words with pairwise score at least T  scan database for sequences that have words from “hit list”  extend each hit until score drops below some cutoff BLAST

21  Example with w=3, T=11, query= …FSGTWYA…  use sliding window to extract all words of size w from query sequence … FSG, SGT, GTW, WAY, …  for each word build a “hit list” of words with pairwise score at least T GTW GTW 6,5,11 = 22 ASW 0,1,11 = 12 QTW -2,5,11= 14  scan database for sequences that have words from “hit list”  extend each hit until score drops below some cutoff ENFDKARFSGTWYAMAKKD QNFDKTRYAGTWYAVAKKD BLAST Adapted from JHMI 140.638.01

22 BLAST Server http://blast.ncbi.nlm.nih.gov/Blast.cgi

23  Runs dynamic programming on a restricted part of the table Lipman, Pearson. Rapid and sensitive protein similarity searches. Science. 227 (4693): 1435-41.  Procedure  identify all matches of size k between the sequences (dot plot like) -- these matches will form diagonals in the matrix  keep only the top scoring matches (using PAMn, BLOSUMn) – the score for these matches is called init1  attempt to join any of the top scoring regions if they could form longer alignment – the score for these alignments is called initn  apply full dynamic programming on a narrow band around the high scoring diagonal – the score for the final alignment is called opt FASTA

24 “Protein Structure prediction – a practical approach”

25 FASTA Server http://fasta.bioch.virginia.edu

26  Python Programming  be able to write python functions  be able to predict the output of a function  Chapter 4  4.1: principles of sequence alignment  4.2: scoring alignments, dot plots  4.3: substitution matrices (high-level difference PAM vs BLOSUM)  4.4: handling gaps  4.5: types of alignment (pairwise only)  4.6: searching databases (BLAST, FASTA)  Chapter 5  5.1: substitution matrices (know how BLOSUM works, up to p.124)  5.2: dynamic programming algorithms (skip pp.134, 135)  8.1: Jukes-Cantor, Kimura models (pp.271-273) Exam Topics


Download ppt "Space/Time Tradeoff and Heuristic Approaches in Pairwise Alignment."

Similar presentations


Ads by Google