Presentation is loading. Please wait.

Presentation is loading. Please wait.

6.096 – Algorithms for Computational Biology – Lecture 7

Similar presentations


Presentation on theme: "6.096 – Algorithms for Computational Biology – Lecture 7"— Presentation transcript:

1 6.096 – Algorithms for Computational Biology – Lecture 7
Gene Finding and HMMs Lecture 1 - Introduction Lecture 2 - Hashing and BLAST Lecture 3 - Combinatorial Motif Finding Lecture 4 - Statistical Motif Finding Lecture 5 - Sequence alignment and Dynamic Programming Lecture 6 - RNA structure and Context Free Grammars Lecture 7 - Gene finding and Hidden Markov Models

2 Challenges in Computational Biology
4 Genome Assembly Regulatory motif discovery 1 Gene Finding DNA Sequence alignment Comparative Genomics TCATGCTAT TCGTGATAA TGAGGATAT TTATCATAT TTATGATTT Database lookup 7 Evolutionary Theory RNA folding 9 Gene expression analysis RNA transcript 10 Cluster discovery Gibbs sampling 12 Protein network analysis 13 Regulatory network inference 14 Emerging network properties

3 Outline Computational model Working with HMMs Gene Finding in practice
Simple Markov Models Hidden Markov Models Working with HMMs Dynamic programming (Viterbi) Expectation maximization (Baum-Welch) Gene Finding in practice GENSCAN Performance Evaluation Gene Finding Problem CpG problem as an example Markov Model for CpG problem Formal definition of Markov model Hidden Markov Model for CpG problem Formal definition of HMMs Parameter Estimation Topology Design Viterbi Algorithm HMM-based Gene Finding Approaches (GENSCAN, FGENESH, VEIL, HMMgene) GENESCAN Performance Evaluation

4 Markov Chains & Hidden Markov Models
aAT A+ T+ A+ C+ G+ T+ aAC aGT C+ G+ A: 1 C: 0 G: 0 T: 0 A: 0 C: 1 G: 0 T: 0 A: 0 C: 0 G: 1 T: 0 A: 0 C: 0 G: 0 T: 1 aGC Markov Chain Q: states p: initial state probabilities A: transition probabilities HMM Q: states V: observations p: initial state probabilities A: transition probabilities E: emission probabilities

5 Markov Chain Definition: A Markov chain is a triplet (Q, p, A), where: Q is a finite set of states. Each state corresponds to a symbol in the alphabet Σ p is the initial state probabilities. A is the state transition probabilities, denoted by ast for each s, t in Q. For each s, t in Q the transition probability is: ast ≡ P(xi = t|xi-1 = s) Output: The output of the model is the set of states at each instant time => the set of states are observable Property: The probability of each symbol xi depends only on the value of the preceding symbol xi-1 : P (xi | xi-1,…, x1) = P (xi | xi-1) Let me first give a formal definition of a Markov Chain model and then show how this simple model can be used to answer these two questions. Examples: Markov model of the weather: The weather is observed once a day. States: Rain or snow, Cloudy, Sunny Go over an example on p. 259 (left column) Talk about: the training set How the transition matrix could have been calculated How to calculate the probability to have a pattern s-s-r-r-s-c-s State: the first-order assumption is too simplistic Joke about the changing weather in Tennessee Now, let see how we can apply this model to our CpG islands problem Formula: The probability of the sequence: P(x) = P(xL,xL-1,…, x1) = P (xL | xL-1) P (xL-1 | xL-2)… P (x2 | x1) P(x1)

6 HMM (Hidden Markov Model)
Definition: An HMM is a 5-tuple (Q, V, p, A, E), where: Q is a finite set of states, |Q|=N V is a finite set of observation symbols per state, |V|=M p is the initial state probabilities. A is the state transition probabilities, denoted by ast for each s, t in Q. For each s, t in Q the transition probability is: ast ≡ P(xi = t|xi-1 = s) E is a probability emission matrix, esk ≡ P (vk at time t | qt = s) Output: Only emitted symbols are observable by the system but not the underlying random walk between states -> “hidden” Property: Emissions and transitions are dependent on the current state only and not on the past.

