Hidden Markov models and its application to bioinformatics.

Slides:



Advertisements
Similar presentations
Pattern Finding and Pattern Discovery in Time Series
Advertisements

Lecture 16 Hidden Markov Models. HMM Until now we only considered IID data. Some data are of sequential nature, i.e. have correlations have time. Example:
Hidden Markov Models (1)  Brief review of discrete time finite Markov Chain  Hidden Markov Model  Examples of HMM in Bioinformatics  Estimations Basic.
HIDDEN MARKOV MODELS IN COMPUTATIONAL BIOLOGY CS 594: An Introduction to Computational Molecular Biology BY Shalini Venkataraman Vidhya Gunaseelan.
Ulf Schmitz, Statistical methods for aiding alignment1 Bioinformatics Statistical methods for pattern searching Ulf Schmitz
HMM II: Parameter Estimation. Reminder: Hidden Markov Model Markov Chain transition probabilities: p(S i+1 = t|S i = s) = a st Emission probabilities:
Learning HMM parameters
Hidden Markov Model.
Hidden Markov Models.
Hidden Markov Models.
MNW2 course Introduction to Bioinformatics
 CpG is a pair of nucleotides C and G, appearing successively, in this order, along one DNA strand.  CpG islands are particular short subsequences in.
Patterns, Profiles, and Multiple Alignment.
Hidden Markov Models Modified from:
Hidden Markov Models: Applications in Bioinformatics Gleb Haynatzki, Ph.D. Creighton University March 31, 2003.
Hidden Markov Models Ellen Walker Bioinformatics Hiram College, 2008.
Statistical NLP: Lecture 11
Profiles for Sequences
Hidden Markov Models Theory By Johan Walters (SR 2003)
Statistical NLP: Hidden Markov Models Updated 8/12/2005.
Hidden Markov Models 1 2 K … 1 2 K … 1 2 K … … … … 1 2 K … x1x1 x2x2 x3x3 xKxK 2 1 K 2.
Hidden Markov Models Usman Roshan BNFO 601.
. Hidden Markov Model Lecture #6. 2 Reminder: Finite State Markov Chain An integer time stochastic process, consisting of a domain D of m states {1,…,m}
درس بیوانفورماتیک December 2013 مدل ‌ مخفی مارکوف و تعمیم ‌ های آن به نام خدا.
Biochemistry and Molecular Genetics Computational Bioscience Program Consortium for Comparative Genomics University of Colorado School of Medicine
Lecture 6, Thursday April 17, 2003
Hidden Markov Models. Two learning scenarios 1.Estimation when the “right answer” is known Examples: GIVEN:a genomic region x = x 1 …x 1,000,000 where.
Hidden Markov Models Pairwise Alignments. Hidden Markov Models Finite state automata with multiple states as a convenient description of complex dynamic.
Hidden Markov Models. Two learning scenarios 1.Estimation when the “right answer” is known Examples: GIVEN:a genomic region x = x 1 …x 1,000,000 where.
Hidden Markov Models I Biology 162 Computational Genetics Todd Vision 14 Sep 2004.
. Hidden Markov Model Lecture #6 Background Readings: Chapters 3.1, 3.2 in the text book, Biological Sequence Analysis, Durbin et al., 2001.
HIDDEN MARKOV MODELS IN MULTIPLE ALIGNMENT. 2 HMM Architecture Markov Chains What is a Hidden Markov Model(HMM)? Components of HMM Problems of HMMs.
Hidden Markov Models 1 2 K … 1 2 K … 1 2 K … … … … 1 2 K … x1x1 x2x2 x3x3 xKxK 2 1 K 2.
Hidden Markov Models: an Introduction by Rachel Karchin.
. Hidden Markov Model Lecture #6 Background Readings: Chapters 3.1, 3.2 in the text book, Biological Sequence Analysis, Durbin et al., 2001.
Master’s course Bioinformatics Data Analysis and Tools
HIDDEN MARKOV MODELS IN MULTIPLE ALIGNMENT
. Class 5: HMMs and Profile HMMs. Review of HMM u Hidden Markov Models l Probabilistic models of sequences u Consist of two parts: l Hidden states These.
Hidden Markov Models K 1 … 2. Outline Hidden Markov Models – Formalism The Three Basic Problems of HMMs Solutions Applications of HMMs for Automatic Speech.
Forward-backward algorithm LING 572 Fei Xia 02/23/06.
Hidden Markov Models 1 2 K … x1 x2 x3 xK.
Genome evolution: a sequence-centric approach Lecture 3: From Trees to HMMs.
Hidden Markov Models David Meir Blei November 1, 1999.
Hidden Markov models Sushmita Roy BMI/CS 576 Oct 16 th, 2014.
Learning HMM parameters Sushmita Roy BMI/CS 576 Oct 21 st, 2014.
. Class 5: Hidden Markov Models. Sequence Models u So far we examined several probabilistic model sequence models u These model, however, assumed that.
Hidden Markov Model Continues …. Finite State Markov Chain A discrete time stochastic process, consisting of a domain D of m states {1,…,m} and 1.An m.
1 Markov Chains. 2 Hidden Markov Models 3 Review Markov Chain can solve the CpG island finding problem Positive model, negative model Length? Solution:
Probabilistic Sequence Alignment BMI 877 Colin Dewey February 25, 2014.
Combined Lecture CS621: Artificial Intelligence (lecture 25) CS626/449: Speech-NLP-Web/Topics-in- AI (lecture 26) Pushpak Bhattacharyya Computer Science.
CSCE555 Bioinformatics Lecture 6 Hidden Markov Models Meeting: MW 4:00PM-5:15PM SWGN2A21 Instructor: Dr. Jianjun Hu Course page:
MNW2 course Introduction to Bioinformatics Lecture 22: Markov models Centre for Integrative Bioinformatics FEW/FALW
Scoring Matrices Scoring matrices, PSSMs, and HMMs BIO520 BioinformaticsJim Lund Reading: Ch 6.1.
Fundamentals of Hidden Markov Model Mehmet Yunus Dönmez.
Hidden Markov Models Yves Moreau Katholieke Universiteit Leuven.
Hidden Markov Models Usman Roshan CS 675 Machine Learning.
HMMs for alignments & Sequence pattern discovery I519 Introduction to Bioinformatics.
S. Salzberg CMSC 828N 1 Three classic HMM problems 2.Decoding: given a model and an output sequence, what is the most likely state sequence through the.
PGM 2003/04 Tirgul 2 Hidden Markov Models. Introduction Hidden Markov Models (HMM) are one of the most common form of probabilistic graphical models,
Hidden Markov Models 1 2 K … 1 2 K … 1 2 K … … … … 1 2 K … x1x1 x2x2 x3x3 xKxK 2 1 K 2.
1 MARKOV MODELS MARKOV MODELS Presentation by Jeff Rosenberg, Toru Sakamoto, Freeman Chen HIDDEN.
CZ5226: Advanced Bioinformatics Lecture 6: HHM Method for generating motifs Prof. Chen Yu Zong Tel:
Construction of Substitution matrices
Hidden Markov Models (HMMs) –probabilistic models for learning patterns in sequences (e.g. DNA, speech, weather, cards...) (2 nd order model)
Hidden Markov Model Parameter Estimation BMI/CS 576 Colin Dewey Fall 2015.
Hidden Markov Models. A Hidden Markov Model consists of 1.A sequence of states {X t |t  T } = {X 1, X 2,..., X T }, and 2.A sequence of observations.
Definition of the Hidden Markov Model A Seminar Speech Recognition presentation A Seminar Speech Recognition presentation October 24 th 2002 Pieter Bas.
4.2 - Algorithms Sébastien Lemieux Elitra Canada Ltd.
Visual Recognition Tutorial1 Markov models Hidden Markov models Forward/Backward algorithm Viterbi algorithm Baum-Welch estimation algorithm Hidden.
CSE 5290: Algorithms for Bioinformatics Fall 2009
Presentation transcript:

