200 likes | 321 Views
Algorithms for Bioinformatics. Searching Sequence Databases. Database Searching. How can we find a particular short sequence in a database of sequences (or one HUGE sequence)? Problem is identical to local sequence alignment, but on a much larger scale.
E N D
Algorithms for Bioinformatics Searching Sequence Databases
Database Searching • How can we find a particular short sequence in a database of sequences (or one HUGE sequence)? • Problem is identical to local sequence alignment, but on a much larger scale. • We must also have some idea of the significance of a database hit. • Databases always return some kind of hit, how much attention should be paid to the result? Database Searches
BLAST • BLAST – Basic Local Alignment Search Tool • An approximation of the Needleman & Wunsch algorithm • Sacrifices some search sensitivity for speed Database Searches
Scoring Matrices • DNA • Identity • Transition/Transversion • Proteins • PAM • BLOSUM Database Searches
MCG, CGP, GPF, PFI, FIL, ILG, LGT, GTY, TYC The BLAST algorithm • Break the search sequence into words • W = 3 for proteins, W = 12 for DNA • Include in the search all words that score above a certain value (T) for any search word MCGPFILGTYC CGP MCG MCGCGP MCT MGP … MCN CTP … … This list can be computed in linear time Database Searches
The Blast Algorithm (2) • Search for the words in the database • Word locations can be precomputed and indexed • Searching for a short string in a long string • Regular expression matching: FSA • HSP (High Scoring Pair) = A match between a query word and the database • Find a “hit”: Two non-overlapping HSP’s on a diagonal within distance A • Extend the hit until the score falls below a threshold value, X Database Searches
Results from a BLAST search Database Searches
Search Significance Scores • A search will always return some hits. • How can we determine how “unusual” a particular alignment score is? • ORF’s • Assumptions Database Searches
Frequency Diameter (cm) Assessing significance requires a distribution • I have an apple of diameter 5”. Is that unusual? Database Searches
Frequency Match score Is a match significant? • Match scores for aligning my sequence with random sequences. • Depends on: • Scoring system • Database • Sequence to search for • Length • Composition • How do we determine the random sequences? Database Searches
Generating “random” sequences • Random uniform model:P(G) = P(A) = P(C) = P(T) = 0.25 • Doesn’t reflect nature • Use sequences from a database • Might have genuine homology • We want unrelated sequences • Random shuffling of sequences • Preserves composition • Removes true homology Database Searches
What distribution do we expect to see? • The mean of n random (i.i.d.) events tends towards a Gaussian distribution. • Example: Throw n dice and compute the mean. • Distribution of means: n = 2 n = 1000 Database Searches
The extreme value distribution • This means that if we get the match scores for our sequence with n other sequences, the mean would follow a Gaussian distribution. • The maximum of n (i.i.d.) random events tends towards the extreme value distribution as n grows large. Database Searches
Comparing distributions Extreme Value: Gaussian: Database Searches
Determining P-values • If we can estimate and , then we can determine, for a given match score x, the probability that a random match with score x or greater would have occurred in the database. • For sequence matches, a scoring system and database can be parameterized by two parameters, K and , related to and . • It would be nice if we could compare hit significance without regard to the database and scoring system used! Database Searches
Bit Scores • The expected number of hits with score S is: E = Kmne s • Where m and n are the sequence lengths • Normalize the raw score using: • Obtains a “bit score” S’, with a standard set of units. • The new E-value is: Database Searches
P values and E values • Blast reports E-values • E = 5, E = 10 versus P = 0.993 and P = 0.99995 • When E < 0.01 P-values and E-values are nearly identical Database Searches
BLAST parameters • Lowering the neighborhood word threshold (T) allows more distantly related sequences to be found, at the expense of increased noise in the results set. • Raising the segment extension cutoff (X) returns longer extensions for each hit. • Changing the minimum E-value changes the threshold for reporting a hit. Database Searches