Finding Regulatory Motifs in DNA Sequences An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info.

Slides:



Advertisements
Similar presentations
Algorithm Analysis Input size Time I1 T1 I2 T2 …
Advertisements

Gene Regulation and Microarrays. Finding Regulatory Motifs Given a collection of genes with common expression, Find the TF-binding motif in common......
. Markov Chains. 2 Dependencies along the genome In previous classes we assumed every letter in a sequence is sampled randomly from some distribution.
Michael Alves, Patrick Dugan, Robert Daniels, Carlos Vicuna
DYNAMIC PROGRAMMING ALGORITHMS VINAY ABHISHEK MANCHIRAJU.
PREDetector : Prokaryotic Regulatory Element Detector Samuel Hiard 1, Sébastien Rigali 2, Séverine Colson 2, Raphaël Marée 1 and Louis Wehenkel 1 1 Bioinformatics.
Greedy Algorithms CS 6030 by Savitha Parur Venkitachalam.
Measuring the degree of similarity: PAM and blosum Matrix
Regulatory Motifs. Contents Biology of regulatory motifs Experimental discovery Computational discovery PSSM MEME.
. 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}
Bioinformatics Dr. Aladdin HamwiehKhalid Al-shamaa Abdulqader Jighly Lecture 3 Finding Motifs Aleppo University Faculty of technical engineering.
Motif Finding. Regulation of Genes Gene Regulatory Element RNA polymerase (Protein) Transcription Factor (Protein) DNA.
Branch and Bound Similar to backtracking in generating a search tree and looking for one or more solutions Different in that the “objective” is constrained.
Identification of a Novel cis-Regulatory Element Involved in the Heat Shock Response in Caenorhabditis elegans Using Microarray Gene Expression and Computational.
3 -1 Chapter 3 The Greedy Method 3 -2 The greedy method Suppose that a problem can be solved by a sequence of decisions. The greedy method has that each.
Pattern Discovery in RNA Secondary Structure Using Affix Trees (when computer scientists meet real molecules) Giulio Pavesi& Giancarlo Mauri Dept. of Computer.
Multiple Sequence Alignment Algorithms in Computational Biology Spring 2006 Most of the slides were created by Dan Geiger and Ydo Wexler and edited by.
L16: Micro-array analysis Dimension reduction Unsupervised clustering.
Finding Compact Structural Motifs Presented By: Xin Gao Authors: Jianbo Qian, Shuai Cheng Li, Dongbo Bu, Ming Li, and Jinbo Xu University of Waterloo,
Sequence Alignment Variations Computing alignments using only O(m) space rather than O(mn) space. Computing alignments with bounded difference Exclusion.
This material in not in your text (except as exercises) Sequence Comparisons –Problems in molecular biology involve finding the minimum number of edit.
Computational Biology, Part 2 Representing and Finding Sequence Features using Consensus Sequences Robert F. Murphy Copyright  All rights reserved.
Implementation of Planted Motif Search Algorithms PMS1 and PMS2 Clifford Locke BioGrid REU, Summer 2008 Department of Computer Science and Engineering.
6/29/20151 Efficient Algorithms for Motif Search Sudha Balla Sanguthevar Rajasekaran University of Connecticut.
Introduction to Bioinformatics Algorithms Finding Regulatory Motifs in DNA Sequences.
(Regulatory-) Motif Finding. Clustering of Genes Find binding sites responsible for common expression patterns.
Physical Mapping II + Perl CIS 667 March 2, 2004.
Finding Regulatory Motifs in DNA Sequences
Phylogenetic Tree Construction and Related Problems Bioinformatics.
Finding Regulatory Motifs in DNA Sequences. Motifs and Transcriptional Start Sites gene ATCCCG gene TTCCGG gene ATCCCG gene ATGCCG gene ATGCCC.
Introduction to Bioinformatics Algorithms Clustering and Microarray Analysis.
Motif finding: Lecture 1 CS 498 CXZ. From DNA to Protein: In words 1.DNA = nucleotide sequence Alphabet size = 4 (A,C,G,T) 2.DNA  mRNA (single stranded)
Multiple Sequence Alignment CSC391/691 Bioinformatics Spring 2004 Fetrow/Burg/Miller (Slides by J. Burg)
An Introduction to Bioinformatics
Motif Finding Kun-Pin Wu ( 巫坤品 ) Institute of Biomedical Informatics National Yang Ming University 2007/11/20.
© The McGraw-Hill Companies, Inc., Chapter 3 The Greedy Method.
Genetic Regulatory Network Inference Russell Schwartz Department of Biological Sciences Carnegie Mellon University.
MOTIFS MOTIFS MOTIFSMARTIFAMORIFSMOOTIFSMICIFC A sequence motif is a nucleotide or amino-acid sequence pattern that is widespread (repeated) and has.
Introduction to Bioinformatics Algorithms Finding Regulatory Motifs in DNA Sequences.
Analysis of Algorithms
Sequence Analysis CSC 487/687 Introduction to computing for Bioinformatics.
Motif finding with Gibbs sampling CS 466 Saurabh Sinha.
Outline More exhaustive search algorithms Today: Motif finding
CS5263 Bioinformatics Lecture 20 Practical issues in motif finding Final project.
Greedy Algorithms CS 498 SS Saurabh Sinha. A greedy approach to the motif finding problem Given t sequences of length n each, to find a profile matrix.
HMMs for alignments & Sequence pattern discovery I519 Introduction to Bioinformatics.
Computational Genomics and Proteomics Lecture 8 Motif Discovery C E N T R F O R I N T E G R A T I V E B I O I N F O R M A T I C S V U E.
BLAST: Basic Local Alignment Search Tool Altschul et al. J. Mol Bio CS 466 Saurabh Sinha.
Algorithm Analysis Data Structures and Algorithms (60-254)
Introduction to Bioinformatics Algorithms Finding Regulatory Motifs in DNA Sequences.
Intro to Alignment Algorithms: Global and Local Intro to Alignment Algorithms: Global and Local Algorithmic Functions of Computational Biology Professor.
Gene expression & Clustering. Determining gene function Sequence comparison tells us if a gene is similar to another gene, e.g., in a new species –Dynamic.
Exhaustive search (cont’d) CS 466 Saurabh Sinha. Finding motifs ab initio Enumerate all possible strings of some fixed (small) length For each such string.
Finding Regulatory Motifs in DNA Sequences
Motif Finding [1]: Ch , , 5.5,
. Finding Motifs in Promoter Regions Libi Hertzberg Or Zuk.
Sequence Alignment.
Introduction to Bioinformatics Algorithms Finding Regulatory Motifs in DNA Sequences.
HW4: sites that look like transcription start sites Nucleotide histogram Background frequency Count matrix for translation start sites (-10 to 10) Frequency.
Lecture 12 Huffman Algorithm. In computer science and information theory, a Huffman code is a particular type of optimal prefix code that is commonly.
Finding Motifs Vasileios Hatzivassiloglou University of Texas at Dallas.
More on HMMs and Multiple Sequence Alignment BMI/CS 776 Mark Craven March 2002.
Dynamic Programming for the Edit Distance Problem.
13 Text Processing Hongfei Yan June 1, 2016.
Learning Sequence Motif Models Using Expectation Maximization (EM)
Recitation 7 2/4/09 PSSMs+Gene finding
(Regulatory-) Motif Finding
3. Brute Force Selection sort Brute-Force string matching
CSE 5290: Algorithms for Bioinformatics Fall 2009
3. Brute Force Selection sort Brute-Force string matching
Presentation transcript:

Finding Regulatory Motifs in DNA Sequences An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Combinatorial Gene Regulation A microarray experiment showed that when gene X is knocked out, 20 other genes are not expressed A microarray experiment showed that when gene X is knocked out, 20 other genes are not expressed How can one gene have such drastic effects? How can one gene have such drastic effects? An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Regulatory Proteins Gene X encodes regulatory protein, a.k.a. a transcription factor (TF) Gene X encodes regulatory protein, a.k.a. a transcription factor (TF) The 20 unexpressed genes rely on gene X’s TF to induce transcription The 20 unexpressed genes rely on gene X’s TF to induce transcription A single TF may regulate multiple genes A single TF may regulate multiple genes An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Regulatory Regions Every gene contains a regulatory region (RR) typically stretching bp upstream of the transcriptional start site Every gene contains a regulatory region (RR) typically stretching bp upstream of the transcriptional start site Located within the RR are the Transcription Factor Binding Sites (TFBS), also known as motifs, specific for a given transcription factor Located within the RR are the Transcription Factor Binding Sites (TFBS), also known as motifs, specific for a given transcription factor TFs influence gene expression by binding to a specific location in the respective gene’s regulatory region - TFBS TFs influence gene expression by binding to a specific location in the respective gene’s regulatory region - TFBS An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Transcription Factor Binding Sites A TFBS can be located anywhere within the Regulatory Region. A TFBS can be located anywhere within the Regulatory Region. TFBS may vary slightly across different regulatory regions since non-essential bases could mutate TFBS may vary slightly across different regulatory regions since non-essential bases could mutate An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Motifs and Transcriptional Start Sites gene ATCCCG gene TTCCGG gene ATCCCG gene ATGCCG gene ATGCCC An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Transcription Factors and Motifs An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Motif Logo Motifs can mutate on non important bases Motifs can mutate on non important bases The five motifs in five different genes have mutations in position 3 and 5 The five motifs in five different genes have mutations in position 3 and 5 Representations called motif logos illustrate the conserved and variable regions of a motif Representations called motif logos illustrate the conserved and variable regions of a motifTGGGGGATGAGAGATGGGGGATGAGAGATGAGGGA An Introduction to Bioinformatics Algorithms (Jones and Pevzner) Information content I x at site x = 2 +  i p i log(p i ) where p i is frequency of base i at site x Examples For one nucleotide at a site: I x = * log(1) = 2 bits For two nucleotides at a site: I x = 2 + 1/2 * log(1/2) + 1/2 *log(1/2) = 1 bit For four nucleotides at a site: I x = (1/4 * log(1/4)) = 0 bits