7 Typical HMM Problems Annotation Given a model M and an observed string S, what is the most probable path through M generating S Classification Given a model M and an observed string S, what is the total probability of S under M Consensus Given a model M, what is the string having the highest probability under M Training Given a set of strings and a model structure, find transition and emission probabilities assigning high probabilities to the strings Annotation – gene finding Classification – signal sensor, content sensor Annotation and classification problems can be solved efficiently using dynamic programming (Viterbi)

8 Example 1: Finding CpG islands

9 What are CpG islands? Regions of regulatory importance in promoters of many genes Defined by their methylation state (epigenetic information) Methylation process in the human genome: Very high chance of methyl-C mutating to T in CpG  CpG dinucleotides are much rarer BUT it is suppressed around the promoters of many genes  CpG dinucleotides are much more frequent than elsewhere Such regions are called CpG islands A few hundred to a few thousand bases long Problems: Given a short sequence, does it come from a CpG island or not? How to find the CpG islands in a long sequence As you can see the problem of gene finding is very complex. Let’s look at a simpler example that I will use to introduce the main concepts behind standard Markov models, then a simple Hidden Markov Model. In the human DNA wherever the dinucleotide CG occurs, the C nucleotide is typically chemically modified modified by methylation. There is a high chance of this methyl-C mutating into a T. As a result, CG dinucleotides are much rarer than would be expected from the independent probabilities of C and G. However, for biologically important reasons, the methylation process is suppressed in short stretches of DNA, such as around the promoters, Or ‘start’ regions of many genes. In these regions we see many more CG dinucleotides than elsewhere. Such regions are called CpG islands. That are typically a few hundred to a few thousand base long. There are two questions that we consider today: Let’s start with the first question.

10 Training Markov Chains for CpG islands
Training Set: set of DNA sequences w/ known CpG islands Derive two Markov chain models: ‘+’ model: from the CpG islands ‘-’ model: from the remainder of sequence Transition probabilities for each model: A T G C aGT aAC aGC aAT Probability of C following A is the number of times letter t followed letter s inside the CpG islands + A C G T .180 .274 .426 .120 .171 .368 .188 .161 .339 .375 .125 .079 .355 .384 .182 Let’s first look at the Markov chain for DNA. Set of states are: A,C, T, and G Probability of certain residue to follow another residue – How we derive them is a separate issue Then we can calculate the probability that some stretch of DNA sequence was generated by this Markov model. Give an example for CGCGG is the number of times letter t followed letter s outside the CpG islands

11 Using Markov Models for CpG classification
Q1: Given a short sequence x, does it come from CpG island (Yes-No question) To use these models for discrimination, calculate the log-odds ratio: Histogram of log odds scores 5 10 CpG islands Non-CpG Here is the histogram of length normalized scores of all the sequences for both CpG islands and non-CpG islands

12 Using Markov Models for CpG classification
Q2: Given a long sequence x, how do we find CpG islands in it (Where question) Calculate the log-odds score for a window of, say, 100 nucleotides around every nucleotide, plot it, and predict CpG islands as ones w/ positive values Drawbacks: Window size Use a hidden state: CpG (+) or non-CpG (-)

13 HMM for CpG islands A: 1 C: 0 G: 0 T: 0 A: 0 C: 1 G: 0 T: 0 A: 0 C: 0 G: 1 T: 0 A: 0 C: 0 G: 0 T: 1 Build a single model that combines both Markov chains: ‘+’ states: A+, C+, G+, T+ Emit symbols: A, C, G, T in CpG islands ‘-’ states: A-, C-, G-, T- Emit symbols: A, C, G, T in non-islands Emission probabilities distinct for the ‘+’ and the ‘-’ states Infer most likely set of states, giving rise to observed emissions  ‘Paint’ the sequence with + and - states A+ T+ G+ C+ A- T- G- C- A: 0 C: 0 G: 1 T: 0 A: 1 C: 0 G: 0 T: 0 A: 0 C: 1 G: 0 T: 0 A: 0 C: 0 G: 0 T: 1 We would like is to build a single model for the entire sequence that incorporates both Markov chains. We have two states corresponding to each nucleotide symbol: A+ A- The transition probabilities are set so that within each group they are the same as in the Markov models. But there are small probabilities of switching between the components. Switch from + to – is more likely than from – to +. There is not 1-to-1 correspondence between states and symbols. Each state might emit different symbols. There is no way to say which state emitted symbol xi Let me give you another example of HMM: Give example with URNs on p.260 or a kid selecting balls from boxes and busy mom Let’s give a more formal definition of an HMM

