SLIDE 1
Database Filtering in Blast
Vineet Bafna
1 Note:
These lecture notes are meant to supplement the lecture, have been written in haste, and may contain minor errors. Please send email to vbafna@cs.ucsd.edu if you find an error. The first person to locate each specific error gets a credit of 0.5%.
2 Introduction
Recall that we are interested in computing local alignments of a query string of length n against a subsequence from database. Certainly, we can apply the smith waterman (local alignment) algorithm treating the entire database as a single string of length m, and computing the optimum local alignment. See Problem ??. The number of steps, from earlier arguments is O(nm). As a rough calculation, suppose,we were querying the entire human genome, against the entire mouse genome implying that n ≃ m ≃ 3 × 109. An full-blown local align- ment would require ∼ 1019 steps. Even with a fast computation of 1010 steps per sec., we would need 109s (31 CPU-years) to do the computation. It is worth considering if we can do better. A general approach to this problem is through database filtering. Think of a database filter as a program that rapidly eliminates a large portion of the database without losing any of the similar strings. For example, suppose we had a filter that runs in time O(m) (independent of the query size), and rejects all but a fraction f << 1
- f the database. Then, by aligning the query only to the filtered sequence, the total running time is reduced to
O(m+fmn). Suppose, we had a filter with f = 10−8. then, the total running time for the previous query would have ∼ 109 + 10−81019 ≃ 1011 steps. At 1010 steps per second, we could do the query in 10 secs. This is the idea that is pursued in Blast.
3 Basics
Let us start with the assumption that the database is a random string over the characters {A, C, G, T}, each
- ccurring independently with probability 0.25. Next, assume that the query is a string of k ones, given by
q = 111 . . . 111
- k
We are interested in computing Pr(q is contained in a database substring) As it turns out, this is somewhat difficult to compute because of the dependencies between occurrence at different
- positions. However, given a fixed position i in the database,
Pr(q occurs at position i) = 1 4 k Therefore, the expected number of occurrences of q = n 1
4
- k. Why?