Hidden Markov models and its application to bioinformatics

Overview n Hidden Markov models (HMMs) –A problem in bioinformatics solved by HMMs Multiple alignments –Standard algorithms for HMMs Algorithm for finding the most likely state transition, called the Viterbi algorithm Algorithm for learning parameters from data, called the Baum-Welch algorithm

Problem in this talk (1/2) n Finding conserved regions of proteins (amino acid sequences) –Different species can have (almost) the same functional proteins that shares common amino acid subsequences. Ancestor mgdv.. mgpv.. Time Amino acid sequence of the ancestor mgpg..

Problem in this talk (2/2) n Finding conserved regions of amino acid seqs. –Different species can have common subsequences of amino acid sequences in the same functional protein. Some amino acids were changed in evolutionary process. Example) Amino acid seqs. of cytochrome C, a protein that transfers electrons for oxygen breathing. Find common parts in multiple sequences efficiently. Problem to be solved Common subseq. = conserved because they are functionally important? human mgdvekgkki fimkcsqcht vekggkhktg pnlhglfgrk... mouse mgdvekgkki fvqkcaqcht vekggkhktg pnlhglfgrk... fly mgvpagdvek gkklfvqrca qchtveaggk hkvgpnlhgl...

Comparison of sequences n Arrange sequences s.t. # matched characters is maximized. –Align sequences with gaps “ -. ” –This process is called alignment. Simply listed sequences mgdvekgkki fimkcsqcht.. mgdvekgkki fvqkcaqcht.. mgvpagdvek gkklfvqrca.. Sequences with gaps mg----dvek gkkifimkcsqcht.. mg----dvek gkkifvqkcaqcht.. mgvpagdvek gkklfvqrca..