14 Finding most likely state path
C- C- C- C- A- A- A- A- T+ T+ T+ T+ end start G+ G+ G+ G+ C+ C+ C+ C+ A+ A+ A+ A+ C G C G Given the observed emissions, what was the path?

15 Probability of given path p & observations x
C- C- C- C- A- A- A- A- T+ T+ T+ T+ end start G+ G+ G+ G+ C+ C+ C+ C+ A+ A+ A+ A+ C G C G Known observations: CGCG Known sequence path: C+, G-, C-, G+

16 Probability of given path p & observations x
C- C- end start G+ G+ C+ C+ C G C G Known observations: CGCG Known sequence path: C+, G-, C-, G+

17 Probability of given path p & observations x
aG-,C- C- C- aC-,G+ aC+,G- end start a0,C+ G+ G+ aG+,0 C+ C+ eC+(C) eG-(G) eC-(C) eG+(G) C G C G P(p,x) = (a0,C+* 1) * (aC+,G-* 1) * (aG-,C-* 1) * (aC-,G+* 1) * (aG+,0) But in general, we don’t know the path!

18 The three main questions on HMMs
Evaluation GIVEN a HMM M, and a sequence x, FIND Prob[ x | M ] Decoding GIVEN a HMM M, and a sequence x, FIND the sequence  of states that maximizes P[ x,  | M ] Learning GIVEN a HMM M, with unspecified transition/emission probs., and a sequence x, FIND parameters  = (ei(.), aij) that maximize P[ x |  ]

19 Find the best parse of a sequence
Problem 1: Decoding Find the best parse of a sequence

20 Decoding GIVEN x = x1x2……xN We want to find  = 1, ……, N,
such that P[ x,  ] is maximized * = argmax P[ x,  ] We can use dynamic programming! Let Vk(i) = max{1,…,i-1} P[x1…xi-1, 1, …, i-1, xi, i = k] = Probability of most likely sequence of states ending at state i = k 1 2 K x1 x2 x3 xK

21 Decoding – main idea Given that for all states k,
and for a fixed position i, Vk(i) = max{1,…,i-1} P[x1…xi-1, 1, …, i-1, xi, i = k] What is Vk(i+1)? From definition, Vl(i+1) = max{1,…,i}P[ x1…xi, 1, …, i, xi+1, i+1 = l ] = max{1,…,i}P(xi+1, i+1 = l | x1…xi,1,…, i) P[x1…xi, 1,…, i] = max{1,…,i}P(xi+1, i+1 = l | i ) P[x1…xi-1, 1, …, i-1, xi, i] = maxk P(xi+1, i+1 = l | i = k) max{1,…,i-1}P[x1…xi-1,1,…,i-1, xi,i=k] = el(xi+1) maxk akl Vk(i)

22 The Viterbi Algorithm Input: x = x1……xN Initialization:
V0(0) = 1 (0 is the imaginary first position) Vk(0) = 0, for all k > 0 Iteration: Vj(i) = ej(xi)  maxk akj Vk(i-1) Ptrj(i) = argmaxk akj Vk(i-1) Termination: P(x, *) = maxk Vk(N) Traceback: N* = argmaxk Vk(N) i-1* = Ptri (i)

23 The Viterbi Algorithm x1 x2 x3 ………………………………………..xN State 1 2 Vj(i) K Similar to “aligning” a set of states to a sequence Time: O(K2N) Space: O(KN)

24 Viterbi Algorithm – a practical detail
Underflows are a significant problem P[ x1,…., xi, 1, …, i ] = a01 a12……ai e1(x1)……ei(xi) These numbers become extremely small – underflow Solution: Take the logs of all values Vl(i) = log ek(xi) + maxk [ Vk(i-1) + log akl ]