Motif Logos: An Example ( An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Identifying Motifs Genes are turned on or off by regulatory proteins Genes are turned on or off by regulatory proteins These proteins bind to upstream regulatory regions of genes to either attract or block an RNA polymerase These proteins bind to upstream regulatory regions of genes to either attract or block an RNA polymerase Regulatory protein (TF) binds to a short DNA sequence called a motif (TFBS) Regulatory protein (TF) binds to a short DNA sequence called a motif (TFBS) So finding the same motif in multiple genes’ regulatory regions suggests a regulatory relationship amongst those genes So finding the same motif in multiple genes’ regulatory regions suggests a regulatory relationship amongst those genes An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Identifying Motifs: Complications We do not know the motif sequence We do not know the motif sequence We do not know where it is located relative to the gene’s start We do not know where it is located relative to the gene’s start Motifs can differ slightly from one gene to the next Motifs can differ slightly from one gene to the next How to discern it from “random” motifs? How to discern it from “random” motifs? An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Random Sample atgaccgggatactgataccgtatttggcctaggcgtacacattagataaacgtatgaagtacgttagactcggcgccgccg acccctattttttgagcagatttagtgacctggaaaaaaaatttgagtacaaaacttttccgaatactgggcataaggtaca tgagtatccctgggatgacttttgggaacactatagtgctctcccgatttttgaatatgtaggatcattcgccagggtccga gctgagaattggatgaccttgtaagtgttttccacgcaatcgcgaaccaacgcggacccaaaggcaagaccgataaaggaga tcccttttgcggtaatgtgccgggaggctggttacgtagggaagccctaacggacttaatggcccacttagtccacttatag gtcaatcatgttcttgtgaatggatttttaactgagggcatagaccgcttggcgcacccaaattcagtgtgggcgagcgcaa cggttttggcccttgttagaggcccccgtactgatggaaactttcaattatgagagagctaatctatcgcgtgcgtgttcat aacttgagttggtttcgaaaatgctctggggcacatacaagaggagtcttccttatcagttaatgctgtatgacactatgta ttggcccattggctaaaagcccaacttgacaaatggaagatagaatccttgcatttcaacgtatgccgaaccgaaagggaag ctggtgagcaacgacagattcttacgtgcattagctcgcttccggggatctaatagcacgaagcttctgggtactgatagca An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Implanting Motif AAAAAAAAGGGGGGG atgaccgggatactgatAAAAAAAAGGGGGGGggcgtacacattagataaacgtatgaagtacgttagactcggcgccgccg acccctattttttgagcagatttagtgacctggaaaaaaaatttgagtacaaaacttttccgaataAAAAAAAAGGGGGGGa tgagtatccctgggatgacttAAAAAAAAGGGGGGGtgctctcccgatttttgaatatgtaggatcattcgccagggtccga gctgagaattggatgAAAAAAAAGGGGGGGtccacgcaatcgcgaaccaacgcggacccaaaggcaagaccgataaaggaga tcccttttgcggtaatgtgccgggaggctggttacgtagggaagccctaacggacttaatAAAAAAAAGGGGGGGcttatag gtcaatcatgttcttgtgaatggatttAAAAAAAAGGGGGGGgaccgcttggcgcacccaaattcagtgtgggcgagcgcaa cggttttggcccttgttagaggcccccgtAAAAAAAAGGGGGGGcaattatgagagagctaatctatcgcgtgcgtgttcat aacttgagttAAAAAAAAGGGGGGGctggggcacatacaagaggagtcttccttatcagttaatgctgtatgacactatgta ttggcccattggctaaaagcccaacttgacaaatggaagatagaatccttgcatAAAAAAAAGGGGGGGaccgaaagggaag ctggtgagcaacgacagattcttacgtgcattagctcgcttccggggatctaatagcacgaagcttAAAAAAAAGGGGGGGa An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Where is the Implanted Motif? atgaccgggatactgataaaaaaaagggggggggcgtacacattagataaacgtatgaagtacgttagactcggcgccgccg acccctattttttgagcagatttagtgacctggaaaaaaaatttgagtacaaaacttttccgaataaaaaaaaaggggggga tgagtatccctgggatgacttaaaaaaaagggggggtgctctcccgatttttgaatatgtaggatcattcgccagggtccga gctgagaattggatgaaaaaaaagggggggtccacgcaatcgcgaaccaacgcggacccaaaggcaagaccgataaaggaga tcccttttgcggtaatgtgccgggaggctggttacgtagggaagccctaacggacttaataaaaaaaagggggggcttatag gtcaatcatgttcttgtgaatggatttaaaaaaaaggggggggaccgcttggcgcacccaaattcagtgtgggcgagcgcaa cggttttggcccttgttagaggcccccgtaaaaaaaagggggggcaattatgagagagctaatctatcgcgtgcgtgttcat aacttgagttaaaaaaaagggggggctggggcacatacaagaggagtcttccttatcagttaatgctgtatgacactatgta ttggcccattggctaaaagcccaacttgacaaatggaagatagaatccttgcataaaaaaaagggggggaccgaaagggaag ctggtgagcaacgacagattcttacgtgcattagctcgcttccggggatctaatagcacgaagcttaaaaaaaaggggggga An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Implanting Motif AAAAAAAAGGGGGGG with Four Mutations atgaccgggatactgatAgAAgAAAGGttGGGggcgtacacattagataaacgtatgaagtacgttagactcggcgccgccg acccctattttttgagcagatttagtgacctggaaaaaaaatttgagtacaaaacttttccgaatacAAtAAAAcGGcGGGa tgagtatccctgggatgacttAAAAtAAtGGaGtGGtgctctcccgatttttgaatatgtaggatcattcgccagggtccga gctgagaattggatgcAAAAAAAGGGattGtccacgcaatcgcgaaccaacgcggacccaaaggcaagaccgataaaggaga tcccttttgcggtaatgtgccgggaggctggttacgtagggaagccctaacggacttaatAtAAtAAAGGaaGGGcttatag gtcaatcatgttcttgtgaatggatttAAcAAtAAGGGctGGgaccgcttggcgcacccaaattcagtgtgggcgagcgcaa cggttttggcccttgttagaggcccccgtAtAAAcAAGGaGGGccaattatgagagagctaatctatcgcgtgcgtgttcat aacttgagttAAAAAAtAGGGaGccctggggcacatacaagaggagtcttccttatcagttaatgctgtatgacactatgta ttggcccattggctaaaagcccaacttgacaaatggaagatagaatccttgcatActAAAAAGGaGcGGaccgaaagggaag ctggtgagcaacgacagattcttacgtgcattagctcgcttccggggatctaatagcacgaagcttActAAAAAGGaGcGGa An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Where is the Motif??? atgaccgggatactgatagaagaaaggttgggggcgtacacattagataaacgtatgaagtacgttagactcggcgccgccg acccctattttttgagcagatttagtgacctggaaaaaaaatttgagtacaaaacttttccgaatacaataaaacggcggga tgagtatccctgggatgacttaaaataatggagtggtgctctcccgatttttgaatatgtaggatcattcgccagggtccga gctgagaattggatgcaaaaaaagggattgtccacgcaatcgcgaaccaacgcggacccaaaggcaagaccgataaaggaga tcccttttgcggtaatgtgccgggaggctggttacgtagggaagccctaacggacttaatataataaaggaagggcttatag gtcaatcatgttcttgtgaatggatttaacaataagggctgggaccgcttggcgcacccaaattcagtgtgggcgagcgcaa cggttttggcccttgttagaggcccccgtataaacaaggagggccaattatgagagagctaatctatcgcgtgcgtgttcat aacttgagttaaaaaatagggagccctggggcacatacaagaggagtcttccttatcagttaatgctgtatgacactatgta ttggcccattggctaaaagcccaacttgacaaatggaagatagaatccttgcatactaaaaaggagcggaccgaaagggaag ctggtgagcaacgacagattcttacgtgcattagctcgcttccggggatctaatagcacgaagcttactaaaaaggagcgga An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Why Finding (15,4) Motif is Difficult? atgaccgggatactgatAgAAgAAAGGttGGGggcgtacacattagataaacgtatgaagtacgttagactcggcgccgccg acccctattttttgagcagatttagtgacctggaaaaaaaatttgagtacaaaacttttccgaatacAAtAAAAcGGcGGGa tgagtatccctgggatgacttAAAAtAAtGGaGtGGtgctctcccgatttttgaatatgtaggatcattcgccagggtccga gctgagaattggatgcAAAAAAAGGGattGtccacgcaatcgcgaaccaacgcggacccaaaggcaagaccgataaaggaga tcccttttgcggtaatgtgccgggaggctggttacgtagggaagccctaacggacttaatAtAAtAAAGGaaGGGcttatag gtcaatcatgttcttgtgaatggatttAAcAAtAAGGGctGGgaccgcttggcgcacccaaattcagtgtgggcgagcgcaa cggttttggcccttgttagaggcccccgtAtAAAcAAGGaGGGccaattatgagagagctaatctatcgcgtgcgtgttcat aacttgagttAAAAAAtAGGGaGccctggggcacatacaagaggagtcttccttatcagttaatgctgtatgacactatgta ttggcccattggctaaaagcccaacttgacaaatggaagatagaatccttgcatActAAAAAGGaGcGGaccgaaagggaag ctggtgagcaacgacagattcttacgtgcattagctcgcttccggggatctaatagcacgaagcttActAAAAAGGaGcGGa AgAAgAAAGGttGGG cAAtAAAAcGGcGGG..|..|||.|..||| An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Challenge Problem Find a motif in a sample of Find a motif in a sample of - 20 “random” sequences (e.g. 600 nt long) - 20 “random” sequences (e.g. 600 nt long) - each sequence containing an implanted - each sequence containing an implanted pattern of length 15, pattern of length 15, - each pattern appearing with 4 mismatches - each pattern appearing with 4 mismatches as (15,4)-motif. as (15,4)-motif. An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

A Motif Finding Analogy The Motif Finding Problem is similar to the problem posed by Edgar Allan Poe (1809 – 1849) in his Gold Bug story The Motif Finding Problem is similar to the problem posed by Edgar Allan Poe (1809 – 1849) in his Gold Bug story An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

The Gold Bug Problem Given a secret message: Given a secret message:53++!305))6*;4826)4+.)4+);806*;48!8`60))85;]8*:+*8!83(88)5*!; 46(;88*96*?;8)*+(;485);5*!2:*+(;4956*2(5*-4)8`8*; );)6 !8)4++;1(+9;48081;8:8+1;48!85;4)485!528806*81(+9;48;(88;4(+?34;48)4+;161;:188;+?; Decipher the message encrypted in the fragment Decipher the message encrypted in the fragment An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Hints for The Gold Bug Problem Additional hints: Additional hints: The encrypted message is in English The encrypted message is in English Each symbol corresponds to one letter in the English alphabet Each symbol corresponds to one letter in the English alphabet No punctuation marks are encoded No punctuation marks are encoded An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

The Gold Bug Problem: Symbol Counts Naive approach to solving the problem: Naive approach to solving the problem: Count the frequency of each symbol in the encrypted message Count the frequency of each symbol in the encrypted message Find the frequency of each letter in the alphabet in the English language Find the frequency of each letter in the alphabet in the English language Compare the frequencies of the previous steps, try to find a correlation and map the symbols to a letter in the alphabet Compare the frequencies of the previous steps, try to find a correlation and map the symbols to a letter in the alphabet An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Symbol Frequencies in the Gold Bug Message Gold Bug Message: Gold Bug Message: English Language: English Language: e t a o i n s r h l d c u m f p g w y b v k x j q z Most frequent Least frequent Symbol 8;4)+*56(!10293:?`-]. Frequency An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

The Gold Bug Message Decoding: First Attempt By simply mapping the most frequent symbols to the most frequent letters of the alphabet: By simply mapping the most frequent symbols to the most frequent letters of the alphabet:sfiilfcsoorntaeuroaikoaiotecrntaeleyrcooestvenpinelefheeosnltarhteenmrnwteonihtaesotsnlupnihtamsrnuhsnbaoeyentacrmuesotorleoaiitdhimtaecedtepeidtaelestaoaeslsueecrnedhimtaetheetahiwfataeoaitdrdtpdeetiwt The result does not make sense The result does not make sense An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

The Gold Bug Problem: l-tuple count A better approach: A better approach: Examine frequencies of l-tuples, combinations of 2 symbols, 3 symbols, etc. Examine frequencies of l-tuples, combinations of 2 symbols, 3 symbols, etc. “The” is the most frequent 3-tuple in English and “;48” is the most frequent 3- tuple in the encrypted text “The” is the most frequent 3-tuple in English and “;48” is the most frequent 3- tuple in the encrypted text Make inferences of unknown symbols by examining other frequent l-tuples Make inferences of unknown symbols by examining other frequent l-tuples An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

The Gold Bug Problem: the ;48 clue Mapping “;48” to “the” and substituting all occurrences of the symbols: Mapping “;48” to “the” and substituting all occurrences of the symbols: 53++!305))6*the26)h+.)h+)te06*the!e`60))e5t]e*:+*e!e3(ee)5*!t h6(tee*96*?te)*+(the5)t5*!2:*+(th956*2(5*h)e`e*th0692e5)t)6!e )h++t1(+9the0e1te:e+1the!e5th)he5!52ee06*e1(+9thet(eeth(+?3ht he)h+t161t:1eet+?t An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

The Gold Bug Message Decoding: Second Attempt Make inferences: Make inferences:53++!305))6*the26)h+.)h+)te06*the!e`60))e5t]e*:+*e!e3(ee)5*!th6(tee*96*?te)*+(the5)t5*!2:*+(th956*2(5*h)e`e*th0692e5)t)6!e )h++t1(+9the0e1te:e+1the!e5th)he5!52ee06*e1(+9thet(eeth(+?3ht he)h+t161t:1eet+?t “thet(ee” most likely means “the tree” “thet(ee” most likely means “the tree” Infer “(“ = “r” Infer “(“ = “r” “th(+?3h” becomes “thr+?3h” “th(+?3h” becomes “thr+?3h” Can we guess “+,” “?,” and “3”? Can we guess “+,” “?,” and “3”? An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

The Gold Bug Problem: The Solution After figuring out all the mappings, the final message is: After figuring out all the mappings, the final message is:AGOODGLASSINTHEBISHOPSHOSTELINTHEDEVILSSEATWENYONEDEGRE ESANDTHIRTEENMINUTESNORTHEASTANDBYNORTHMAINBRANCHSEVENT HLIMBEASTSIDESHOOTFROMTHELEFTEYEOFTHEDEATHSHEADABEELINE FROMTHETREETHROUGHTHESHOTFIFTYFEETOUT An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

The Solution (cont’d) Punctuation is important: Punctuation is important: A GOOD GLASS IN THE BISHOP’S HOSTEL IN THE DEVIL’S SEA, TWENY ONE DEGREES AND THIRTEEN MINUTES NORTHEAST AND BY NORTH, MAIN BRANCH SEVENTH LIMB, EAST SIDE, SHOOT FROM THE LEFT EYE OF THE DEATH’S HEAD A BEE LINE FROM THE TREE THROUGH THE SHOT, FIFTY FEET OUT. An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Solving the Gold Bug Problem Prerequisites to solve the problem: Prerequisites to solve the problem: Need to know the relative frequencies of single letters, and combinations of two and three letters in English Need to know the relative frequencies of single letters, and combinations of two and three letters in English Knowledge of all the words in the English dictionary is highly desired to make accurate inferences Knowledge of all the words in the English dictionary is highly desired to make accurate inferences An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Nucleotides in motifs encode for a message in the “genetic” language. Symbols in “The Gold Bug” encode for a message in English Nucleotides in motifs encode for a message in the “genetic” language. Symbols in “The Gold Bug” encode for a message in English In order to solve the problem, we analyze the frequencies of patterns in DNA/Gold Bug message. In order to solve the problem, we analyze the frequencies of patterns in DNA/Gold Bug message. Knowledge of established regulatory motifs makes the Motif Finding problem simpler. Knowledge of the words in the English dictionary helps to solve the Gold Bug problem. Knowledge of established regulatory motifs makes the Motif Finding problem simpler. Knowledge of the words in the English dictionary helps to solve the Gold Bug problem. Motif Finding and The Gold Bug Problem: Similarities An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Similarities (cont’d) Gold Bug Problem: Gold Bug Problem: In order to solve the problem, we analyze the frequencies of patterns in the text written in English In order to solve the problem, we analyze the frequencies of patterns in the text written in English Motif Finding: Motif Finding: In order to solve the problem, we analyze the frequencies of patterns in the nucleotide sequences In order to solve the problem, we analyze the frequencies of patterns in the nucleotide sequences An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Similarities (cont’d) Gold Bug Problem: Gold Bug Problem: Knowledge of the words in the dictionary is highly desirable Knowledge of the words in the dictionary is highly desirable Motif Finding: Motif Finding: Knowledge of established motifs reduces the complexity of the problem Knowledge of established motifs reduces the complexity of the problem An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Motif Finding and The Gold Bug Problem: Differences Motif Finding is harder than Gold Bug problem: We don’t have the complete dictionary of motifs We don’t have the complete dictionary of motifs The “genetic” language does not have a standard “grammar” The “genetic” language does not have a standard “grammar” Only a small fraction of nucleotide sequences encode for motifs; the size of data is enormous Only a small fraction of nucleotide sequences encode for motifs; the size of data is enormous An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

The Motif Finding Problem Given a random sample of DNA sequences: Given a random sample of DNA sequences:cctgatagacgctatctggctatccacgtacgtaggtcctctgtgcgaatctatgcgtttccaaccatagtactggtgtacatttgatacgtacgtacaccggcaacctgaaacaaacgctcagaaccagaagtgcaaacgtacgtgcaccctctttcttcgtggctctggccaacgagggctgatgtataagacgaaaattttagcctccgatgtaagtcatagctgtaactattacctgccacccctattacatcttacgtacgtatacactgttatacaacgcgtcatggcggggtatgcgttttggtcgtcgtacgctcgatcgttaacgtacgtc Find the pattern that is implanted in each of the individual sequences, namely, the motif Find the pattern that is implanted in each of the individual sequences, namely, the motif An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

The Motif Finding Problem (cont’d) Additional information: Additional information: The hidden sequence is of length 8 The hidden sequence is of length 8 The pattern is not exactly the same in each array because random point mutations may occur in the sequences The pattern is not exactly the same in each array because random point mutations may occur in the sequences An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

The Motif Finding Problem (cont’d) The patterns revealed with no mutations: The patterns revealed with no mutations: cctgatagacgctatctggctatccacgtacgtaggtcctctgtgcgaatctatgcgtttccaaccat agtactggtgtacatttgatacgtacgtacaccggcaacctgaaacaaacgctcagaaccagaagtgc aaacgtacgtgcaccctctttcttcgtggctctggccaacgagggctgatgtataagacgaaaatttt agcctccgatgtaagtcatagctgtaactattacctgccacccctattacatcttacgtacgtataca ctgttatacaacgcgtcatggcggggtatgcgttttggtcgtcgtacgctcgatcgttaacgtacgtc acgtacgt Consensus String An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

The Motif Finding Problem (cont’d) The patterns with 2 point mutations: The patterns with 2 point mutations: cctgatagacgctatctggctatccaGgtacTtaggtcctctgtgcgaatctatgcgtttccaaccat agtactggtgtacatttgatCcAtacgtacaccggcaacctgaaacaaacgctcagaaccagaagtgc aaacgtTAgtgcaccctctttcttcgtggctctggccaacgagggctgatgtataagacgaaaatttt agcctccgatgtaagtcatagctgtaactattacctgccacccctattacatcttacgtCcAtataca ctgttatacaacgcgtcatggcggggtatgcgttttggtcgtcgtacgctcgatcgttaCcgtacgGc An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

The Motif Finding Problem (cont’d) The patterns with 2 point mutations: The patterns with 2 point mutations: cctgatagacgctatctggctatccaGgtacTtaggtcctctgtgcgaatctatgcgtttccaaccat agtactggtgtacatttgatCcAtacgtacaccggcaacctgaaacaaacgctcagaaccagaagtgc aaacgtTAgtgcaccctctttcttcgtggctctggccaacgagggctgatgtataagacgaaaatttt agcctccgatgtaagtcatagctgtaactattacctgccacccctattacatcttacgtCcAtataca ctgttatacaacgcgtcatggcggggtatgcgttttggtcgtcgtacgctcgatcgttaCcgtacgGc Can we still find the motif, now that we have 2 mutations? An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Defining Motifs To define a motif, lets say we know where the motif starts in the sequence To define a motif, lets say we know where the motif starts in the sequence The motif start positions in their sequences can be represented as s = (s 1,s 2,s 3,…,s t ) The motif start positions in their sequences can be represented as s = (s 1,s 2,s 3,…,s t ) An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Motifs: Profiles and Consensus a G g t a c T t a G g t a c T t C c A t a c g t C c A t a c g t Alignment a c g t T A g t a c g t C c A t a c g t C c A t C c g t a c g G C c g t a c g G _________________ _________________ A A Profile C G G T T _________________ _________________ Consensus A C G T A C G T Line up the patterns by their start indexes Line up the patterns by their start indexes s = (s 1, s 2, …, s t ) Construct profile matrix with frequencies of each nucleotide in columns Construct profile matrix with frequencies of each nucleotide in columns Consensus nucleotide in each position has the highest score in column Consensus nucleotide in each position has the highest score in column An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Consensus Think of consensus as an “ancestor” motif, from which mutated motifs emerged Think of consensus as an “ancestor” motif, from which mutated motifs emerged The distance between a real motif and the consensus sequence is generally less than that for two real motifs The distance between a real motif and the consensus sequence is generally less than that for two real motifs An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Consensus (cont’d) An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Evaluating Motifs We have a guess about the consensus sequence, but how “good” is this consensus? We have a guess about the consensus sequence, but how “good” is this consensus? Need to introduce a scoring function to compare different guesses and choose the “best” one. Need to introduce a scoring function to compare different guesses and choose the “best” one. An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Defining Some Terms t - number of sample DNA sequences t - number of sample DNA sequences n - length of each DNA sequence n - length of each DNA sequence DNA - sample of DNA sequences (t x n array) DNA - sample of DNA sequences (t x n array) l - length of the motif ( l -mer) l - length of the motif ( l -mer) s i - starting position of an l -mer in sequence i s i - starting position of an l -mer in sequence i s=(s 1, s 2,… s t ) - array of motif starting positions s=(s 1, s 2,… s t ) - array of motif starting positions An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Parameters cctgatagacgctatctggctatccaGgtacTtaggtcctctgtgcgaatctatgcgtttccaaccat agtactggtgtacatttgatCcAtacgtacaccggcaacctgaaacaaacgctcagaaccagaagtgc aaacgtTAgtgcaccctctttcttcgtggctctggccaacgagggctgatgtataagacgaaaatttt agcctccgatgtaagtcatagctgtaactattacctgccacccctattacatcttacgtCcAtataca ctgttatacaacgcgtcatggcggggtatgcgttttggtcgtcgtacgctcgatcgttaCcgtacgGc l = 8 t=5 s 1 = 26 s 2 = 21 s 3 = 3 s 4 = 56 s 5 = 60 s DNA n = 69 An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Scoring Motifs Given s = (s 1, … s t ) and DNA: Given s = (s 1, … s t ) and DNA: Score(s,DNA) = a G g t a c T t a G g t a c T t C c A t a c g t C c A t a c g t a c g t T A g t a c g t T A g t a c g t C c A t a c g t C c A t C c g t a c g G C c g t a c g G _________________ _________________ A A C C G G T T _________________ _________________ Consensus a c g t a c g t Consensus a c g t a c g t Score = 30 Score = 30 l t An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

The Motif Finding Problem If starting positions s=(s 1, s 2,… s t ) are given, finding consensus is easy even with mutations in the sequences because we can simply construct the profile to find the motif (consensus) If starting positions s=(s 1, s 2,… s t ) are given, finding consensus is easy even with mutations in the sequences because we can simply construct the profile to find the motif (consensus) But… the starting positions s are usually not given. How can we find the “best” profile matrix? But… the starting positions s are usually not given. How can we find the “best” profile matrix? An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

The Motif Finding Problem: Formulation Goal: Given a set of DNA sequences, find a set of l - mers, one from each sequence, that maximizes the consensus score Goal: Given a set of DNA sequences, find a set of l - mers, one from each sequence, that maximizes the consensus score Input: A t x n matrix of DNA, and l, the length of the pattern to find Input: A t x n matrix of DNA, and l, the length of the pattern to find Output: An array of t starting positions s = (s 1, s 2, … s t ) maximizing Score(s,DNA) Output: An array of t starting positions s = (s 1, s 2, … s t ) maximizing Score(s,DNA) An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

The Motif Finding Problem: Brute Force Solution Compute the scores for each possible combination of starting positions s Compute the scores for each possible combination of starting positions s The best score will determine the best profile and the consensus pattern in DNA The best score will determine the best profile and the consensus pattern in DNA The goal is to maximize Score(s,DNA) by varying the starting positions s i, where: The goal is to maximize Score(s,DNA) by varying the starting positions s i, where: s i = [1, …, n- l +1] i = [1, …, t] An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

BruteForceMotifSearch 1. BruteForceMotifSearch(DNA, t, n, l ) 2. bestScore  0 3. for each s=(s 1,s 2,..., s t ) from (1,1... 1) to (n- l +1,..., n- l +1) 4. if (Score(s,DNA) > bestScore) 5. bestScore  score(s, DNA) 6. bestMotif  (s 1,s 2,..., s t ) 7. return bestMotif An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Running Time of BruteForceMotifSearch Varying (n - l + 1) positions in each of t sequences, we’re looking at (n - l + 1) t sets of starting positions Varying (n - l + 1) positions in each of t sequences, we’re looking at (n - l + 1) t sets of starting positions For each set of starting positions, the scoring function makes l operations, so complexity is l (n – l + 1) t = O( l n t ) For each set of starting positions, the scoring function makes l operations, so complexity is l (n – l + 1) t = O( l n t ) For t = 8, n = 1000, and l = 10, how long will it take for a computer performing one million operations per second to complete the task? For t = 8, n = 1000, and l = 10, how long will it take for a computer performing one million operations per second to complete the task? An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Running Time of BruteForceMotifSearch (continued) An Introduction to Bioinformatics Algorithms (Jones and Pevzner) For t = 8, n = 1000, l = 10: l n t = 10 x = operations At 10 6 operations/second that is: / 10 6 = seconds  3.17 x years

Running Time of BruteForceMotifSearch (continued) An Introduction to Bioinformatics Algorithms (Jones and Pevzner) For t = 8, n = 1000, l = 10: l n t = 10 x = operations At 10 6 operations/second that is: / 10 6 = seconds  3.17 x years Let’s try something different…

The Median String Problem Given a set of t DNA sequences find a pattern that appears in all t sequences with the minimum number of mutations Given a set of t DNA sequences find a pattern that appears in all t sequences with the minimum number of mutations This pattern will be the motif This pattern will be the motif An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Hamming Distance Hamming distance: Hamming distance: d H (v,w) is the number of nucleotide pairs that do not match when v and w are aligned. For example: d H (v,w) is the number of nucleotide pairs that do not match when v and w are aligned. For example: d H (AAAAAA,ACAAAC) = 2 An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Total Distance: An Example Given v = “ acgtacgt ” and s Given v = “ acgtacgt ” and s acgtacgt acgtacgt cctgatagacgctatctggctatccacgtacgtaggtcctctgtgcgaatctatgcgtttccaaccat acgtacgt acgtacgt agtactggtgtacatttgatacgtacgtacaccggcaacctgaaacaaacgctcagaaccagaagtgc acgtacgt acgtacgt aaacgtacgtgcaccctctttcttcgtggctctggccaacgagggctgatgtataagacgaaaatttt acgtacgt acgtacgt agcctccgatgtaagtcatagctgtaactattacctgccacccctattacatcttacgtacgtataca acgtacgt acgtacgt ctgttatacaacgcgtcatggcggggtatgcgttttggtcgtcgtacgctcgatcgttaacgtacgtc v is the sequence in red, x is the sequence in blue TotalDistance(v,DNA) = 0 TotalDistance(v,DNA) = 0 d H (v, x) = 0 An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Total Distance: Example Given v = “ acgtacgt ” and s Given v = “ acgtacgt ” and s acgtacGt acgtacGt cctgatagacgctatctggctatccacgtacAtaggtcctctgtgcgaatctatgcgtttccaaccat acgtacgt acgtacgt agtactggtgtacatttgatacgtacgtacaccggcaacctgaaacaaacgctcagaaccagaagtgc aCgtAcgt aCgtAcgt aaaAgtCcgtgcaccctctttcttcgtggctctggccaacgagggctgatgtataagacgaaaatttt acgtacgt acgtacgt agcctccgatgtaagtcatagctgtaactattacctgccacccctattacatcttacgtacgtataca acgtaCgt acgtaCgt ctgttatacaacgcgtcatggcggggtatgcgttttggtcgtcgtacgctcgatcgttaacgtaGgtc v is the sequence in red, x is the sequence in blue TotalDistance(v,DNA) = = 4 TotalDistance(v,DNA) = = 4 d H (v, x) = 2 d H (v, x) = 1 d H (v, x) = 0 d H (v, x) = 1 An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Total Distance: Definition For each DNA sequence i, compute all d H (v, x), where x is an l -mer with starting position s i For each DNA sequence i, compute all d H (v, x), where x is an l -mer with starting position s i (1 < s i < n – l + 1) (1 < s i < n – l + 1) Find minimum of d H (v, x) among all l -mers in sequence i Find minimum of d H (v, x) among all l -mers in sequence i TotalDistance(v,DNA) is the sum of the minimum Hamming distances for each DNA sequence i TotalDistance(v,DNA) is the sum of the minimum Hamming distances for each DNA sequence i So, TotalDistance(v,DNA) = min s d H (v, s), where s is the set of starting positions s 1, s 2,… s t So, TotalDistance(v,DNA) = min s d H (v, s), where s is the set of starting positions s 1, s 2,… s t An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

The Median String Problem: Formulation Goal: Given a set of DNA sequences, find a median string v Goal: Given a set of DNA sequences, find a median string v Input: A t x n matrix DNA, and l, the length of the pattern to find Input: A t x n matrix DNA, and l, the length of the pattern to find Output: A string v of l nucleotides that minimizes TotalDistance(v,DNA) over all strings of that length Output: A string v of l nucleotides that minimizes TotalDistance(v,DNA) over all strings of that length An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Median String Search Algorithm 1. MedianStringSearch (DNA, t, n, l ) 2. bestWord  AAA…A 3. bestDistance  ∞ 4. for each l -mer word from AAA…A to TTT…T 5. if TotalDistance(word,DNA) < bestDistance 6. bestDistance  TotalDistance(word,DNA) 7. bestWord  word 8. return bestWord An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Key: Motif Finding Problem == Median String Problem The Motif Finding is a maximization problem while Median String is a minimization problem. However, the Motif Finding problem and Median String problem are computationally equivalent. To prove it, let’s show that minimizing TotalDistance is equivalent to maximizing Score… An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

We are looking for the same thing a G g t a c T t a G g t a c T t C c A t a c g t C c A t a c g t Alignment a c g t T A g t a c g t C c A t a c g t C c A t C c g t a c g G C c g t a c g G _________________ _________________ A A Profile C G G T T _________________ _________________ Consensus a c g t a c g t Score TotalDistance Sum At any column j Score j + TotalDistance j = t At any column j Score j + TotalDistance j = t Because there are l columns Because there are l columns Score + TotalDistance = l * t Score + TotalDistance = l * t Rearranging: Rearranging: Score = l * t - TotalDistance Because l * t is constant, the minimization of the right side is equivalent to the maximization of the left side. Because l * t is constant, the minimization of the right side is equivalent to the maximization of the left side. l t An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Motif Finding Problem vs. Median String Problem Why bother reformulating the Motif Finding problem into the Median String problem? Why bother reformulating the Motif Finding problem into the Median String problem? The Motif Finding Problem needs to examine all the combinations for s. That is (n - l + 1) t combinations!!! The Motif Finding Problem needs to examine all the combinations for s. That is (n - l + 1) t combinations!!! The Median String Problem needs to examine all 4 l combinations for v. This number is relatively smaller. By how much? The Median String Problem needs to examine all 4 l combinations for v. This number is relatively smaller. By how much? An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Median String Problem Efficiency There are 4 l possible l -mers to try, they must be placed in each of n – l + 1 locations in t sequences, and the Hamming distance computed for each position... This is results in 4 l x t x (n – l + 1) x l operations (i.e., O(4 l tn l )). Recall that the brute force motif finding problem for t = 8, n = 1000, and l = 10 was going to require operations and  3.17 x years at 10 6 ops/second. For the median string algorithm and those same parameters we have 4 10 x 8 x 1000 x 10 = 8.39 x ops. At 10 6 ops/second, this algorithm will require 8.39 x 10 4 secs, which is  23.3 hours. Hmmm… An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Recall the BruteForceMotifSearch: 1. BruteForceMotifSearch(DNA, t, n, l ) 2. bestScore  0 3. for each s=(s 1,s 2,..., s t ) from (1,1... 1) to (n- l +1,..., n- l +1) 4. if (Score(s,DNA) > bestScore) 5. bestScore  Score(s, DNA) 6. bestMotif  (s 1,s 2,..., s t ) 7. return bestMotif An Introduction to Bioinformatics Algorithms (Jones and Pevzner) Structuring the Search

How can we perform the line How can we perform the line for each s=(s 1,s 2,..., s t ) from (1,1... 1) to (n- l +1,..., n- l +1) ? We need a method for efficiently structuring and navigating the many possible motifs We need a method for efficiently structuring and navigating the many possible motifs This is not very different than exploring all t- digit numbers This is not very different than exploring all t- digit numbers An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

1. MedianStringSearch (DNA, t, n, l ) 2. bestWord  AAA…A 3. bestDistance  ∞ 4. for each l -mer s from AAA…A to TTT…T if TotalDistance(s,DNA) < bestDistance 5. bestDistance  TotalDistance(s,DNA) 6. bestWord  s 7. return bestWord An Introduction to Bioinformatics Algorithms (Jones and Pevzner) Structuring the Search

For the Median String Problem we need to consider all 4 l possible l -mers: For the Median String Problem we need to consider all 4 l possible l -mers: aa… aa aa… ac aa… ag aa… at.. tt… tt How to organize this search? How to organize this search? l An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Alternative Representation of the Search Space Let A = 1, C = 2, G = 3, T = 4 Let A = 1, C = 2, G = 3, T = 4 Then the sequences from AA…A to TT…T become: Then the sequences from AA…A to TT…T become:11…1111…1211…1311…14..44…44 Notice that the sequences above simply list all numbers using four sequential digits beginning with 1 Notice that the sequences above simply list all numbers using four sequential digits beginning with 1 l An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Search Tree a- c- g- t- a- c- g- t- aa ac ag at ca cc cg ct ga gc gg gt ta tc tg tt -- root An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Search Tree root An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Search Tree

An instance of the travelling salesperson problem Luger: Artificial Intelligence, 5 th edition. © Pearson Education Limited, 2005

Branch and Bound in the Travelling Salesperson Problem Luger: Artificial Intelligence, 5 th edition. © Pearson Education Limited, 2005

Can We Do Better? Sets of s=(s 1, s 2, …,s t ) may have a weak profile for the first i positions (s 1, s 2, …,s i ) Sets of s=(s 1, s 2, …,s t ) may have a weak profile for the first i positions (s 1, s 2, …,s i ) Every row of alignment may add at most l to Score Every row of alignment may add at most l to Score Optimism: if all subsequent (t-i) positions (s i+1, …s t ) add Optimism: if all subsequent (t-i) positions (s i+1, …s t ) add (t – i ) * l to Score(s,i,DNA)… (t – i ) * l to Score(s,i,DNA)… If Score(s,i,DNA) + (t – i ) * l < BestScore, it makes no sense to search in vertices of the current subtree If Score(s,i,DNA) + (t – i ) * l < BestScore, it makes no sense to search in vertices of the current subtree Terminate search below current position… Terminate search below current position… An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Branch and Bound for Motif Search Since each level of the tree goes deeper into search, discarding a poor partial solution that cannot possibly get better discards all of the following branches Since each level of the tree goes deeper into search, discarding a poor partial solution that cannot possibly get better discards all of the following branches This eliminates consideration of (n – l + 1) t-i positions (per candidate motif) This eliminates consideration of (n – l + 1) t-i positions (per candidate motif) An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

A Greedy Approach to Motif Finding GreedyMotifSearch(DNA,t,n, l ) 1. bestMotif  (1,…,1) 2. s  (1,…,1) 3. for s 1  1 to n- l for s 2  1 to n- l if Score(s,2,DNA) > Score(bestMotif,2,DNA) 6. BestMotif 1  s 1 7. BestMotif 2  s 2 8. s 1  BestMotif 1 9. s 2  BestMotif for i  3 to t 11. for s i  1 to n- l if Score(s,i,DNA) > Score(bestMotif,i,DNA) 13. BestMotif i  s i 14. s i  BestMotif i 15. return bestMotif An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

A Greedy Approach to Motif Finding GreedyMotifSearch(DNA,t,n, l ) 1. bestMotif  (1,…,1) 2. s  (1,…,1) 3. for s 1  1 to n- l for s 2  1 to n- l if Score(s,2,DNA) > Score(bestMotif,2,DNA) 6. BestMotif 1  s 1 7. BestMotif 2  s 2 8. s 1  BestMotif 1 9. s 2  BestMotif for i  3 to t 11. for s i  1 to n- l if Score(s,i,DNA) > Score(bestMotif,i,DNA) 13. BestMotif i  s i 14. s i  BestMotif i 15. return bestMotif An Introduction to Bioinformatics Algorithms (Jones and Pevzner) Complexity: l (n- l +1) 2 operations to find first two closest l -mers; ~ l (n- l +1) operations per sequence to find l -mer that maximizes score so far; total # of operations, therefore, is l (n- l +1) 2 + l (n- l +1)(t-2) so the complexity is O( l n 2 + l nt) < O(4 l tnl) << O( l n t ). Brute ForceMedian String

Comparing Efficiency Consider t = 8, n = 1000, and l = 10 and 10 6 ops/second: Brute force motif finding  3.17 x years Median string  23.3 hours Greedy approach = l n 2 + l nt = (10* *1000*8)/10 6  10 seconds An Introduction to Bioinformatics Algorithms (Jones and Pevzner)

Depth-First Search via Recursion Luger: Artificial Intelligence, 5 th edition. © Pearson Education Limited, 2005