Approaches to alignments N: # seqs., L: max. length of seqs., M: # states in an HMM. Dynamic programming Hidden Markov models (HMMs) Best Alignment # sequences in practice Computation Time Can be found Often found in practice N (# seqs) Time DP HMM O(2 N L N )O(NM 2 L) Only a few Dozens seqs. applicable

Hidden Markov models n We move from a state to a state probabilistically. n Markov property holds; –A state transition and an outputted symbol are dependent on only the current state. Example of HMM a: 0.2 b: 0.8 a: 0.6 b: 0.4 Time course Time 1 a 32 b 1 b

Alignment with HMM n [Idea] –A state of HMM = a position of alignment –Example 1 g 23 r 1 g 3 ka gar... g-k... Arginine Lysine Similar amino acids

Arginine and Lysine ArginineLysine - COO H3NH3N + CH NH 3 CH 2 + COO - H3NH3N + CH C CH 2 HN NH 3 NH 2 + Serine COO - H3NH3N + CH CH 3 COHH - COO H3NH3N + CH H Glycine

Alignment with HMM n [Idea] –A state of HMM = a position of alignment. –Example 1 g 23 r 1 g 3 k a gar... g-k... Arginine Lysine Similar amino acids Profile HMM HMM can describe similar amino acids with prob. and states.

Profile HMM n Each state represents difference (insertion, deletion) of symbols from a basis sequence. m0m0 i0i0 d1d1 m1m1 i1i1 d2d2 m2m2 i2i2 m3m3 State as match (a symbol is output) State as insertion (a symbol is output) State as deletion (no symbol is output) A basis seq. A-KVG Inserted symbol Deleted symbol ASR-G Another seq.

Matched symbols Alignment with HMM n State transition corresponds to alignments. A - K V G A - R V G A S R - G State transitions m1m1 m2m2 m3m3 m0m0 A KVG m1m1 m2m2 m3m3 m0m0 A RVG m1m1 d2d2 m3m3 m0m0 A RG i0i0 S m0m0 i0i0 d1d1 m1m1 i1i1 d2d2 m2m2 i2i2 m3m3

Overview n Hidden Markov models (HMM) –A problem in bioinformatics solved by HMMs Multiple alignments –Standard algorithms for HMMs Algorithm for finding the most likely state transition, called the Viterbi algorithm Algorithm for learning parameters from data, called the Baum-Welch algorithm

Prediction of the best state transition Algorithm for prediction Multiple sequences AKVG ARVG ASRG m0m0 i0i0 d1d1 m1m1 i1i1 d2d2 m2m2 i2i2 m3m3 Hidden Markov model State transition that maximizes the probability m1m1 m2m2 m3m3 m0m0 A KVG m1m1 m2m2 m3m3 m0m0 A RVG m1m1 d2d2 m3m3 m0m0 A RG i0i0 S