25 Example Let x be a sequence with a portion of ~ 1/6 6’s, followed by a portion of ~ ½ 6’s… x = … … Then, it is not hard to show that optimal parse is (exercise): FFF…………………...F LLL………………………...L 6 nucleotides “123456” parsed as F, contribute .956(1/6) = 1.610-5 parsed as L, contribute .956(1/2)1(1/10)5 = 0.410-5 “162636” parsed as F, contribute .956(1/6) = 1.610-5 parsed as L, contribute .956(1/2)3(1/10)3 = 9.010-5

26 Find the likelihood a sequence is generated by the model
Problem 2: Evaluation Find the likelihood a sequence is generated by the model

27 Generating a sequence by the model
Given a HMM, we can generate a sequence of length n as follows: Start at state 1 according to prob a01 Emit letter x1 according to prob e1(x1) Go to state 2 according to prob a12 … until emitting xn 1 2 K 1 2 K 1 1 2 K 1 2 K a02 2 2 K e2(x1) x1 x2 x3 xn

28 A couple of questions Example: the dishonest casino
Given a sequence x, What is the probability that x was generated by the model? Given a position i, what is the most likely state that emitted xi? Example: the dishonest casino Say x = Most likely path:  = FF……F However: marked letters more likely to be L than unmarked letters

29 Evaluation We will develop algorithms that allow us to compute:
P(x) Probability of x given the model P(xi…xj) Probability of a substring of x given the model P(I = k | x) Probability that the ith state is k, given x A more refined measure of which states x may be in

30 The Forward Algorithm We want to calculate
P(x) = probability of x, given the HMM Sum over all possible ways of generating x: P(x) =  P(x, ) =  P(x | ) P() To avoid summing over an exponential number of paths , define fk(i) = P(x1…xi, i = k) (the forward probability)

31 The Forward Algorithm – derivation
Define the forward probability: fl(i) = P(x1…xi, i = l) = 1…i-1 P(x1…xi-1, 1,…, i-1, i = l) el(xi) = k 1…i-2 P(x1…xi-1, 1,…, i-2, i-1 = k) akl el(xi) = el(xi) k fk(i-1) akl

32 The Forward Algorithm We can compute fk(i) for all k, i, using dynamic programming! Initialization: f0(0) = 1 fk(0) = 0, for all k > 0 Iteration: fl(i) = el(xi) k fk(i-1) akl Termination: P(x) = k fk(N) ak0 Where, ak0 is the probability that the terminating state is k (usually = a0k)

33 Relation between Forward and Viterbi
Initialization: V0(0) = 1 Vk(0) = 0, for all k > 0 Iteration: Vj(i) = ej(xi) maxk Vk(i-1) akj Termination: P(x, *) = maxk Vk(N) FORWARD Initialization: f0(0) = 1 fk(0) = 0, for all k > 0 Iteration: fl(i) = el(xi) k fk(i-1) akl Termination: P(x) = k fk(N) ak0

34 Motivation for the Backward Algorithm
We want to compute P(i = k | x), the probability distribution on the ith position, given x We start by computing P(i = k, x) = P(x1…xi, i = k, xi+1…xN) = P(x1…xi, i = k) P(xi+1…xN | x1…xi, i = k) = P(x1…xi, i = k) P(xi+1…xN | i = k) Forward, fk(i) Backward, bk(i)

35 The Backward Algorithm – derivation
Define the backward probability: bk(i) = P(xi+1…xN | i = k) = i+1…N P(xi+1,xi+2, …, xN, i+1, …, N | i = k) = l i+1…N P(xi+1,xi+2, …, xN, i+1 = l, i+2, …, N | i = k) = l el(xi+1) akl i+1…N P(xi+2, …, xN, i+2, …, N | i+1 = l) = l el(xi+1) akl bl(i+1)

36 The Backward Algorithm
We can compute bk(i) for all k, i, using dynamic programming Initialization: bk(N) = ak0, for all k Iteration: bk(i) = l el(xi+1) akl bl(i+1) Termination: P(x) = l a0l el(x1) bl(1)

37 Computational Complexity
What is the running time, and space required, for Forward, and Backward? Time: O(K2N) Space: O(KN) Useful implementation technique to avoid underflows Viterbi: sum of logs Forward/Backward: rescaling at each position by multiplying by a constant

38 Posterior Decoding We can now calculate fk(i) bk(i)
P(i = k | x) = ––––––– P(x) Then, we can ask What is the most likely state at position i of sequence x: Define ^ by Posterior Decoding: ^i = argmaxk P(i = k | x)

