Presentation is loading. Please wait.

Presentation is loading. Please wait.

Sequence comparison: Significance of similarity scores

Similar presentations


Presentation on theme: "Sequence comparison: Significance of similarity scores"— Presentation transcript:

1 Sequence comparison: Significance of similarity scores
Genome 559: Introduction to Statistical and Computational Genomics Prof. William Stafford Noble

2 One-minute responses Sample problems and lecture are both helpful.
I like the practice problems. Interesting topics. Good, thought-provoking examples. I enjoy the practice problems and would be interested in a harder example. Example problems are too easy. Example problems are challenging but not too challenging. Great contents covered and pace. I like including optional problems. It is helpful to have Lindsay walk around during class with explanations. I like learning the terminology. I like spending more time with coding and sample problems. Lots of new Python commands, but no way around that. I like when each example adds to the complexity of the code. Appreciated the review problems for the matrix. Enjoyed learning about global and local alignment.

3 One-minute responses Lecture pace was good. Great speed.
Good pacing. x5 This was the first class where I was able to complete the two practice problems. Thank you for slowing down. Might be nice to have a compiled list of commands. I need more practice with these commands. I got a little lost at the local alignment explanation. I prefer to read before class, so knowing the reading assignment in advance would be helpful. For a challenge, could you suggest how many lines of code to use in the examples? For the practice problems, it would be helpful to have 1 minutes of silence at the start of each problem.

4 Local DP in equation form

5 Local alignment Two differences with respect to global alignment:
No score is negative. Traceback begins at the highest score in the matrix and continues until you reach 0. Global alignment algorithm: Needleman-Wunsch. Local alignment algorithm: Smith-Waterman.

6 Local alignment Find the optimal local alignment of AAG and GAAGGC. Use a gap penalty of d=-5. A C G T 2 -7 -5 A G C

7 Local alignment Find the optimal local alignment of AAG and GAAGGC. Use a gap penalty of d=-5. A C G T 2 -7 -5 A G 2 4 6 C

8 Local alignment AAG A G 2 4 6 C
Find the optimal local alignment of AAG and GAAGGC. Use a gap penalty of d=-5. A C G T 2 -7 -5 A G 2 4 6 C AAG

9 Are these proteins homologs?
SEQ 1: RVVNLVPS--FWVLDATYKNYAINYNCDVTYKLY L P W L Y N Y C L SEQ 2: QFFPLMPPAPYWILATDYENLPLVYSCTTFFWLF NO (score = 9) SEQ 1: RVVNLVPS--FWVLDATYKNYAINYNCDVTYKLY L P W LDATYKNYA Y C L SEQ 2: QFFPLMPPAPYWILDATYKNYALVYSCTTFFWLF MAYBE (score = 15) SEQ 1: RVVNLVPS--FWVLDATYKNYAINYNCDVTYKLY RVV L PS W LDATYKNYA Y CDVTYKL SEQ 2: RVVPLMPSAPYWILDATYKNYALVYSCDVTYKLF YES (score = 24)

10 Significance of scores
HPDKKAHSIHAWILSKSKVLEGNTKEVVDNVLKT Homology detection algorithm 45 Low score = unrelated High score = homologs How high is high enough? LENENQGKCTIAEYKYDGKKASVYNSFVSNGVKE

11 Other significance questions
Pairwise sequence comparison scores

12 Other significance questions
Pairwise sequence comparison scores Gene expression measurements Sequence motif scores

13 The null hypothesis We are interested in characterizing the distribution of scores from sequence comparison algorithms. We would like to measure how surprising a given score is, assuming that the two sequences are not related. The assumption is called the null hypothesis. The purpose of most statistical tests is to determine whether the observed results provide a reason to reject the hypothesis that they are merely a product of chance factors.

14 Sequence similarity score distribution
? Frequency Sequence comparison score Search a randomly generated database of DNA sequences using a randomly generated DNA query. What will be the form of the resulting distribution of pairwise sequence comparison scores?

15 Empirical score distribution
The picture shows a distribution of scores from a real database search using BLAST. This distribution contains scores from non-homologous and homologous pairs. Frequency Value High scores from homology.

16 Empirical null score distribution
This distribution is similar to the previous one, but generated using a randomized sequence database. Frequency Value

17 Computing a p-value The probability of observing a score >X is the area under the curve to the right of X. This probability is called a p-value. p-value = Pr(data|null) Frequency Value Out of 1685 scores, 28 receive a score of 20 or better. Thus, the p-value associated with a score of 20 is approximately 28/1685 =

18 Problems with empirical distributions
We are interested in very small probabilities. These are computed from the tail of the distribution. Estimating a distribution with accurate tails is computationally very expensive.

19 A solution Solution: Characterize the form of the distribution mathematically. Fit the parameters of the distribution empirically, or compute them analytically. Use the resulting distribution to compute accurate p-values.

20 Extreme value distribution
This distribution is characterized by a larger tail on the right.

21 Computing a p-value The probability of observing a score >4 is the area under the curve to the right of 4. This probability is called a p- value. p-value = Pr(data|null)

22 Extreme value distribution
Compute this value for x=4.

23 Computing a p-value Calculator keys: 4, +/-, inv, ln, +/-, inv, ln, +/-, +, 1, = Solution:

24 Scaling the EVD Gap penalty = 5 Gap penalty = 7 An extreme value distribution derived from, e.g., the Smith-Waterman algorithm will have a characteristic mode μ and scale parameter λ. These parameters depend upon the size of the query, the size of the target database, the substitution matrix and the gap penalties.

25 An example You run BLAST and get a score of 45. You then run BLAST on a shuffled version of the database, and fit an extreme value distribution to the resulting empirical distribution. The parameters of the EVD are μ = 25 and λ = What is the p- value associated with 45?

26 An example You run BLAST and get a score of 45. You then run BLAST on a shuffled version of the database, and fit an extreme value distribution to the resulting empirical distribution. The parameters of the EVD are μ = 25 and λ = What is the p- value associated with 45?

27 Summary A distribution plots the frequency of a given type of observation. The area under any distribution is 1. Most statistical tests compare observed data to the expected result according to the null hypothesis. Sequence similarity scores follow an extreme value distribution, which is characterized by a larger tail. The p-value associated with a score is the area under the curve to the right of that score.


Download ppt "Sequence comparison: Significance of similarity scores"

Similar presentations


Ads by Google