Enumeration n Compute probabilities for all possible state trans. Seq. aba a b a a b a a b a HMM a: 0.2 b: 0.8 a: 0.6 b: 0.4 a: 0.6 b: 0.4 (#states) length Impossible to compute in practice.

To find the best state transition N: # seqs., L: max. length of seqs., M: #states in HMM. Enumeration Viterbi algorithm State trans. with max. prob. Length of seqs in practice Comp. time Can be found O(NM L )O(NM 2 L) Short only Longer seqs. applicable Can be found L (length of seqs.) Time Enumeration Viterbi

Viterbi algorithm (1/4) n [Idea]: Combine state transitions. –Transition probabilities and output probabilities are independent from past states. Symbol a ba

Viterbi algorithm (2/4) n (1). Computing prob. of state transitions. Init. Prob steps Trans. Prob symbols a ba output Prob

Viterbi algorithm (2/4) n (1). Computing prob. of state transitions. Init. Prob steps Trans. Prob symbols a ba Output Prob

Viterbi algorithm (2/4) n (1). Computing prob. of state transitions. Init Prob step Trans. Prob symbol a ba Output Prob

Viterbi algorithm (3/4) n (2). Tracing the state transition with max. prob. Init Prob step Trans. Prob symbol a ba Output Prob

Viterbi algorithm (4/4) n Computing time: O(NM 2 L) –At each node, it takes O(M) time. –# nodes for a sequence is O(ML). step Init Prob Trans. Prob symbols a ba Output Prob

Appropriate parameters n When parameters change, the best state transition can also change. Init Prob step Trans. Prob symbol a ba Output Prob

Overview n Hidden Markov models (HMM) –A problem in bioinformatics solved by HMMs Multiple alignments –Standard algorithms for HMMs Algorithm for finding the most likely state transition, called the Viterbi algorithm Algorithm for learning parameters from data, called the Baum-Welch algorithm

Learning (training) algorithm n Algorithm to find appropriate parameters –Baum-Welch algorithm Instance of EM (Expectation-Maximization) algorithms. Set initial parameters at random. # updates Likelihood P(X| h ) Update parameters Increase of likelihood< e Output parameters yes no Flow of the B-W algorithm The update always increase the likelihood P(X| h ), where X is a set of sequences. The expectations of # Parameters are used.

Appropriate parameters n Probabilistic parameters –Better: Given data is generated with higher prob. Casting dice 30 times Prob. Parameters (1)Prob. Parameters (2) Prob. we observe the above 30 casts. (1/6) 30 (1/3) 30 < Spots #Spots 1 1/6 2 1/6 3 1/6 4 1/6 5 1/6 6 1/6 Prob.Spots 1 1/ / /3 6 0 Prob.

# occurrence of parameters n In updating trans. prob. a k,l –# occurrence of transition from state k to state l. An state transition x1x1 x L-1 kl xLxL x L-2 An state transition x1x1 x2x2 kl xLxL x3x3 Prob = A k,l a k,l Expectation of occurrence of Value of parameter updated

e l (x i+1 ) x i+1 a k,l Forward prob. f k (i) Computing # occurrence of param. n Expectation of # occurrence of state transition from state k to state l. l x i-1 xixi x1x1 k A state transition x i+2 A state transition xLxL Backward prob. b k (i +1)

a 1,k Forward probability n f k (i): forward probability A state transition x1x1 x2x2 x i-1 k xixi = + + x1x1 x i-2 x i-1 k xixi 1 x1x1 x i-2 x i-1 k xixi M f 1 (i-1) ek (xi)ek (xi) f M (i-1) a M,k ek (xi)ek (xi)

Backward probl n b k (i): backward probability. = + + x i+2 x i+1 k xLxL M b M (i+1) A state transition x L-1 x i+1 k xLxL a k, 1 x i+2 k xLxL 1 x i+1 b 1 (i+1) ek (xi)ek (xi) a k,M ek (xi)ek (xi)

Forward/Backward probabilities n Time to compute them at one sequence a M,k ek (xi)ek (xi) a 1,k A state transition x1x1 x2x2 x i-1 k xixi = x1x1 x i-2 x i-1 k xixi + + x1x1 x i-2 x i-1 k xixi 1 M f 1 (i-1) f M (i-1) ek (xi)ek (xi) fk(i)fk(i) k: M variation, i: L variation. Comp. O(M) times For each seq., it takes O(M 2 L) time.

Conclusion n Alignment of multiple sequences –To find conserved regions of protein sequences. n Hidden Markov models (HMM) –profile HMM Describes alignments of multiple sequences. –Prediction algorithm Viterbi algorithm –Learning (training) algorithm Baum-Welch algorithm –For efficiency, the forward and backward probabilities are used.