39 Posterior Decoding For each state,
Posterior Decoding gives us a curve of likelihood of state for each position That is sometimes more informative than Viterbi path * Posterior Decoding may give an invalid sequence of states Why?

40 Maximum Weight Trace Another approach is to find a sequence of states under some constraint, and maximizing expected accuracy of state assignments Aj(i) = maxk such that Condition(k, j) Ak(i-1) + P(i = j | x) We will revisit this notion again

41 Re-estimate the parameters of the model based on training data
Problem 3: Learning Re-estimate the parameters of the model based on training data

42 Two learning scenarios
Estimation when the “right answer” is known Examples: GIVEN: a genomic region x = x1…x1,000,000 where we have good (experimental) annotations of the CpG islands GIVEN: the casino player allows us to observe him one evening, as he changes dice and produces 10,000 rolls Estimation when the “right answer” is unknown GIVEN: the porcupine genome; we don’t know how frequent are the CpG islands there, neither do we know their composition GIVEN: 10,000 rolls of the casino player, but we don’t see when he changes dice QUESTION: Update the parameters  of the model to maximize P(x|)

43 Case 1. When the right answer is known
Given x = x1…xN for which the true  = 1…N is known, Define: Akl = # times kl transition occurs in  Ek(b) = # times state k in  emits b in x We can show that the maximum likelihood parameters  are: Akl Ek(b) akl = ––––– ek(b) = ––––––– i Aki c Ek(c)

44 Case 1. When the right answer is known
Intuition: When we know the underlying states, Best estimate is the average frequency of transitions & emissions that occur in the training data Drawback: Given little data, there may be overfitting: P(x|) is maximized, but  is unreasonable 0 probabilities – VERY BAD Example: Given 10 casino rolls, we observe x = 2, 1, 5, 6, 1, 2, 3, 6, 2, 3  = F, F, F, F, F, F, F, F, F, F Then: aFF = 1; aFL = 0 eF(1) = eF(3) = .2; eF(2) = .3; eF(4) = 0; eF(5) = eF(6) = .1

45 Pseudocounts Solution for small training sets: Add pseudocounts
Akl = # times kl transition occurs in  + rkl Ek(b) = # times state k in  emits b in x + rk(b) rkl, rk(b) are pseudocounts representing our prior belief Larger pseudocounts  Strong priof belief Small pseudocounts ( < 1): just to avoid 0 probabilities

46 r0F = r0L = rF0 = rL0 = 1; Pseudocounts Example: dishonest casino
We will observe player for one day, 500 rolls Reasonable pseudocounts: r0F = r0L = rF0 = rL0 = 1; rFL = rLF = rFF = rLL = 1; rF(1) = rF(2) = … = rF(6) = 20 (strong belief fair is fair) rF(1) = rF(2) = … = rF(6) = 5 (wait and see for loaded) Above #s pretty arbitrary – assigning priors is an art

47 Case 2. When the right answer is unknown
We don’t know the true Akl, Ek(b) Idea: We estimate our “best guess” on what Akl, Ek(b) are We update the parameters of the model, based on our guess We repeat

48 Case 2. When the right answer is unknown
Starting with our best guess of a model M, parameters : Given x = x1…xN for which the true  = 1…N is unknown, We can get to a provably more likely parameter set  Principle: EXPECTATION MAXIMIZATION Estimate Akl, Ek(b) in the training data Update  according to Akl, Ek(b) Repeat 1 & 2, until convergence

49 Estimating new parameters
To estimate Akl: At each position i of sequence x, Find probability transition kl is used: P(i = k, i+1 = l | x) = [1/P(x)]  P(i = k, i+1 = l, x1…xN) = Q/P(x) where Q = P(x1…xi, i = k, i+1 = l, xi+1…xN) = = P(i+1 = l, xi+1…xN | i = k) P(x1…xi, i = k) = = P(i+1 = l, xi+1xi+2…xN | i = k) fk(i) = = P(xi+2…xN | i+1 = l) P(xi+1 | i+1 = l) P(i+1 = l | i = k) fk(i) = = bl(i+1) el(xi+1) akl fk(i) fk(i) akl el(xi+1) bl(i+1) So: P(i = k, i+1 = l | x, ) = –––––––––––––––––– P(x | )

