Sequence motifs, information content, logos, and HMM’s Morten Nielsen, CBS, BioSys, DTU.

Slides:



Advertisements
Similar presentations
Sequence motifs, information content, logos, and HMM’s
Advertisements

Artificial Neural Networks 1 Morten Nielsen Department of Systems Biology, DTU.
Artificial Neural Networks 1 Morten Nielsen Department of Systems Biology, DTU IIB-INTECH, UNSAM, Argentina.
CENTER FOR BIOLOGICAL SEQUENCE ANALYSISTECHNICAL UNIVERSITY OF DENMARK DTU T cell Epitope predictions using bioinformatics (Hidden Markov models) Morten.
Immune system overview in 10 minutes The non-immunologist guide to the immune system Morten Nielsen Department of Systems Biology DTU.
CENTER FOR BIOLOGICAL SEQUENCE ANALYSISTECHNICAL UNIVERSITY OF DENMARK DTU Sequence motifs, information content, logos, and HMM’s Morten Nielsen, CBS,
CENTER FOR BIOLOGICAL SEQUENCE ANALYSISTECHNICAL UNIVERSITY OF DENMARK DTU T cell Epitope predictions using bioinformatics (Neural Networks and hidden.
Immune system overview in 10 minutes The non-immunologist guide to the immune system.
CENTER FOR BIOLOGICAL SEQUENCE ANALYSISTECHNICAL UNIVERSITY OF DENMARK DTU Sequence information, logos and Hidden Markov Models Morten Nielsen, CBS, BioCentrum,
Sequence motifs, information content, logos, and Weight matrices
Prediction of T cell epitopes using artificial neural networks
MHC binding and MHC polymorphism Or Finding the needle in the haystack.
MHC binding and MHC polymorphism. MHC-I molecules present peptides on the surface of most cells.
Morten Nielsen, CBS, BioCentrum, DTU
Sequence motifs, information content, logos, and HMM’s Morten Nielsen, CBS, BioCentrum, DTU.
Immunological Bioinformatics Or Finding the needle in the haystack Morten Nielsen
CENTER FOR BIOLOGICAL SEQUENCE ANALYSISTECHNICAL UNIVERSITY OF DENMARK DTU T cell Epitope predictions using bioinformatics (Neural Networks and hidden.
Sequence motifs, information content, and sequence logos Morten Nielsen, CBS, Depart of Systems Biology, DTU.
Hidden Markov Models What are the good for? Morten Nielsen CBS.
Hidden Markov Models, HMM’s Morten Nielsen, CBS, Department of Systems Biology, DTU.
Profile Hidden Markov Models Bioinformatics Fall-2004 Dr Webb Miller and Dr Claude Depamphilis Dhiraj Joshi Department of Computer Science and Engineering.
Profiles for Sequences
Bioinformatics Finding signals and motifs in DNA and proteins Expectation Maximization Algorithm MEME The Gibbs sampler Lecture 10.
Sequence motifs, information content, logos, and Weight matrices Morten Nielsen, CBS, BioCentrum, DTU.
Characterizing receptor ligand interactions Morten Nielsen, CBS, Depart of Systems Biology, DTU.
Biological sequence analysis and information processing by artificial neural networks Morten Nielsen CBS.
Heuristic alignment algorithms and cost matrices
Artificial Neural Networks 1 Morten Nielsen Department of Systems Biology, DTU.
Sequence motifs, information content, logos, and HMM’s Morten Nielsen, CBS, BioCentrum, DTU.
Hidden Markov Models: an Introduction by Rachel Karchin.
Protein Fold recognition Morten Nielsen, Thomas Nordahl CBS, BioCentrum, DTU.
Lecture 9 Hidden Markov Models BioE 480 Sept 21, 2004.
Immunological Bioinformatics Introduction to the immune system.
Immunological Bioinformatics. The Immunological Bioinformatics group Immunological Bioinformatics group, CBS, Technical University of Denmark (
CENTER FOR BIOLOGICAL SEQUENCE ANALYSISTECHNICAL UNIVERSITY OF DENMARK DTU Sequence motifs, information content, logos, and HMM’s Morten Nielsen, CBS,
CENTER FOR BIOLOGICAL SEQUENCE ANALYSISTECHNICAL UNIVERSITY OF DENMARK DTU Sequence motifs, information content, logos, and HMM’s Morten Nielsen, CBS,
Similar Sequence Similar Function Charles Yan Spring 2006.
Sequence motifs, information content, logos, and HMM’s Morten Nielsen, CBS, BioSys, DTU.
Psi-Blast Morten Nielsen, CBS, Department of Systems Biology, DTU.
Sequence motifs, information content, logos, and HMM’s Morten Nielsen, CBS, BioCentrum, DTU.
Hidden Markov Models, HMM’s Morten Nielsen, CBS, BioSys, DTU.
Blast heuristics Morten Nielsen Department of Systems Biology, DTU.
Viterbi once again! Model generates numbers – :1/6 2:1/6 3:1/6 4:1/6 5:1/6 6:1/6 Fair 1:1/10 2:1/10 3:1/10 4:1/10 5:1/10 6:1/2 Loaded 0.95.
CSCE555 Bioinformatics Lecture 6 Hidden Markov Models Meeting: MW 4:00PM-5:15PM SWGN2A21 Instructor: Dr. Jianjun Hu Course page:
Hidden Markov Models for Sequence Analysis 4
Scoring Matrices Scoring matrices, PSSMs, and HMMs BIO520 BioinformaticsJim Lund Reading: Ch 6.1.
Sequence analysis: Macromolecular motif recognition Sylvia Nagl.
Motif finding with Gibbs sampling CS 466 Saurabh Sinha.
Hidden Markov Models Yves Moreau Katholieke Universiteit Leuven.
Sequence encoding, Cross Validation Morten Nielsen BioSys, DTU
Hidden Markov Models, HMM’s Morten Nielsen, CBS, BioSys, DTU.
Construction of Substitution Matrices
HMMs for alignments & Sequence pattern discovery I519 Introduction to Bioinformatics.
Bioinformatics Ayesha M. Khan 9 th April, What’s in a secondary database?  It should be noted that within multiple alignments can be found conserved.
Artificial Neural Networks 1 Morten Nielsen Department of Systems Biology, DTU.
Dealing with Sequence redundancy Morten Nielsen Department of Systems Biology, DTU.
Hidden Markov Models, HMM’s
Weight matrices, Sequence motifs, information content, and sequence logos Morten Nielsen, CBS, Department of Systems Biology, DTU and Instituto de Investigaciones.
Hidden Markov model BioE 480 Sept 16, In general, we have Bayes theorem: P(X|Y) = P(Y|X)P(X)/P(Y) Event X: the die is loaded, Event Y: 3 sixes.
Psi-Blast Morten Nielsen, Department of systems biology, DTU.
Blast heuristics, Psi-Blast, and Sequence profiles Morten Nielsen Department of systems biology, DTU.
Prediction of T cell epitopes using artificial neural networks Morten Nielsen, CBS, BioCentrum, DTU.
Sequence motifs, information content, logos, and HMM’s
Immunological Bioinformatics
Motifs, logos, and Profile HMM’s
Sequence motifs, information content, and sequence logos
Immunological Bioinformatics
Sequence motifs, information content, logos, and HMM’s
Sequence motifs, information content, and sequence logos
Presentation transcript:

Sequence motifs, information content, logos, and HMM’s Morten Nielsen, CBS, BioSys, DTU

Objectives Visualization of binding motifs –Construction of sequence logos Understand the concepts of weight matrix construction –One of the most important methods of bioinformatics Introduce Hidden Markov models and understand that they are just weight matrices with gaps

Outline Pattern recognition –Regular expressions and probabilities Information content –Sequence logos Multiple alignment and sequence motifs Weight matrix construction –Sequence weighting –Low (pseudo) counts Examples from the real world HMM’s –Viterbi decoding Profile HMMs Links to HMM packages

Anchor positions Binding Motif. MHC class I with peptide

SLLPAIVEL YLLPAIVHI TLWVDPYEV GLVPFLVSV KLLEPVLLL LLDVPTAAV LLDVPTAAV LLDVPTAAV LLDVPTAAV VLFRGGPRG MVDGTLLLL YMNGTMSQV MLLSVPLLL SLLGLLVEV ALLPPINIL TLIKIQHTL HLIDYLVTS ILAPPVVKL ALFPQLVIL GILGFVFTL STNRQSGRQ GLDVLTAKV RILGAVAKV QVCERIPTI ILFGHENRV ILMEHIHKL ILDQKINEV SLAGGIIGV LLIENVASL FLLWATAEA SLPDFGISY KKREEAPSL LERPGGNEI ALSNLEVKL ALNELLQHV DLERKVESL FLGENISNF ALSDHHIYL GLSEFTEYL STAPPAHGV PLDGEYFTL GVLVGVALI RTLDKVLEV HLSTAFARV RLDSYVRSL YMNGTMSQV GILGFVFTL ILKEPVHGV ILGFVFTLT LLFGYPVYV GLSPTVWLS WLSLLVPFV FLPSDFFPS CLGGLLTMV FIAGNSAYE KLGEFYNQM KLVALGINA DLMGYIPLV RLVTLKDIV MLLAVLYCL AAGIGILTV YLEPGPVTA LLDGTATLR ITDQVPFSV KTWGQYWQV TITDQVPFS AFHHVAREL YLNKIQNSL MMRKLAILS AIMDKNIIL IMDKNIILK SMVGNWAKV SLLAPGAKQ KIFGSLAFL ELVSEFSRM KLTPLCVTL VLYRYGSFS YIGEVLVSV CINGVCWTV VMNILLQYV ILTVILGVL KVLEYVIKV FLWGPRALV GLSRYVARL FLLTRILTI HLGNVKYLV GIAGGLALL GLQDCTMLV TGAPVTYST VIYQYMDDL VLPDVFIRC VLPDVFIRC AVGIGIAVV LVVLGLLAV ALGLGLLPV GIGIGVLAA GAGIGVAVL IAGIGILAI LIVIGILIL LAGIGLIAA VDGIGILTI GAGIGVLTA AAGIGIIQI QAGIGILLA KARDPHSGH KACDPHSGH ACDPHSGHF SLYNTVATL RGPGRAFVT NLVPMVATV GLHCYEQLV PLKQHFQIV AVFDRKSDA LLDFVRFMG VLVKSPNHV GLAPPQHLI LLGRNSFEV PLTFGWCYK VLEWRFDSR TLNAWVKVV GLCTLVAML FIDSYICQV IISAVVGIL VMAGVGSPY LLWTLVVLL SVRDRLARL LLMDCSGSI CLTSTVQLV VLHDDLLEA LMWITQCFL SLLMWITQC QLSLLMWIT LLGATCMFV RLTRFLSRV YMDGTMSQV FLTPKKLQC ISNDVCAQV VKTDGNPPE SVYDFFVWL FLYGALLLA VLFSSDFRI LMWAKIGPV SLLLELEEV SLSRFSWGA YTAFTIPSI RLMKQDFSV RLPRIFCSC FLWGPRAYA RLLQETELV SLFEGIDFY SLDQSVVEL RLNMFTPYI NMFTPYIGV LMIIPLINV TLFIGSHVV SLVIVTTFV VLQWASLAV ILAKFLHWL STAPPHVNV LLLLTVLTV VVLGVVFGI ILHNGAYSL MIMVKCWMI MLGTHTMEV MLGTHTMEV SLADTNSLA LLWAARPRL GVALQTMKQ GLYDGMEHL KMVELVHFL YLQLVFGIE MLMAQEALA LMAQEALAF VYDGREHTV YLSGANLNL RMFPNAPYL EAAGIGILT TLDSQVMSL STPPPGTRV KVAELVHFL IMIGVLVGV ALCRWGLLL LLFAGVQCQ VLLCESTAV YLSTAFARV YLLEMLWRL SLDDYNHLV RTLDKVLEV GLPVEYLQV KLIANNTRV FIYAGSLSA KLVANNTRL FLDEFMEGV ALQPGTALL VLDGLDVLL SLYSFPEPE ALYVDSLFF SLLQHLIGL ELTLGEFLK MINAYLDKL AAGIGILTV FLPSDFFPS SVRDRLARL SLREWLLRI LLSAWILTA AAGIGILTV AVPDEIPPL FAYDGKDYI AAGIGILTV FLPSDFFPS AAGIGILTV FLPSDFFPS AAGIGILTV FLWGPRALV ETVSEQSNV ITLWQRPLV Sequence information

Sequence Information Say that a peptide must have L at P 2 in order to bind, and that A,F,W,and Y are found at P 1. Which position has most information? How many questions do I need to ask to tell if a peptide binds looking at only P 1 or P 2 ?

Sequence Information Say that a peptide must have L at P 2 in order to bind, and that A,F,W,and Y are found at P 1. Which position has most information? How many questions do I need to ask to tell if a peptide binds looking at only P 1 or P 2 ? P1: 4 questions (at most) P2: 1 question (L or not) P2 has the most information

Sequence Information Calculate p a at each position Entropy Information content Conserved positions –P V =1, P !v =0 => S=0, I=log(20) Mutable positions –P aa =1/20 => S=log(20), I=0 Say that a peptide must have L at P 2 in order to bind, and that A,F,W,and Y are found at P 1. Which position has most information? How many questions do I need to ask to tell if a peptide binds looking at only P 1 or P 2 ? P1: 4 questions (at most) P2: 1 question (L or not) P2 has the most information

Information content A R N D C Q E G H I L K M F P S T W Y V S I

Sequence logos Height of a column equal to I Relative height of a letter is p Highly useful tool to visualize sequence motifs High information positions HLA-A0201

Characterizing a binding motif from small data sets What can we learn? 1.A at P1 favors binding? 2.I is not allowed at P9? 3.K at P4 favors binding? 4.Which positions are important for binding? ALAKAAAAM ALAKAAAAN ALAKAAAAR ALAKAAAAT ALAKAAAAV GMNERPILT GILGFVFTM TLNAWVKVV KLNEPVLLL AVVPFIVSV 10 MHC restricted peptides

Simple motifs Yes/No rules ALAKAAAAM ALAKAAAAN ALAKAAAAR ALAKAAAAT ALAKAAAAV GMNERPILT GILGFVFTM TLNAWVKVV KLNEPVLLL AVVPFIVSV 10 MHC restricted peptides Only 11 of 212 peptides identified! Need more flexible rules If not fit P1 but fit P2 then ok Not all positions are equally important We know that P2 and P9 determines binding more than other positions Cannot discriminate between good and very good binders

Simple motifs Yes/No rules Example Two first peptides will not fit the motif. They are all good binders (aff< 500nM) RLLDDTPEV 84 nM GLLGNVSTV 23 nM ALAKAAAAL 309 nM ALAKAAAAM ALAKAAAAN ALAKAAAAR ALAKAAAAT ALAKAAAAV GMNERPILT GILGFVFTM TLNAWVKVV KLNEPVLLL AVVPFIVSV 10 MHC restricted peptides

Extended motifs Fitness of aa at each position given by P(aa) Example P1 P A = 6/10 P G = 2/10 P T = P K = 1/10 P C = P D = …P V = 0 Problems –Few data –Data redundancy/duplication ALAKAAAAM ALAKAAAAN ALAKAAAAR ALAKAAAAT ALAKAAAAV GMNERPILT GILGFVFTM TLNAWVKVV KLNEPVLLL AVVPFIVSV RLLDDTPEV 84 nM GLLGNVSTV 23 nM ALAKAAAAL 309 nM

Sequence information Raw sequence counting ALAKAAAAM ALAKAAAAN ALAKAAAAR ALAKAAAAT ALAKAAAAV GMNERPILT GILGFVFTM TLNAWVKVV KLNEPVLLL AVVPFIVSV

Sequence weighting ALAKAAAAM ALAKAAAAN ALAKAAAAR ALAKAAAAT ALAKAAAAV GMNERPILT GILGFVFTM TLNAWVKVV KLNEPVLLL AVVPFIVSV Poor or biased sampling of sequence space Example P1 P A = 2/6 P G = 2/6 P T = P K = 1/6 P C = P D = …P V = 0 } Similar sequences Weight 1/5 RLLDDTPEV 84 nM GLLGNVSTV 23 nM ALAKAAAAL 309 nM

Sequence weighting ALAKAAAAM ALAKAAAAN ALAKAAAAR ALAKAAAAT ALAKAAAAV GMNERPILT GILGFVFTM TLNAWVKVV KLNEPVLLL AVVPFIVSV

Pseudo counts ALAKAAAAM ALAKAAAAN ALAKAAAAR ALAKAAAAT ALAKAAAAV GMNERPILT GILGFVFTM TLNAWVKVV KLNEPVLLL AVVPFIVSV I is not found at position P9. Does this mean that I is forbidden (P(I)=0)? No! Use Blosum substitution matrix to estimate pseudo frequency of I at P9

A R N D C Q E G H I L K M F P S T W Y V A R N D C Q E G H I L K M F P S T W Y V The Blosum matrix Some amino acids are highly conserved (i.e. C), some have a high change of mutation (i.e. I)

A R N D C Q E G H I L K M F P S T W Y V A R N D C …. Y V What is a pseudo count? Say V is observed at P2 Knowing that V at P2 binds, what is the probability that a peptide could have I at P2? P(I|V) = 0.16

Calculate observed amino acids frequencies f a Pseudo frequency for amino acid b Example ALAKAAAAM ALAKAAAAN ALAKAAAAR ALAKAAAAT ALAKAAAAV GMNERPILT GILGFVFTM TLNAWVKVV KLNEPVLLL AVVPFIVSV Pseudo count estimation

ALAKAAAAM ALAKAAAAN ALAKAAAAR ALAKAAAAT ALAKAAAAV GMNERPILT GILGFVFTM TLNAWVKVV KLNEPVLLL AVVPFIVSV Weight on pseudo count Pseudo counts are important when only limited data is available With large data sets only “true” observation should count  is the effective number of sequences (N-1),  is the weight on prior

Example If  large, p ≈ f and only the observed data defines the motif If  small, p ≈ g and the pseudo counts (or prior) defines the motif  is [50-200] normally ALAKAAAAM ALAKAAAAN ALAKAAAAR ALAKAAAAT ALAKAAAAV GMNERPILT GILGFVFTM TLNAWVKVV KLNEPVLLL AVVPFIVSV Weight on pseudo count

Sequence weighting and pseudo counts RLLDDTPEV 84nM GLLGNVSTV 23nM ALAKAAAAL 309nM P 7P and P 7S > 0 ALAKAAAAM ALAKAAAAN ALAKAAAAR ALAKAAAAT ALAKAAAAV GMNERPILT GILGFVFTM TLNAWVKVV KLNEPVLLL AVVPFIVSV

Position specific weighting We know that positions 2 and 9 are anchor positions for most MHC binding motifs –Increase weight on high information positions Motif found on large data set

Weight matrices Estimate amino acid frequencies from alignment including sequence weighting and pseudo count What do the numbers mean? –P2(V)>P2(M). Does this mean that V enables binding more than M. –In nature not all amino acids are found equally often In nature V is found more often than M, so we must somehow rescale with the background q M = 0.025, q V = Finding 7% V is hence not significant, but 7% M highly significant A R N D C Q E G H I L K M F P S T W Y V

Weight matrices A weight matrix is given as W ij = log(p ij /q j ) –where i is a position in the motif, and j an amino acid. q j is the background frequency for amino acid j. W is a L x 20 matrix, L is motif length A R N D C Q E G H I L K M F P S T W Y V

Score sequences to weight matrix by looking up and adding L values from the matrix A R N D C Q E G H I L K M F P S T W Y V Scoring a sequence to a weight matrix RLLDDTPEV GLLGNVSTV ALAKAAAAL Which peptide is most likely to bind? Which peptide second? nM 23nM 309nM

An example!! (See handout)

Estimation of pseudo counts

Example from real life 10 peptides from MHCpep database Bind to the MHC complex Relevant for immune system recognition Estimate sequence motif and weight matrix Evaluate motif “correctness” on 528 peptides ALAKAAAAM ALAKAAAAN ALAKAAAAR ALAKAAAAT ALAKAAAAV GMNERPILT GILGFVFTM TLNAWVKVV KLNEPVLLL AVVPFIVSV

Prediction accuracy Pearson correlation 0.45 Prediction score Measured affinity

Predictive performance

End of first part Take a deep breath Smile to you neighbor

Hidden Markov Models Weight matrices do not deal with insertions and deletions In alignments, this is done in an ad-hoc manner by optimization of the two gap penalties for first gap and gap extension HMM is a natural frame work where insertions/deletions are dealt with explicitly

Why hidden? Model generates numbers – Does not tell which die was used Alignment (decoding) can give the most probable solution/path (Viterby) –FFFFFFLLLLLL Or most probable set of states –FFFFFFLLLLLL 1:1/6 2:1/6 3:1/6 4:1/6 5:1/6 6:1/6 Fair 1:1/10 2:1/10 3:1/10 4:1/10 5:1/10 6:1/2 Loaded The unfair casino: Loaded die p(6) = 0.5; switch fair to load:0.05; switch load to fair: 0.1

HMM (a simple example) ACA---ATG TCAACTATC ACAC--AGC AGA---ATC ACCG--ATC Example from A. Krogh Core region defines the number of states in the HMM (red) Insertion and deletion statistics are derived from the non-core part of the alignment (black) Core of alignment

ACGTACGT ACGTACGT ACGTACGT ACGTACGT ACGTACGT ACGTACGT ACGTACGT HMM construction ACA---ATG TCAACTATC ACAC--AGC AGA---ATC ACCG--ATC 5 matches. A, 2xC, T, G 5 transitions in gap region C out, G out A-C, C-T, T out Out transition 3/5 Stay transition 2/5 ACA---ATG 0.8x1x0.8x1x0.8x0.4x1x1x0.8x1x0.2 = 3.3x10 -2

Align sequence to HMM ACA---ATG 0.8x1x0.8x1x0.8x0.4x1x0.8x1x0.2 = 3.3x10 -2 TCAACTATC 0.2x1x0.8x1x0.8x0.6x0.2x0.4x0.4x0.4x0.2x0.6x1x1x0.8x1x0.8 = x10 -2 ACAC--AGC = 1.2x10 -2 Consensus: ACAC--ATC = 4.7x10 -2, ACA---ATC = 13.1x10 -2 Exceptional: TGCT--AGG = x10 -2

Align sequence to HMM - Null model Score depends strongly on length Null model is a random model. For length L the score is 0.25 L Log-odds score for sequence S Log( P(S)/0.25 L ) Positive score means more likely than Null model ACA---ATG = 4.9 TCAACTATC = 3.0 ACAC--AGC = 5.3 AGA---ATC = 4.9 ACCG--ATC = 4.6 Consensus: ACAC--ATC = 6.7 ACA---ATC = 6.3 Exceptional: TGCT--AGG = Note!

Aligning a sequence to an HMM Find the path through the HMM states that has the highest probability For alignment, we found the path through the scoring matrix that had the highest sum of scores The number of possible paths rapidly gets very large making brute force search infeasible Just like checking all path for alignment did not work Use dynamic programming The Viterbi algorithm does the job

The Viterbi algorithm Model generates numbers – :1/6 2:1/6 3:1/6 4:1/6 5:1/6 6:1/6 Fair 1:1/10 2:1/10 3:1/10 4:1/10 5:1/10 6:1/2 Loaded The unfair casino: Loaded dice p(6) = 0.5; switch fair to load:0.05; switch load to fair: 0.1

Model decoding (Viterbi) Example: 566. What was the series of dice used to generate this output? 1:1/6 2:1/6 3:1/6 4:1/6 5:1/6 6:1/6 Fair 1:1/10 2:1/10 3:1/10 4:1/10 5:1/10 6:1/2 Loaded FFF = 0.5*0.167*0.95*0.167*0.95*0.167 = FFL = 0.5*0.167*0.95*0.167*0.05*0.5 = FLF = 0.5*0.167*0.05*0.5*0.1*0.167 = FLL = 0.5*0.167*0.05*0.5*0.9*0.5 = LFF = 0.5*0.1*0.1*0.167*0.95*0.167 = LFL = 0.5*0.1*0.1*0.167*0.05*0.5 = LLF = 0.5*0.1*0.9*0.5*0.1*0.167 = LLL = 0.5*0.1*0.9*0.5*0.9*0.5 = Brute force

Or in log space Example: 566. What was the series of dice used to generate this output? Log(P(LLL|M)) = log(0.5*0.1*0.9*0.5*0.9*0.5) = Log(P(LLL|M)) = log(0.5)+log(0.1)+log(0.9)+log(0.5)+log(0.9)+log(0.5) Log(P(LLL|M)) = = : : : : : :-0.78 Fair 1:-1 2:-1 3:-1 4:-1 5:-1 6:-0.3 Loaded Log model

Model decoding (Viterbi) Example: What was the series of dice used to generate this output? F L : : : : : :-0.78 Fair 1:-1 2:-1 3:-1 4:-1 5:-1 6:-0.3 Loaded Log model

Model decoding (Viterbi) Example: What was the series of dice used to generate this output? F L : : : : : :-0.78 Fair 1:-1 2:-1 3:-1 4:-1 5:-1 6:-0.3 Loaded Log model FFF = 0.5*0.167*0.95*0.167*0.95*0.167 = Log(P(FFF))=-2.68 LLL = 0.5*0.1*0.9*0.5*0.9*0.5 = Log(P(LLL))=-1.99

Model decoding (Viterbi) Example: What was the series of dice used to generate this output? F L : : : : : :-0.78 Fair 1:-1 2:-1 3:-1 4:-1 5:-1 6:-0.3 Loaded Log model

Model decoding (Viterbi) Example: What was the series of dice used to generate this output? F L : : : : : :-0.78 Fair 1:-1 2:-1 3:-1 4:-1 5:-1 6:-0.3 Loaded Log model

Model decoding (Viterbi) Example: What was the series of dice used to generate this output? F L : : : : : :-0.78 Fair 1:-1 2:-1 3:-1 4:-1 5:-1 6:-0.3 Loaded Log model

Model decoding (Viterbi) Now we can formalize the algorithm! 1: : : : : :-0.78 Fair 1:-1 2:-1 3:-1 4:-1 5:-1 6:-0.3 Loaded Log model New match Old max score Transition

Model decoding (Viterbi). Example: What was the series of dice used to generate this output? Fill out the table using the Viterbi recursive algorithm –Add the arrows for backtracking Find the optimal path 1: : : : : :-0-78 Fair 1:-1 2:-1 3:-1 4:-1 5:-1 6:-0.3 Loaded Log model F L

Model decoding (Viterbi). Example: What was the series of dice used to generate this output? Fill out the table using the Viterbi recursive algorithm –Add the arrows for backtracking Find the optimal path 1: : : : : :-0-78 Fair 1:-1 2:-1 3:-1 4:-1 5:-1 6:-0.3 Loaded Log model F L LLLLFFFFF

HMM’s and weight matrices In the case of un-gapped alignments HMM’s become simple weight matrices To achieve high performance, the emission frequencies are estimated using the techniques of –Sequence weighting –Pseudo counts

Profile HMM’s Alignments based on conventional scoring matrices (BLOSUM62) scores all positions in a sequence in an equal manner Some positions are highly conserved, some are highly variable (more than what is described in the BLOSUM matrix) Profile HMM’s are ideal suited to describe such position specific variations

Sequence profiles TKAVVLTFNTSVEICLVMQGTSIV----AAESHPLHLHGFNFPSNFNLVDGMERNTAGVP

Example. (SGNH active site)

ADDGSLAFVPSEF--SISPGEKIVFKNNAGFPHNIVFDEDSIPSGVDASKISMSEEDLLN TVNGAI--PGPLIAERLKEGQNVRVTNTLDEDTSIHWHGLLVPFGMDGVPGVSFPG---I -TSMAPAFGVQEFYRTVKQGDEVTVTIT-----NIDQIED-VSHGFVVVNHGVSME---I IE--KMKYLTPEVFYTIKAGETVYWVNGEVMPHNVAFKKGIV--GEDAFRGEMMTKD--- -TSVAPSFSQPSF-LTVKEGDEVTVIVTNLDE------IDDLTHGFTMGNHGVAME---V ASAETMVFEPDFLVLEIGPGDRVRFVPTHK-SHNAATIDGMVPEGVEGFKSRINDE---- TVNGQ--FPGPRLAGVAREGDQVLVKVVNHVAENITIHWHGVQLGTGWADGPAYVTQCPI Sequence profiles Conserved Non-conserved Matching any thing but G => large negative score Any thing can match TKAVVLTFNTSVEICLVMQGTSIV----AAESHPLHLHGFNFPSNFNLVDGMERNTAGVP Insertion

Example. (SGNH active site)

HMM vs. alignment Detailed description of core –Conserved/variable positions Price for insertions/deletions varies at different locations in sequence These features cannot be captured in conventional alignments

Profile HMM’s All M/D pairs must be visited once L1- Y2A3V4R5- I6P1D2P3P4I4P5D6P7L1- Y2A3V4R5- I6P1D2P3P4I4P5D6P7

HMM packages HMMER ( –S.R. Eddy, WashU St. Louis. Freely available. SAM ( –R. Hughey, K. Karplus, A. Krogh, D. Haussler and others, UC Santa Cruz. Freely available to academia, nominal license fee for commercial users. META-MEME ( –William Noble Grundy, UC San Diego. Freely available. Combines features of PSSM search and profile HMM search. NET-ID, HMMpro ( –Freely available to academia, nominal license fee for commercial users. –Allows HMM architecture construction. EasyGibbs ( –Webserver for Gibbs sampling of proteins sequences