50 Estimating new parameters
So, fk(i) akl el(xi+1) bl(i+1) Akl = i P(i = k, i+1 = l | x, ) = i ––––––––––––––––– P(x | ) Similarly, Ek(b) = [1/P(x)] {i | xi = b} fk(i) bk(i)

51 Estimating new parameters
If we have several training sequences, x1, …, xM, each of length N, fk(i) akl el(xi+1) bl(i+1) Akl = x i P(i = k, i+1 = l | x, ) = x i –––––––––––––––– P(x | ) Similarly, Ek(b) = x (1/P(x)) {i | xi = b} fk(i) bk(i)

52 The Baum-Welch Algorithm
Initialization: Pick the best-guess for model parameters (or arbitrary) Iteration: Forward Backward Calculate Akl, Ek(b) Calculate new model parameters akl, ek(b) Calculate new log-likelihood P(x | ) GUARANTEED TO BE HIGHER BY EXPECTATION-MAXIMIZATION Until P(x | ) does not change much

53 The Baum-Welch Algorithm – comments
Time Complexity: # iterations  O(K2N) Guaranteed to increase the log likelihood of the model P( | x) = P(x, ) / P(x) = P(x | ) / ( P(x) P() ) Not guaranteed to find globally best parameters Converges to local optimum, depending on initial conditions Too many parameters / too large model: Overtraining

54 Alternative: Viterbi Training
Initialization: Same Iteration: Perform Viterbi, to find * Calculate Akl, Ek(b) according to * + pseudocounts Calculate the new parameters akl, ek(b) Until convergence Notes: Convergence is guaranteed – Why? Does not maximize P(x | ) In general, worse performance than Baum-Welch

55 How to Build an HMM General Scheme: Architecture/topology design
Learning/Training: Training Datasets Parameter Estimation Recognition/Classification: Testing Datasets Performance Evaluation

56 Parameter Estimation for HMMs (Case 1)
Case 1: All the paths/labels in the set of training sequences are known: Use the Maximum Likelihood (ML) estimators for: Where Akl and Ek(x) are the number of times each transition or emission is used in training sequences Drawbacks of ML estimators: Vulnerable to overfitting if not enough data Estimations can be undefined if never used in training set (add pseudocounts to reflect a prior biases about probability values) Analogy with a kid and balls

57 Parameter Estimation for HMMs (Case 2)
Case 2: The paths/labels in the set of training sequences are UNknown: Use Iterative methods (e.g., Baum-Welch): Initialize akl and ekx (e.g., randomly) Estimate Akl and Ek(x) using current values of akl and ekx Derive new values for akl and ekx Iterate Steps 2-3 until some stopping criterion is met (e.g., change in the total log-likelihood is small) Drawbacks of Iterative methods: Converge to local optimum Sensitive to initial values of akl and ekx (Step 1) Convergence problem is getting worse for large HMMs

58 HMM Architectural/Topology Design
In general, HMM states and transitions are designed based on the knowledge of the problem under study Special Class: Explicit State Duration HMMs: Self-transition state to itself: The probability of staying in the state for d residues: pi (d residues) = (aii)d-1(1-aii) – exponentially decaying Exponential state duration density is often inappropriate Need to explicitly model duration density in some form Specified state density: Used in GenScan qi aii qj ajj The probability to rain 7 days in a row. How about to have sunny days 7 days in row if it is summer or winter? qi qj pi(d) pj(d)

59 HMM-based Gene Finding
GENSCAN (Burge 1997) FGENESH (Solovyev 1997) HMMgene (Krogh 1997) GENIE (Kulp 1996) GENMARK (Borodovsky & McIninch 1993) VEIL (Henderson, Salzberg, & Fasman 1997)

60 VEIL: Viterbi Exon-Intron Locator
Contains 9 hidden states or features Each state is a complex internal Markovian model of the feature Features: Exons, introns, intergenic regions, splice sites, etc. Exon HMM Model Upstream Start Codon Exon Stop Codon Downstream 3’ Splice Site Intron 5’ Poly-A Site 5’ Splice Site It can enter the exon model either through the start codon model or through an intron (3’ splice site). It can be exited through a 5’ splice site or through three possible stop codons Inside the exon model, nucleotides are grouped into triplets to reflect the codon structure: transitions between third and first codon positions +. Multiples of three nucleotides are accomodated Enter: start codon or intron (3’ Splice Site) Exit: 5’ Splice site or three stop codons (taa, tag, tga) VEIL Architecture

61 Genie Uses a generalized HMM (GHMM) Edges in model are complete HMMs
States can be any arbitrary program States are actually neural networks specially designed for signal finding J5’ – 5’ UTR EI – Initial Exon E – Exon, Internal Exon I – Intron EF – Final Exon ES – Single Exon J3’ – 3’UTR Begin Sequence Start Translation Donor splice site Acceptor splice site Stop Translation End Sequence In Genie the signal sensors (splice sites) and content sensors (coding potential) are neural networks. The output of these networks are interpreted as probabilities.

62 Genscan Overview Developed by Chris Burge (Burge 1997), in the research group of Samuel Karlin, Dept of Mathematics, Stanford Univ.  Characteristics: Designed to predict complete gene structures Introns and exons, Promoter sites, Polyadenylation signals Incorporates: Descriptions of transcriptional, translational and splicing signal Length distributions (Explicit State Duration HMMs) Compositional features of exons, introns, intergenic, C+G regions Larger predictive scope Deal w/ partial and complete genes Multiple genes separated by intergenic DNA in a seq Consistent sets of genes on either/both DNA strands Based on a general probabilistic model of genomic sequences composition and gene structure Incorporate descriptions of basic transcriptional, translational and splicing signals, as well as length distributions and compositional features of exons, introns and intergenic regions. Distinct sets of model parameters are derived to account for the many substantial differences in gene density and structure observed in distinct C+G compositional regions of the human genome. Moreover, new models of the donor and acceptor splice signals capture potentially important dependencies between signal positions.

63 Genscan Architecture It is based on Generalized HMM (GHMM)
Model both strands at once Other models: Predict on one strand first, then on the other strand Avoids prediction of overlapping genes on the two strands (rare) Each state may output a string of symbols (according to some probability distribution). Explicit intron/exon length modeling Special sensors for Cap-site and TATA-box Advanced splice site sensors In many gene finders, genes are first predicted on one strand, and then on the other rather than modeling both strands simultaneously. Such construction avoids prediction of overlapping genes on the two strands which is very rare Fig. 3, Burge and Karlin 1997

64 GenScan States N - intergenic region P - promoter
F - 5’ untranslated region Esngl – single exon (intronless) (translation start -> stop codon) Einit – initial exon (translation start -> donor splice site) Ek – phase k internal exon (acceptor splice site -> donor splice site) Eterm – terminal exon (acceptor splice site -> stop codon) Ik – phase k intron: 0 – between codons; 1 – after the first base of a codon; 2 – after the second base of a codon

65 Sensitivity vs. Specificity (adapted from Burset&Guigo 1996)
Accuracy Measures Sensitivity vs. Specificity (adapted from Burset&Guigo 1996) TP FP TN FN TP FN TN Actual Predicted Coding / No Coding TN FN FP TP No Coding / Coding Evaluation Statistics sensitivity: how many does your program predict to be “genes” for all the known genes in your test set specificity: among the ones your program predicts to be “genes”, how many of them are actually real genes CC takes into account a possible difference in the sizes of coding and non-coding sets Sensitivity (Sn) Fraction of actual coding regions that are correctly predicted as coding Specificity (Sp) Fraction of the prediction that is actually correct Correlation Coefficient (CC) Combined measure of Sensitivity & Specificity Range: -1 (always wrong)  +1 (always right)

66 Test Datasets Sample Tests reported by Literature
Test on the set of 570 vertebrate gene seqs (Burset&Guigo 1996) as a standard for comparison of gene finding methods. Test on the set of 195 seqs of human, mouse or rat origin (named HMR195) (Rogic 2001). Paper: published by Rogic & Mackworth (2001) Evaluation of gene finding programs. Genome Research, 11: Source Details: 7 common computer programs, used for the identification of protein coding genes in eukaryotic genomic sequences, include: MZEF (Zhang 1997), HMMgene (krogh 1997), GENSCAN (Burge 1997), FGENES (Solovyev 1997), Genie (Kulp 1996), GeneMark (Borodovsky & McIninch 1993), Morgan (Salzberg 1998a). Steps: Search the Human Genome DB at NCBI -> Select the specified Dataset -> Input into the Web Implementations of the methods tested respectively -> Analyze the Output

67 Results: Accuracy Statistics
Table: Relative Performance (adapted from Rogic 2001) Complicating Factors for Comparison Gene finders were trained on data that had genes homologous to test seq. Percentage of overlap is varied Some gene finders were able to tune their methods for particular data Methods continue to be developed # of seqs - number of seqs effectively analyzed by each program; in parentheses is the number of seqs where the absence of gene was predicted; Sn -nucleotide level sensitivity; Sp - nucleotide level specificity; CC - correlation coefficient; ESn - exon level sensitivity; ESp - exon level specificity Comparing gene finders is difficult: What works best when? There is an active debate about the relative performance of gene finders. Burge and Karlin (1998) ignore HMMgene in their comparisons – emphasis is on GeneScan Stein (2001) discusses operation of GeneScan and ignores HMMgene. Kraemer et al (2001) find that GeneScan (and their algorithm FFG) are better than HMMgene on fungal DNA. In a more comprehensive recent comparison Rogic et al (2001) find that HMMgene and GeneScan perform equally well on mammalian data – but with different strengths. Needed Train and test methods on the same data. Do cross-validation (10% leave-out)

68 Why not Perfect? Gene Number Organism Exon and Feature Type
usually approximately correct, but may not Organism primarily for human/vertebrate seqs; maybe lower accuracy for non-vertebrates. ‘Glimmer’ & ‘GeneMark’ for prokaryotic or yeast seqs Exon and Feature Type Internal exons: predicted more accurately than Initial or Terminal exons; Exons: predicted more accurately than Poly-A or Promoter signals Biases in Test Set (Resulting statistics may not be representative) The Burset/Guigó (1996) dataset: Biased toward short genes with relatively simple exon/intron structure The Rogic (2001) dataset: DNA seqs: GenBank r (04/1999 <- 08/1997); source organism specified; consider genomic seqs containing exactly one gene; seqs>200kb were discarded; mRNA seqs and seqs containing pseudo genes or alternatively spliced genes were excluded. Gene Number: The number of genes predicted in a sequence is usually approximately correct but it may also happen that, for instance, a predicted gene splices together exons from two real genes, or vice versa. Organism: The program was designed primarily to predict genes in human/vertebrate genomic sequences: accuracy may be lower for non-vertebrates. For prokaryotic or yeast sequences, the programs ‘Glimmer’ (Salzberg 1998) and/or ‘GeneMark’ (Borodovsky & McIninch 1993) are recommended. Exon and Feature Type: As a rule, internal exons are predicted more accurately than initial or terminal exons, and exons are predicted more accurately than polyadenylation or promoter signals. Predicted promoters, in particular, are not reliable. If promoters are of primary interest, you may wish to try Martin Reese's NNPP program. Biases in Test Set: the resulting statistics may not be completely representative of the performance of the programs on typical genomic DNA sequences. The Burset/Guigó dataset: undoubtedly biased toward short genes with relatively simple exon/intron structure. The Rogic dataset: 1) DNA sequences extracted from GenBank release (April 1999) must be entered after August 1997; 2) the source organism as specified; 3) only genomic sequences containing exactly one gene were considered; 4) mRNA sequences and sequences containing pseudo genes or alternatively spliced genes were excluded; 5) sequences longer than 200kb were discarded because some programs can only accept sequences up to that length. Future Work The research is currently developing another program, GenomeScan, which is more accurate when a moderate or closely related protein seq is available.

69 What We Learned… Genes are complex structures which are difficult to predict with the required level of accuracy/confidence Different HMM-based approaches have been successfully used to address the gene finding problem: Building an architecture of an HMM is the hardest part, it should be biologically sound & easy to interpret Parameter estimation can be trapped in local optimum Viterbi algorithm can be used to find the most probable path/labels These approaches are still not perfect


Download ppt "6.096 – Algorithms for Computational Biology – Lecture 7"

Similar presentations


Ads by Google