CSE 5290: Algorithms for Bioinformatics Fall 2011

Slides:



Advertisements
Similar presentations
Lecture 24 Coping with NPC and Unsolvable problems. When a problem is unsolvable, that's generally very bad news: it means there is no general algorithm.
Advertisements

Recombinant DNA technology
Molecular Biology Primer
Introduction to Bioinformatics Algorithms DNA Mapping and Brute Force Algorithms.
Sequencing and Sequence Alignment
Introduction to Bioinformatics Algorithms DNA Mapping and Brute Force Algorithms.
Physical Mapping II + Perl CIS 667 March 2, 2004.
Finding Regulatory Motifs in DNA Sequences
Exhaustive Search: DNA Mapping and Brute Force Algorithms
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 Exhaustive Search and Branch-and-Bound Algorithms for Partial Digest Mapping.
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)
DNA Technology- Cloning, Libraries, and PCR 17 November, 2003 Text Chapter 20.
Gene expression & Clustering (Chapter 10)
1 Outline Last time: –Molecular biology primer (sections ) –PCR Today: –More basic techniques for manipulating DNA (Sec. 3.8) Cutting into shorter.
Introduction to Bioinformatics Algorithms DNA Mapping and Brute Force Algorithms.
Finding Regulatory Motifs in DNA Sequences An Introduction to Bioinformatics Algorithms (Jones and Pevzner)
Introduction to Bioinformatics Algorithms Finding Regulatory Motifs in DNA Sequences.
Restriction Mapping An Introduction to Bioinformatics Algorithms (Jones and Pevzner)
JM - 1 Introduction to Bioinformatics: Lecture III Genome Assembly and String Matching Jarek Meller Jarek Meller Division of Biomedical.
Genetics 6: Techniques for Producing and Analyzing DNA.
Outline More exhaustive search algorithms Today: Motif finding
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.
Introduction to Bioinformatics Algorithms Finding Regulatory Motifs in DNA Sequences.
Introduction to Bioinformatics Algorithms DNA Mapping and Brute Force Algorithms.
Human Genomics. Writing in RED indicates the SQA outcomes. Writing in BLACK explains these outcomes in depth.
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.
Chapter 10: Genetic Engineering- A Revolution in Molecular Biology.
Locating and sequencing genes
Finding Regulatory Motifs in DNA Sequences
Motif Finding [1]: Ch , , 5.5,
Molecular Genetic Technologies Gel Electrophoresis PCR Restriction & ligation Enzymes Recombinant plasmids and transformation DNA microarrays DNA profiling.
HW4: sites that look like transcription start sites Nucleotide histogram Background frequency Count matrix for translation start sites (-10 to 10) Frequency.
An Introduction to Bioinformatics Algorithmswww.bioalgorithms.info Physical Mapping – Restriction Mapping.
Gene Technologies and Human ApplicationsSection 3 Section 3: Gene Technologies in Detail Preview Bellringer Key Ideas Basic Tools for Genetic Manipulation.
The genetic engineers toolkit A brief overview of some of the techniques commonly used.
Studying and Manipulating Genomes
From the double helix to the genome
Part 3 Gene Technology & Medicine
Section 6: What carries information between DNA to Proteins
Genetic Engineering.
Copyright Pearson Prentice Hall
PCR TECHNIQUE
Today’s Title: CW: DNA manipulation – separating and probing
copying & sequencing DNA
Section 3: Gene Technologies in Detail
COURSE OF MICROBIOLOGY
Cloning Overview DNA can be cloned into bacterial plasmids for research or commercial applications. The recombinant plasmids can be used as a source of.
AMPLIFYING AND ANALYZING DNA.
DNA profiling DNA profiling is a technique by which individuals can be identified and compared via their respective DNA profiles. Definitions you will.
Chapter 20 – DNA Technology and Genomics
Chapter 14 Bioinformatics—the study of a genome
DNA Technology.
Copyright Pearson Prentice Hall
Copyright Pearson Prentice Hall
DNA and the Genome Key Area 8a Genomic Sequencing.
Copyright Pearson Prentice Hall
3. Brute Force Selection sort Brute-Force string matching
Identical twins are two individuals that are genetically identical
Copyright Pearson Prentice Hall
CSE 5290: Algorithms for Bioinformatics Fall 2009
3. Brute Force Selection sort Brute-Force string matching
PCR Polymerase chain reaction (PCR)
CSE 5290: Algorithms for Bioinformatics Fall 2009
Biotechnology Part 2.
CSE 5290: Algorithms for Bioinformatics Fall 2009
Copyright Pearson Prentice Hall
Clustering.
3. Brute Force Selection sort Brute-Force string matching
Presentation transcript:

CSE 5290: Algorithms for Bioinformatics Fall 2011 Suprakash Datta datta@cse.yorku.ca Office: CSEB 3043 Phone: 416-736-2100 ext 77875 Course page: http://www.cs.yorku.ca/course/5290 11/13/2018 CSE 5290, Fall 2011

Biological (genomic) data ATATTGAATTTTCAAAAATTCTTACTTTTTTTTTGGATGGACGCAAAGAAGTTTAATAATCATATTACATGGCATTACCACCATATATATCCATATCTAATCTTACTTATATGTTGTGGAAATGTAAAGAGCCCCATTATCTTAGCCTAAAAAAACCTTCTCTTTGGAACTTTCTAATACGCTTAACTGCTCATTGCTATATTGAAGTACGGATTAGAAGCCGCCGAGCGGGCGACAGCCCTCCGACGGAAGACTCTCCTCTGCGTCCTCGTCTTCACCGGTCGCGTTCCTGAAACGCAGATGTGCCTCGCGCCGCACTGCTCCGAACAATAAAGATTCTACAATACTCTTTTATGGTTATGAAGAGGAAAAATTGGCAGTAACCTGGCCCCACAAACCTTCAAATTAACGAATCAAATTAACAACCATAGGATGAATGCGATTAGTTTTTTAGCCTTATTTCTGGGGTAATTAATCAGCGAAGCGATGATTTTTGATCTATTAACAGATATATAAATGGAAGCTGCATAACCACTTTAACTAATACTTTCAACATTTTCAGTTTGTATTACTTCTTATTCAAATGTCATAAAAGTATCAACAAAAAATTTAATATACCTCTATACTTTAACGTCAAGGAGAAAAAACTATAATGACTAAATCTCATTCAGAAGAAGTGATTGTACCTGAGTTCAACTAGCGCAAAGGAATTACCAAGACCATTGGCCGAAAAGTGCCCGAGCATAATTAAGAAATTTATAAGCGCTTATGATGCTAAACCGGTTTGTTGCTAGATCGCCTGGTAGAGTCAATCTAATTGGTGAACATATTGATTATTGTGACTTCTCGGTTTTACCTTTAGCTATTGATTGATATGCTTTGCGCCGTCAAAGTTTTGAACGAGAAAAATCCATCCATTACCTTAATAAATGCTGATCCCAAATTTGCTCAAAGGAATCGATTTGCCGTTGGACGGTTCTTATGTCACAATTGATCCTTCTGTGTCGGACTGGTCTAATTACTTTAAATGTGGTCTCCATGTTGCACTCTTTTCTAAAGAAACTTGCACCGGAAAGGTTTGCCAGTGCTCCTCTGGCCGGGCTGCAAGTCTTCTGTGAGGGTGATGTACCATGGCAGTGATTGTCTTCTTCGGCCGCATTCATTTGTGCCGTTGCTTTAGCTGTTGTTAAAGCGAATATGGGCCCTGGTTATCATATCCAAGCAAAATTTAATGCGTATTACGGTCGTTGCAGAACATTATGTTGGTGTTAACAATGGCGGTATGGATCAGGCTGCCTCTGTTTGGTGAGGAAGATCATGCTCTATACGTTGAGTTCAAACCGCAGTTGAAGGCTACTCCGTTTAAATTTCCGCAATTAAAAAACCATGAATAGCTTTGTTATTGCGAACACCCTTGTTGTATCTAACAAGTTTGAAACCGCCCCAACCAACTATAATTTAAGAGTGGTAGAAGTCACCAGCTGCAAATGTTTTAGCTGCCACGTACGGTGTTGTTTTACTTTCTGGAAAAGAAGGATCGAGCACGAATAAAGGTAATCTAAGAGTTCATGAACGTTTATTATGCCAGATATCACAACATTTCCACACCCTGGAACGGCGATATTGAATCCGGCATCGAACGGTTAACAAAGGCTAGTACTAGTTGAAGAGTCTCTCGCCAATAAGAAACAGGGCTTTAGTGTTGACGATGTCGCACAATCCTTGAATTGTTCTCGCGAAATTCACAAGAGACTACTTAACAACATCTCCAGTGAGATTTCAAGTCTTAAAGCTATATCAGAGGGCTAAGCATGTGTATTCTGAATTTAAGAGTCTTGAAGGCTGTGAAATTAATGACTACAGCGAGCTTTACTGCCGACGAAGACTTTTTCAAGCAATTTGGTGCCTTGATGCGAGTCTCAAGCTTCTTGCGATAAACTTTACGAATGTTCTTGTCCAGAGATTGACAAAATTTGTTCCATTGCTTTGTCAAATGGATCATGGTTCCCGTTTGACCGGAGCTGGCTGGGGTGGTTGTACTGTTCACTTGGTTCCAGGGGGCCCAAATGGCAACATAGAAAAGGTAAGAAGCCCTTGCCAATGAGTTCTACAAGGTCAAGTACCCTAAGATCACTGATGCTGAGCTAGAAAATGCTATCATCGTCTCTAAACCAATTGGGCAGCTGTCTATATGAATTATAAGTATACTTCTTTTTTTTACTTTGTTCAGAACAACTTCTCATTTTTTTCTACTCATAACTAGCATCACAAAATACGCAATAATAACGAGTAGTAACACTTTTATAGTTCATACATGCTTCAACTACTTAATAAATGATTGTATGATAGTTTTCAATGTAAGAGATTTCGATTATCCACAAACTTTAAAACACAGGGACAAAATTCTTGATATGCTTTCAACCGCTGCGTTTTGGACCTATTCTTGACATGATATGACTACCATTTTGTTATTGTACGTGGGGCAGTTGACGTCTTATCATATGTCAAAGTCATTTGCGAAGCTTGGCAAGTTGCCAACTGACGAGATGCAGTAAAAAGAGATTGCCGTCTTGAAACTTTTTGTCCTTTTTTTTTTCCGGGGACTCTACGAACCCTTTGTCCTACTGATTAATTTTGTACTGAATTTGGACAATTCAGATTTTAGTAGACAAGCGCGAGGAGGAAAAGAAATGACAAAAATTCCGATGGACAAGAAGATAGGAAAAAAAAAAAGCTTTCACCGATTTCCTAGACCGGAAAAAAGTCGTATGACATCAGAATGAAATTTTCAAGTTAGACAAGGACAAAATCAGGACAAATTGTAAAGATATAATAAACTATTTGATTCAGCGCCAATTTGCCCTTTTCCATTCCATTAAATCTCTGTTCTCTCTTACTTATATGATGATTAGGTATCATCTGTATAAAACTCCTTTCTTAATTTCACTCTAAAGCATCCCATAGAGAAGATCTTTCGGTTCGAAGACATTCCTACGCATAATAAGAATAGGAGGGAATAATGCCAGACAATCTATCATTACATTAGCGGCTCTTCAAAAAGATTGAACTCTCGCCAACTTATGGAATCTTCCAATGAGACCTTTGCGCCAAATAATGTGGATTTGGAAAAAGTATAAGTCATCTCAGAGTAATATAACTACCGAAGTTTATGAGGCATCGAGCTTTGAAGAAAAAGTAAGCTCAGAAAAACCTCAATAGCTCATTCTGGAAGAAAATCTATTATGAATATGTGGTCGTTGACAAATCAATCTTGGGTGTTTCTATTCTGGATTCATTTATGTACACAGGACTTGAAGCCCGTCGAAAAAGAAAGGCGGGTTTGGTCCTGGTACAATTATTGTTACTTCTGGCTTGCTGAATGTTTCAATATCCACTTGGCAAATTGCAGCTACAGGTCTACAACTGGGTCTAAATTGGTGGCAGTGTTGGATAACAATTTGGATTGGGTACGGTTTCGTGTGCTTTTGTTGTTTTGGCCTCTAGAGTTGGATCTGCTTATCATTTGTCATTCCCTATATCATCTAGAGCATCATTCGGTATTTTCT 11/13/2018 CSE 5290, Fall 2011

Annotated data 11/13/2018 CSE 5290, Fall 2011 ATATTGAATTTTCAAAAATTCTTACTTTTTTTTTGGATGGACGCAAAGAAGTTTAATAATCATATTACATGGCATTACCACCATATATATCCATATCTAATCTTACTTATATGTTGTGGAAATGTAAAGAGCCCCATTATCTTAGCCTAAAAAAACCTTCTCTTTGGAACTTTCTAATACGCTTAACTGCTCATTGCTATATTGAAGTACGGATTAGAAGCCGCCGAGCGGGCGACAGCCCTCCGACGGAAGACTCTCCTCTGCGTCCTCGTCTTCACCGGTCGCGTTCCTGAAACGCAGATGTGCCTCGCGCCGCACTGCTCCGAACAATAAAGATTCTACAATACTCTTTTATGGTTATGAAGAGGAAAAATTGGCAGTAACCTGGCCCCACAAACCTTCAAATTAACGAATCAAATTAACAACCATAGGATGAATGCGATTAGTTTTTTAGCCTTATTTCTGGGGTAATTAATCAGCGAAGCGATGATTTTTGATCTATTAACAGATATATAAATGGAAGCTGCATAACCACTTTAACTAATACTTTCAACATTTTCAGTTTGTATTACTTCTTATTCAAATGTCATAAAAGTATCAACAAAAAATTTAATATACCTCTATACTTTAACGTCAAGGAGAAAAAACTATAATGACTAAATCTCATTCAGAAGAAGTGATTGTACCTGAGTTCACTAGCGCAAAGGAATTACCAAGACCATTGGCCGAAAAGTGCCGAGCATAATTAAGAAATTTATAAGCGCTTATGATGCTAAACCGAGTTGTATGTATTTGGCCTTATGTAGCTCGCGCCCGTTCGAGATAAGGATGTTTCTAGAAATCCGTAAAGATATAGAGATGTACACACATCTACATTTGTAACTCTATTTATAGTTAGAAACTTGTCCTCGAGGTCTCTCTATAAACCTTTTTGTACGTCCATAAATGTGGAAATCTACCGATCTTTTTGTCTCCGTATATAGGGAAACAGCGTTTTCGCTATACCTGGGTACAAACAGAGTTTTGTAGCTCCACGTTTCGCTGTCTCGTTCCGTGGAGCCCTGGGGGTCCTTAGACATATACTCTTTTTACATAGTTGGATGGGGGTCTGTACCTAGTTAGCTCTAGCTCGAGACAGCGATAGAGAATTTTGTATACTTGTCCGTTTACGTGTACCCGGCGATCTGTCTATGTCTATGGATAGCCACGTTTATGTCGTTTTGTAGGTCGTTGTATATCGATATATAGAGCGCGGATAATTAGGTAGGTCGACCGCGCTGTGGCTCTATCTCTAGTTATTTGTAGGTCGATGTGTAGATGTAATTCTAGCTGGACATCCATACCTACCTGTGTTTGTAGGTATTTCCATAAAACCACAGCGATGTTTGTAGAAAACGCGCGCTACCCCTACACCGCTATATACATAATATATCTCTGTACAAAGATGTATAGAGATAAAGACACAGTTCGAAACCTATCGACTTGGACAAACAGTTGTTTATTTTTAAGTCGCTCGACCGAACTAGTTACACCGAGATCGATTTGTTTCTCTATACACCTCTCTCTGTGGAGAAACAGAGCGAGAAGTAGATTTCGAGAAGCCACCGGGACAATTACAGAAAGCGGTAGATTTACATACAAAGAAGGAGACTTATCGATACACATAGAGGTATCGATAACGATGTATACCTACATCCAGCTCCATACCTAAAGGTAGAAAGACATGTGTCGACATGTTTACGTTTAGATATGGACCTAGATATGTCTACGGACACGAGACTTACACGTCTAGATAGTTGTGTATTTCTCTCTGGACAGATCTGTAAAGGTACGTCTACATGTCGATATCGGTCTGTCGGTAGATAAAAATCTATATTTAGACCGATAACTAGGTCTCGATGTCGTTCTCTAACGATGGACCTGTAGACCGAAAAAGAACTTTTTGTTTTCCACAAGTCTAGACTTTTTTGGGTCTAGACACTTGTGGAATTCGAGATAGGGCTCTCCCTCTGGCTCTATAGATCGACGGGTATCGCTATCGAGACGTGGGTCGAGATGGGTATCTCGCTATACATGGATTTCCAACCTTGTAGGTGTCTCTCGAAGGCGGTAGGGACACAAAATAGCTGTAGCTACAACTACGTATCGATACATAAAGAGCTACAAATTGGGCAGCTGTCTATATGAATTATAAGTATACTTCTTTTTTTTACTTTGTTCAGAACAACTTCTCATTTTTTTCTACTCATAACTAGCATCACAAAATACGCAATAATAACGAGTAGTAACACTTTTATAGTTCATACATGCTTCAACTACTTAATAAATGATTGTATGATAGTTTTCAATGTAAGAGATTTCGATTATCCACAAACTTTAAAACACAGGGACAAAATTCTTGATATGCTTTCAACCGCTGCGTTTTGGACCTATTCTTGACATGATATGACTACCATTTTGTTATTGTACGTGGGGCAGTTGACGTCTTATCATATGTCAAAGTCATTTGCGAAGCTTGGCAAGTTGCCAACTGACGAGATGCAGTAAAAAGAGATTGCCGTCTTGAAACTTTTTGTCCTTTTTTTTTTCCGGGGACTCTACGAACCCTTTGTCCTACTGATTAATTTTGTACTGAATTTGGACAATTCAGATTTTAGTAGACAAGCGCGAGGAGGAAAAGAAATGACAAAAATTCCGATGGACAAGAAGATAGGAAAAAAAAAAAGCTTTCACCGATTTCCTAGACCGGAAAAAAGTCGTATGACATCAGAATGAAATTTTCAAGTTAGACAAGGACAAAATCAGGACAAATTGTAAAGATATAATAAACTATTTGATTCAGCGCCAATTTGCCCTTTTCCATTCCATTAAATCTCTGTTCTCTCTTACTTATATGATGATTAGGTATCATCTGTATAAAACTCCTTTCTTAATTTCACTCTAAAGCATACCGCCAGGTACGTACGTATACAGAAATACATGTATCTGTGGATATCCGTACATCGAGCCACATATCCCTTTAACTGGCGAAATATACTTATACCGAAAATTAGAGGGAACGCGGTATATGTACGACCGACACAATGAAACTAGATTGCGTAATTTCTAGTGTAAACAAATATGGCTATCTAAATGTCTCTAGGTACATCGAAAGAAAGTTACATATATTTAAATCGATAACTACGTAGATGGGTTTCTAGTTGTAGAGCGACAAATCTCGAAAGCTCTTTTTGGAGAGGTAGATATATAGTATATATCGCTGTCGAAGTATACAAATATCTACTTCGATAACTAACCAACGGTATCGGTCTAGAAAAGTCTCGCCAGGTCCGTAAACAAAGAGGTACATAACGAGACCGGTGGGTGTTTCGGTATACACTTGTGGGTATCGAGACATGTATGTTTGTGTGTAACTATATCCAAGGTCTTTGTGGACTTGTAGAGGTGTATCTGTCGATATTTACGTC 11/13/2018 CSE 5290, Fall 2011

What do we do with genomes? Inter-species comparison Intra-species comparison Diseases from a genomic standpoint, drug/therapy design 11/13/2018 CSE 5290, Fall 2011

Importance of algorithms – Compare human vs. mouse (blocks of 1,000 nucleotides) • 3,000,000*3,000,000 comparisons, each 1,000*1,000 operations (w/dynamic progr.) • At 1 trillion operations per second, it would take 104 days – Search all regulatory motifs of length 20 in the human genome: • 426 years 11/13/2018 CSE 5290, Fall 2011

Clustering flow cytometry data 1 million vectors Each of length 25 (real numbers) Need quick output! Results should be biologically meaningful! 11/13/2018 CSE 5290, Fall 2011

R: introduction Why R? Lots of available libraries (statistics, machine learning,…..) Very good visualization capability Free Multiplatform Easy to publish code Biologists use it! 11/13/2018 CSE 5290, Fall 2011

R - contd Grew out of a popular statistics package Used extensively by statisticians and computational biologists Lots of resources (see class web page) Some similarities with MatLab 11/13/2018 CSE 5290, Fall 2011

R – strengths and weaknesses Allows very quick testing of ideas Libraries available for most purposes Allows integration with C code Weaknesses Not as efficient as MatLab on matrix operations Not very good at handling large data sets 11/13/2018 CSE 5290, Fall 2011

Next: Ch 3 of text: Some techniques that biologists use for data gathering Things to do… Read Ch 1 and 2 on your own. Get familiar with R 11/13/2018 CSE 5290, Fall 2011

Analyzing a Genome How to analyze a genome in four easy steps. Cut it Use enzymes to cut the DNA in to small fragments. Copy it Copy it many times to make it easier to see and detect. Read it Use special chemical techniques to read the small fragments. Assemble it Take all the fragments and put them back together. This is hard!!! Bioinformatics takes over What can we learn from the sequenced DNA. Compare interspecies and intraspecies. 11/13/2018 CSE 5290, Fall 2011

8.1 Copying DNA 11/13/2018 CSE 5290, Fall 2011

Why we need so many copies Biologists needed to find a way to read DNA codes. How do you read base pairs that are angstroms in size? It is not possible to directly look at it due to DNA’s small size. Need to use chemical techniques to detect what you are looking for. To read something so small, you need a lot of it, so that you can actually detect the chemistry. Need a way to make many copies of the base pairs, and a method for reading the pairs. 11/13/2018 CSE 5290, Fall 2011

Polymerase Chain Reaction (PCR) Used to massively replicate DNA sequences. How it works: Separate the two strands with low heat Add some base pairs, primer sequences, and DNA Polymerase Creates double stranded DNA from a single strand. Primer sequences create a seed from which double stranded DNA grows. Now you have two copies. Repeat. Amount of DNA grows exponentially. 1→2→4→8→16→32→64→128→256… 11/13/2018 CSE 5290, Fall 2011

Polymerase Chain Reaction Problem: Modern instrumentation cannot easily detect single molecules of DNA, making amplification a prerequisite for further analysis Solution: PCR doubles the number of DNA fragments at every iteration 1… 2… 4… 8… 11/13/2018 CSE 5290, Fall 2011

Denaturation Raise temperature to 94oC to separate the duplex form of DNA into single strands 11/13/2018 CSE 5290, Fall 2011

Design primers To perform PCR, a 10-20bp sequence on either side of the sequence to be amplified must be known because DNA polymerase requires a primer to synthesize a new strand of DNA 11/13/2018 CSE 5290, Fall 2011

Annealing Anneal primers at 50-65oC 11/13/2018 CSE 5290, Fall 2011

Annealing Anneal primers at 50-65oC 11/13/2018 CSE 5290, Fall 2011

Extension Extend primers: raise temp to 72oC, allowing Taq polymerase to attach at each priming site and extend a new DNA strand 11/13/2018 CSE 5290, Fall 2011

Extension Extend primers: raise temp to 72oC, allowing Taq polymerase to attach at each priming site and extend a new DNA strand 11/13/2018 CSE 5290, Fall 2011

Repeat Repeat the Denature, Anneal, Extension steps at their respective temperatures… 11/13/2018 CSE 5290, Fall 2011

Polymerase Chain Reaction 11/13/2018 CSE 5290, Fall 2011

Cloning DNA DNA Cloning Use Polymerase Chain Reaction (PCR) Insert the fragment into the genome of a living organism and watch it multiply. Once you have enough, remove the organism, keep the DNA. Use Polymerase Chain Reaction (PCR) Vector DNA 11/13/2018 CSE 5290, Fall 2011

8.2 Cutting and Pasting DNA 11/13/2018 CSE 5290, Fall 2011

Restriction Enzymes Discovered in the early 1970’s Used as a defense mechanism by bacteria to break down the DNA of attacking viruses. They cut the DNA into small fragments. Can also be used to cut the DNA of organisms. This allows the DNA sequence to be in a more manageable bite-size pieces. It is then possible using standard purification techniques to single out certain fragments and duplicate them to macroscopic quantities. 11/13/2018 CSE 5290, Fall 2011

Cutting DNA Restriction Enzymes cut DNA Only cut at special sequences DNA contains thousands of these sites. Applying different Restriction Enzymes creates fragments of varying size. Restriction Enzyme “A” Cutting Sites Restriction Enzyme “B” Cutting Sites “A” and “B” fragments overlap Restriction Enzyme “A” & Restriction Enzyme “B” Cutting Sites 11/13/2018 CSE 5290, Fall 2011

Pasting DNA Two pieces of DNA can be fused together by adding chemical bonds Hybridization – complementary base-pairing Ligation – fixing bonds with single strands 11/13/2018 CSE 5290, Fall 2011

8.3 Measuring DNA Length 11/13/2018 CSE 5290, Fall 2011

Electrophoresis A copolymer of mannose and galactose, agarose, when melted and recooled, forms a gel with pores sizes dependent upon the concentration of agarose The phosphate backbone of DNA is highly negatively charged, therefore DNA will migrate in an electric field The size of DNA fragments can then be determined by comparing their migration in the gel to known size standards. 11/13/2018 CSE 5290, Fall 2011

Reading DNA Electrophoresis Reading is done mostly by using this technique. This is based on separation of molecules by their size (and in 2D gel by size and charge). DNA or RNA molecules are charged in aqueous solution and move to a definite direction by the action of an electric field. The DNA molecules are either labeled with radioisotopes or tagged with fluorescent dyes. In the latter, a laser beam can trace the dyes and send information to a computer. Given a DNA molecule it is then possible to obtain all fragments from it that end in either A, or T, or G, or C and these can be sorted in a gel experiment. Another route to sequencing is direct sequencing using gene chips. 11/13/2018 CSE 5290, Fall 2011

Assembling Genomes Must take the fragments and put them back together Not as easy as it sounds. SCS Problem (Shortest Common Superstring) Some of the fragments will overlap Fit overlapping sequences together to get the shortest possible sequence that includes all fragment sequences 11/13/2018 CSE 5290, Fall 2011

Assembling Genomes DNA fragments contain sequencing errors Two complements of DNA Need to take into account both directions of DNA Repeat problem 50% of human DNA is just repeats If you have repeating DNA, how do you know where it goes? 11/13/2018 CSE 5290, Fall 2011

8.4 Probing DNA 11/13/2018 CSE 5290, Fall 2011 34

DNA probes Oligonucleotides: single-stranded DNA 20-30 nucleotides long Oligonucleotides used to find complementary DNA segments. Made by working backwards---AA sequence----mRNA---cDNA. Made with automated DNA synthesizers and tagged with a radioactive isotope. 11/13/2018 CSE 5290, Fall 2011 35

DNA Hybridization Single-stranded DNA will naturally bind to complementary strands. Hybridization is used to locate genes, regulate gene expression, and determine the degree of similarity between DNA from different sources. Hybridization is also referred to as annealing or renaturation. 11/13/2018 CSE 5290, Fall 2011 36

Create a Hybridization Reaction 1. Hybridization is binding two genetic sequences. The binding occurs because of the hydrogen bonds [pink] between base pairs. 2. When using hybridization, DNA must first be denatured, usually by using use heat or chemical. T C T A G C G T C A T G T TAGGC T ATCCGACAATGACGCC 11/13/2018 CSE 5290, Fall 2011

Create a Hybridization Reaction - 2 3. Once DNA has been denatured, a single-stranded radioactive probe [light blue] can be used to see if the denatured DNA contains a sequence complementary to probe. 4. Sequences of varying homology stick to the DNA even if the fit is poor. ACTGC ACTGC ATCCGACAATGACGCC Great Homology ACTGC ATCCGACAATGACGCC Less Homology ATTCC ATCCGACAATGACGCC ACCCC Low Homology ATCCGACAATGACGCC 11/13/2018 CSE 5290, Fall 2011 38

Labeling technique for DNA arrays RNA samples are labeled using fluorescent nucleotides (left) or radioactive nucleotides (right), and hybridized to arrays. For fluorescent labeling, two or more samples labeled with differently colored fluorescent markers are hybridized to an array. Level of RNA for each gene in the sample is measured as intensity of fluorescence or radioactivity binding to the specific spot. With fluorescence labeling, relative levels of expressed genes in two samples can be directly compared with a single array. 11/13/2018 CSE 5290, Fall 2011

DNA Arrays--Technical Foundations An array works by exploiting the ability of a given mRNA molecule to hybridize to the DNA template. Using an array containing many DNA samples in an experiment, the expression levels of hundreds or thousands genes within a cell by measuring the amount of mRNA bound to each site on the array. With the aid of a computer, the amount of mRNA bound to the spots on the microarray is precisely measured, generating a profile of gene expression in the cell. 11/13/2018 CSE 5290, Fall 2011

An experiment on a microarray In this schematic:   GREEN represents Control DNA RED represents Sample DNA   YELLOW represents a combination of Control and Sample DNA   BLACK represents areas where neither the Control nor Sample DNA   Each color in an array represents either healthy (control) or diseased (sample) tissue. The location and intensity of a color tell us whether the gene, or mutation, is present in the control and/or sample DNA. 11/13/2018 CSE 5290, Fall 2011

DNA Microarray Millions of DNA strands build up on each location. Tagged probes become hybridized to the DNA chip’s microarray. 11/13/2018 CSE 5290, Fall 2011

DNA Microarray Affymetrix Microarray is a tool for analyzing gene expression that consists of a glass slide. Each blue spot indicates the location of a PCR product. On a real microarray, each spot is about 100um in diameter. 11/13/2018 CSE 5290, Fall 2011

Photolithography Light directed oligonucleotide synthesis. A solid support is derivatized with a covalent linker molecule terminated with a photolabile protecting group. Light is directed through a mask to deprotect and activate selected sites, and protected nucleotides couple to the activated sites. The process is repeated, activating different set of sites and coupling different based allowing arbitrary DNA probes to be constructed at each site. 11/13/2018 CSE 5290, Fall 2011

Affymetrix GeneChip® Arrays A combination of photolithography and combinatorial chemistry to manufacture GeneChip® Arrays. With a minimum number of steps, Affymetrix produces arrays with thousands of different probes packed at extremely high density. Enable to obtain high quality, genome-wide data using small sample volumes. 11/13/2018 CSE 5290, Fall 2011

Affymetrix GeneChip® Arrays Data from an experiment showing the expression of thousands of genes on a single GeneChip® probe array. 11/13/2018 CSE 5290, Fall 2011

Next DNA Mapping and Brute Force Algorithms How is DNA sequenced? 11/13/2018 CSE 5290, Fall 2011

Full Restriction Digest • Cutting DNA at each restriction site creates multiple restriction fragments: • Is it possible to reconstruct the order of the fragments from the sizes of the fragments {3,5,5,9} ? 11/13/2018 CSE 5290, Fall 2011

Full Restriction Digest: Multiple Solutions • Alternative ordering of restriction fragments: vs 11/13/2018 CSE 5290, Fall 2011

Measuring Length of Restriction Fragments Restriction enzymes break DNA into restriction fragments. Gel electrophoresis is a process for separating DNA by size and measuring sizes of restriction fragments Can separate DNA fragments that differ in length in only 1 nucleotide for fragments up to 500 nucleotides long 11/13/2018 CSE 5290, Fall 2011

Partial Restriction Digest The sample of DNA is exposed to the restriction enzyme for only a limited amount of time to prevent it from being cut at all restriction sites This experiment generates the set of all possible restriction fragments between every 2 (not necessarily consecutive) cuts This set of fragment sizes is used to determine the positions of the restriction sites in the DNA sequence 11/13/2018 CSE 5290, Fall 2011

Partial Digest Example Partial Digest results in the following 10 restriction fragments: 11/13/2018 CSE 5290, Fall 2011

Multiset of Restriction Fragments We assume that multiplicity of a fragment can be detected, i.e., the number of restriction fragments of the same length can be determined (e.g., by observing twice as much fluorescence intensity for a double fragment than for a single fragment) Multiset: {3, 5, 5, 8, 9, 14, 14, 17, 19, 22} 11/13/2018 CSE 5290, Fall 2011

Partial Digest Fundamentals the set of n integers representing the location of all cuts in the restriction map, including the start and end X: the total number of cuts n: the multiset of integers representing lengths of each of the nC2 fragments produced from a partial digest DX: 11/13/2018 CSE 5290, Fall 2011

One More Partial Digest Example 2 4 7 10 5 8 3 6 Representation of DX = {2, 2, 3, 3, 4, 5, 6, 7, 8, 10} as a two dimensional table, with elements of X = {0, 2, 4, 7, 10} along both the top and left side. The elements at (i, j) in the table is xj – xi for 1 ≤ i < j ≤ n. 11/13/2018 CSE 5290, Fall 2011

Partial Digest Problem: Formulation Goal: Given all pairwise distances between points on a line, reconstruct the positions of those points Input: The multiset of pairwise distances L, containing n(n-1)/2 integers Output: A set X, of n integers, such that DX = L 11/13/2018 CSE 5290, Fall 2011

Partial Digest: Multiple Solutions It is not always possible to uniquely reconstruct a set X based only on DX. For example, the set X = {0, 2, 5} and (X + 10) = {10, 12, 15} both produce DX={2, 3, 5} as their partial digest set. The sets {0,1,2,5,7,9,12} and {0,1,5,7,8,10,12} present a less trivial example of non-uniqueness. They both digest into: {1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 5, 6, 7, 7, 7, 8, 9, 10, 11, 12} 11/13/2018 CSE 5290, Fall 2011

Homometric Sets 1 2 5 7 9 12 4 6 8 11 3 10 1 5 7 8 10 12 4 6 9 11 2 3 11/13/2018 CSE 5290, Fall 2011

Brute Force Algorithms Also known as exhaustive search algorithms; examine every possible variant to find a solution Efficient in rare cases; usually impractical 11/13/2018 CSE 5290, Fall 2011

Partial Digest: Brute Force Find the restriction fragment of maximum length M. M is the length of the DNA sequence. For every possible set X={0, x2, … ,xn-1, M} compute the corresponding DX If DX is equal to the experimental partial digest L, then X is the correct restriction map 11/13/2018 CSE 5290, Fall 2011

BruteForcePDP BruteForcePDP(L, n): M <- maximum element in L for every set of n – 2 integers 0 < x2 < … xn-1 < M X <- {0,x2,…,xn-1,M} Form DX from X if DX = L return X output “no solution” 11/13/2018 CSE 5290, Fall 2011

Efficiency of BruteForcePDP BruteForcePDP takes O(M n-2) time since it must examine all possible sets of positions. One way to improve the algorithm is to limit the values of xi to only those values which occur in L. 11/13/2018 CSE 5290, Fall 2011

AnotherBruteForcePDP AnotherBruteForcePDP(L, n) M <- maximum element in L for every set of n – 2 integers 0 < x2 < … xn-1 < M X <- { 0,x2,…,xn-1,M } Form DX from X if DX = L return X output “no solution” 11/13/2018 CSE 5290, Fall 2011

AnotherBruteForcePDP AnotherBruteForcePDP(L, n) M <- maximum element in L for every set of n – 2 integers 0 < x2 < … xn-1 < M from L X <- { 0,x2,…,xn-1,M } Form DX from X if DX = L return X output “no solution” 11/13/2018 CSE 5290, Fall 2011

Efficiency of AnotherBruteForcePDP It’s more efficient, but still slow If L = {2, 998, 1000} (n = 3, M = 1000), BruteForcePDP will be extremely slow, but AnotherBruteForcePDP will be quite fast Fewer sets are examined, but runtime is still exponential: O(n2n-4) 11/13/2018 CSE 5290, Fall 2011

Defining D(y, X) Before describing PartialDigest, first define D(y, X) as the multiset of all distances between point y and all other points in the set X D(y, X) = {|y – x1|, |y – x2|, …, |y – xn|} for X = {x1, x2, …, xn} 11/13/2018 CSE 5290, Fall 2011

PartialDigest Algorithm PartialDigest(L): width <- Maximum element in L DELETE(width, L) X <- {0, width} PLACE(L, X) 11/13/2018 CSE 5290, Fall 2011

PartialDigest Algorithm (cont’d) PLACE(L, X) if L is empty output X return y <- maximum element in L Delete(y,L) if D(y, X ) Í L Add y to X and remove lengths D(y, X) from L PLACE(L,X ) Remove y from X and add lengths D(y, X) to L if D(width-y, X ) Í L Add width-y to X and remove lengths D(width-y, X) from L Remove width-y from X and add lengths D(width-y, X ) to L 11/13/2018 CSE 5290, Fall 2011

An Example L = { 2, 2, 3, 3, 4, 5, 6, 7, 8, 10 } X = { 0 } 11/13/2018 CSE 5290, Fall 2011

An Example L = { 2, 2, 3, 3, 4, 5, 6, 7, 8, 10 } X = { 0 } Remove 10 from L and insert it into X. We know this must be the length of the DNA sequence because it is the largest fragment. 11/13/2018 CSE 5290, Fall 2011

An Example L = { 2, 2, 3, 3, 4, 5, 6, 7, 8, 10 } X = { 0, 10 } 11/13/2018 CSE 5290, Fall 2011

An Example L = { 2, 2, 3, 3, 4, 5, 6, 7, 8, 10 } X = { 0, 10 } Take 8 from L and make y = 2 or 8. But since the two cases are symmetric, we can assume y = 2. 11/13/2018 CSE 5290, Fall 2011

An Example L = { 2, 2, 3, 3, 4, 5, 6, 7, 8, 10 } X = { 0, 10 } We find that the distances from y=2 to other elements in X are D(y, X) = {8, 2}, so we remove {8, 2} from L and add 2 to X. 11/13/2018 CSE 5290, Fall 2011

An Example L = { 2, 2, 3, 3, 4, 5, 6, 7, 8, 10 } X = { 0, 2, 10 } 11/13/2018 CSE 5290, Fall 2011

An Example L = { 2, 2, 3, 3, 4, 5, 6, 7, 8, 10 } X = { 0, 2, 10 } Take 7 from L and make y = 7 or y = 10 – 7 = 3. We will explore y = 7 first, so D(y, X ) = {7, 5, 3}. 11/13/2018 CSE 5290, Fall 2011

An Example L = { 2, 2, 3, 3, 4, 5, 6, 7, 8, 10 } X = { 0, 2, 10 } For y = 7 first, D(y, X ) = {7, 5, 3}. Therefore we remove {7, 5 ,3} from L and add 7 to X. D(y, X) = {7, 5, 3} = {½7 – 0½, ½7 – 2½, ½7 – 10½} 11/13/2018 CSE 5290, Fall 2011

An Example L = { 2, 2, 3, 3, 4, 5, 6, 7, 8, 10 } X = { 0, 2, 7, 10 } 11/13/2018 CSE 5290, Fall 2011

An Example L = { 2, 2, 3, 3, 4, 5, 6, 7, 8, 10 } X = { 0, 2, 7, 10 } Take 6 from L and make y = 6. Unfortunately D(y, X) = {6, 4, 1 ,4}, which is not a subset of L. Therefore we won’t explore this branch. 6 11/13/2018 CSE 5290, Fall 2011

An Example L = { 2, 2, 3, 3, 4, 5, 6, 7, 8, 10 } X = { 0, 2, 7, 10 } This time make y = 4. D(y, X) = {4, 2, 3 ,6}, which is a subset of L so we will explore this branch. We remove {4, 2, 3 ,6} from L and add 4 to X. 11/13/2018 CSE 5290, Fall 2011

An Example L = { 2, 2, 3, 3, 4, 5, 6, 7, 8, 10 } X = { 0, 2, 4, 7, 10 } 11/13/2018 CSE 5290, Fall 2011

An Example L = { 2, 2, 3, 3, 4, 5, 6, 7, 8, 10 } X = { 0, 2, 4, 7, 10 } L is now empty, so we have a solution, which is X. 11/13/2018 CSE 5290, Fall 2011

An Example L = { 2, 2, 3, 3, 4, 5, 6, 7, 8, 10 } X = { 0, 2, 7, 10 } To find other solutions, we backtrack. 11/13/2018 CSE 5290, Fall 2011

An Example L = { 2, 2, 3, 3, 4, 5, 6, 7, 8, 10 } X = { 0, 2, 10 } More backtrack. 11/13/2018 CSE 5290, Fall 2011

An Example L = { 2, 2, 3, 3, 4, 5, 6, 7, 8, 10 } X = { 0, 2, 10 } This time we will explore y = 3. D(y, X) = {3, 1, 7}, which is not a subset of L, so we won’t explore this branch. 11/13/2018 CSE 5290, Fall 2011

An Example L = { 2, 2, 3, 3, 4, 5, 6, 7, 8, 10 } X = { 0, 10 } We backtracked back to the root. Therefore we have found all the solutions. 11/13/2018 CSE 5290, Fall 2011

Analyzing PartialDigest Algorithm Still exponential in worst case, but is very fast on average Informally, let T(n) be time PartialDigest takes to place n cuts No branching case: T(n) < T(n-1) + O(n) Quadratic Branching case: T(n) < 2T(n-1) + O(n) Exponential 11/13/2018 CSE 5290, Fall 2011

Double Digest Mapping One with only first enzyme Double Digest is yet another experimentally method to construct restriction maps Use two restriction enzymes; three full digests: One with only first enzyme One with only second enzyme One with both enzymes Computationally, Double Digest problem is more complex than Partial Digest problem 11/13/2018 CSE 5290, Fall 2011

Next: Finding Regulatory Motifs in DNA sequences 11/13/2018 CSE 5290, Fall 2011

Combinatorial Gene Regulation 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? 11/13/2018 CSE 5290, Fall 2011

Regulatory Proteins 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 A single TF may regulate multiple genes 11/13/2018 CSE 5290, Fall 2011

Regulatory Regions Every gene contains a regulatory region (RR) typically stretching 100-1000 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 TFs influence gene expression by binding to a specific location in the respective gene’s regulatory region - TFBS 11/13/2018 CSE 5290, Fall 2011

Transcription Factor Binding Sites A TFBS can be located anywhere within the Regulatory Region. TFBS may vary slightly across different regulatory regions since non-essential bases could mutate 11/13/2018 CSE 5290, Fall 2011

Motifs and Transcriptional Start Sites ATCCCG gene TTCCGG gene ATCCCG gene ATGCCG gene ATGCCC gene 11/13/2018 CSE 5290, Fall 2011

Transcription Factors and Motifs 11/13/2018 CSE 5290, Fall 2011

Motif Logo TGGGGGA TGAGAGA TGAGGGA Motifs can mutate on non important bases 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 TGGGGGA TGAGAGA TGAGGGA 11/13/2018 CSE 5290, Fall 2011

Identifying Motifs 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 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 11/13/2018 CSE 5290, Fall 2011

Identifying Motifs: Complications We do not know the motif sequence We do not know where it is located relative to the genes start Motifs can differ slightly from one gene to the next How to discern it from “random” motifs? 11/13/2018 CSE 5290, Fall 2011

Motifs: summary Short strings Transcription factors bind to motifs Regulate downstream genes Challenge: must find patterns without knowing them 11/13/2018 CSE 5290, Fall 2011

How can we do this? Statistics? Brute force search 11/13/2018 CSE 5290, Fall 2011

Statistical approaches Deciphering encoded English text. 11/13/2018 CSE 5290, Fall 2011

Motif Finding and The Gold Bug Problem: Similarities 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. 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. 11/13/2018 CSE 5290, Fall 2011

Similarities (cont’d) Motif Finding: In order to solve the problem, we analyze the frequencies of patterns in the nucleotide sequences Gold Bug Problem: In order to solve the problem, we analyze the frequencies of patterns in the text written in English 11/13/2018 CSE 5290, Fall 2011

Similarities (cont’d) Motif Finding: Knowledge of established motifs reduces the complexity of the problem Gold Bug Problem: Knowledge of the words in the dictionary is highly desirable 11/13/2018 CSE 5290, Fall 2011

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 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 11/13/2018 CSE 5290, Fall 2011

Challenge Problem Find a motif in a sample of - 20 “random” sequences (e.g. 600 nt long) - each sequence containing an implanted pattern of length 15, - each pattern appearing with 4 mismatches as (15,4)-motif. 11/13/2018 CSE 5290, Fall 2011

Exhaustive searches 11/13/2018 CSE 5290, Fall 2011

The Motif Finding Problem Given a random sample of DNA sequences: cctgatagacgctatctggctatccacgtacgtaggtcctctgtgcgaatctatgcgtttccaaccat agtactggtgtacatttgatacgtacgtacaccggcaacctgaaacaaacgctcagaaccagaagtgc aaacgtacgtgcaccctctttcttcgtggctctggccaacgagggctgatgtataagacgaaaatttt agcctccgatgtaagtcatagctgtaactattacctgccacccctattacatcttacgtacgtataca ctgttatacaacgcgtcatggcggggtatgcgttttggtcgtcgtacgctcgatcgttaacgtacgtc Find the pattern that is implanted in each of the individual sequences, namely, the motif 11/13/2018 CSE 5290, Fall 2011

The Motif Finding Problem (cont’d) Additional information: 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 11/13/2018 CSE 5290, Fall 2011

The Motif Finding Problem (cont’d) The patterns revealed with no mutations: cctgatagacgctatctggctatccacgtacgtaggtcctctgtgcgaatctatgcgtttccaaccat agtactggtgtacatttgatacgtacgtacaccggcaacctgaaacaaacgctcagaaccagaagtgc aaacgtacgtgcaccctctttcttcgtggctctggccaacgagggctgatgtataagacgaaaatttt agcctccgatgtaagtcatagctgtaactattacctgccacccctattacatcttacgtacgtataca ctgttatacaacgcgtcatggcggggtatgcgttttggtcgtcgtacgctcgatcgttaacgtacgtc acgtacgt Consensus String 11/13/2018 CSE 5290, Fall 2011

The Motif Finding Problem (cont’d) The patterns with 2 point mutations: cctgatagacgctatctggctatccaGgtacTtaggtcctctgtgcgaatctatgcgtttccaaccat agtactggtgtacatttgatCcAtacgtacaccggcaacctgaaacaaacgctcagaaccagaagtgc aaacgtTAgtgcaccctctttcttcgtggctctggccaacgagggctgatgtataagacgaaaatttt agcctccgatgtaagtcatagctgtaactattacctgccacccctattacatcttacgtCcAtataca ctgttatacaacgcgtcatggcggggtatgcgttttggtcgtcgtacgctcgatcgttaCcgtacgGc 11/13/2018 CSE 5290, Fall 2011

The Motif Finding Problem (cont’d) The patterns with 2 point mutations: cctgatagacgctatctggctatccaGgtacTtaggtcctctgtgcgaatctatgcgtttccaaccat agtactggtgtacatttgatCcAtacgtacaccggcaacctgaaacaaacgctcagaaccagaagtgc aaacgtTAgtgcaccctctttcttcgtggctctggccaacgagggctgatgtataagacgaaaatttt agcctccgatgtaagtcatagctgtaactattacctgccacccctattacatcttacgtCcAtataca ctgttatacaacgcgtcatggcggggtatgcgttttggtcgtcgtacgctcgatcgttaCcgtacgGc Can we still find the motif, now that we have 2 mutations? 11/13/2018 CSE 5290, Fall 2011

Defining Motifs 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 = (s1,s2,s3,…,st) 11/13/2018 CSE 5290, Fall 2011

Motifs: Profiles and Consensus Line up the patterns by their start indexes s = (s1, s2, …, st) Construct matrix profile with frequencies of each nucleotide in columns Consensus nucleotide in each position has the highest score in column a G g t a c T 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 C c g t a c g G _________________ A 3 0 1 0 3 1 1 0 Profile C 2 4 0 0 1 4 0 0 G 0 1 4 0 0 0 3 1 T 0 0 0 5 1 0 1 4 Consensus A C G T A C G T 11/13/2018 CSE 5290, Fall 2011

Consensus 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 11/13/2018 CSE 5290, Fall 2011

Consensus (cont’d) 11/13/2018 CSE 5290, Fall 2011

Evaluating Motifs 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. 11/13/2018 CSE 5290, Fall 2011

Defining Some Terms t - number of sample DNA sequences n - length of each DNA sequence DNA - sample of DNA sequences (t x n array) l - length of the motif (l-mer) si - starting position of an l-mer in sequence i s=(s1, s2,… st) - array of motif’s starting positions 11/13/2018 CSE 5290, Fall 2011

Parameters l = 8 DNA t=5 s s1 = 26 s2 = 21 s3= 3 s4 = 56 s5 = 60 cctgatagacgctatctggctatccaGgtacTtaggtcctctgtgcgaatctatgcgtttccaaccat agtactggtgtacatttgatCcAtacgtacaccggcaacctgaaacaaacgctcagaaccagaagtgc aaacgtTAgtgcaccctctttcttcgtggctctggccaacgagggctgatgtataagacgaaaatttt agcctccgatgtaagtcatagctgtaactattacctgccacccctattacatcttacgtCcAtataca ctgttatacaacgcgtcatggcggggtatgcgttttggtcgtcgtacgctcgatcgttaCcgtacgGc l = 8 DNA t=5 n = 69 s s1 = 26 s2 = 21 s3= 3 s4 = 56 s5 = 60 11/13/2018 CSE 5290, Fall 2011

Scoring Motifs Given s = (s1, … st) and DNA: Score(s,DNA) = l t a G g t a c T t C c A t a c g t a c g t T A g t a c g t C c A t C c g t a c g G _________________ A 3 0 1 0 3 1 1 0 C 2 4 0 0 1 4 0 0 G 0 1 4 0 0 0 3 1 T 0 0 0 5 1 0 1 4 Consensus a c g t a c g t Score 3+4+4+5+3+4+3+4=30 t 11/13/2018 CSE 5290, Fall 2011

The Motif Finding Problem If starting positions s=(s1, s2,… st) 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? 11/13/2018 CSE 5290, Fall 2011

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 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 = (s1, s2, … st) maximizing Score(s,DNA) 11/13/2018 CSE 5290, Fall 2011

The Motif Finding Problem: Brute Force Solution 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 goal is to maximize Score(s,DNA) by varying the starting positions si, where: si = [1, …, n-l+1] i = [1, …, t] 11/13/2018 CSE 5290, Fall 2011

BruteForceMotifSearch BruteForceMotifSearch(DNA, t, n, l) bestScore  0 for each s=(s1,s2 , . . ., st) from (1,1 . . . 1) to (n-l+1, . . ., n-l+1) if (Score(s,DNA) > bestScore) bestScore  score(s, DNA) bestMotif  (s1,s2 , . . . , st) return bestMotif 11/13/2018 CSE 5290, Fall 2011

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 For each set of starting positions, the scoring function makes l operations, so complexity is l (n – l + 1)t = O(l nt) That means that for t = 8, n = 1000, l = 10 we must perform approximately 1020 computations – it will take billions of years 11/13/2018 CSE 5290, Fall 2011

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 This pattern will be the motif 11/13/2018 CSE 5290, Fall 2011

Hamming Distance Hamming distance: dH(v,w) is the number of nucleotide pairs that do not match when v and w are aligned. For example: dH(AAAAAA,ACAAAC) = 2 11/13/2018 CSE 5290, Fall 2011

Total Distance: Definition (Intuition: let v be a (candidate) motif) For each DNA sequence i, compute all dH(v, x), where x is an l-mer with starting position si (1 < si < n – l + 1) Find minimum of dH(v, x) among all l-mers in sequence i TotalDistance(v,DNA,s) is the sum of the minimum Hamming distances for each DNA sequence i TotalDistance(v,DNA) = mins dH(v, s), where s is the set of starting positions s1, s2,… st 11/13/2018 CSE 5290, Fall 2011

The Median String Problem: Formulation Goal: Given a set of DNA sequences, find a median string 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 11/13/2018 CSE 5290, Fall 2011

Median String Search Algorithm MedianStringSearch (DNA, t, n, l) bestWord  AAA…A bestDistance  ∞ for each l-mer s from AAA…A to TTT…T if TotalDistance(s,DNA) < bestDistance bestDistanceTotalDistance(s,DNA) bestWord  s return bestWord 11/13/2018 CSE 5290, Fall 2011

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 Need to show that minimizing TotalDistance is equivalent to maximizing Score 11/13/2018 CSE 5290, Fall 2011

We are looking for the same thing At any column i Scorei + TotalDistancei = t Because there are l columns Score + TotalDistance = l * t Rearranging: Score = l * t - TotalDistance l * t is constant the minimization of the right side is equivalent to the maximization of the left side a G g t a c T 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 C c g t a c g G _________________ A 3 0 1 0 3 1 1 0 Profile C 2 4 0 0 1 4 0 0 G 0 1 4 0 0 0 3 1 T 0 0 0 5 1 0 1 4 Consensus a c g t a c g t Score 3+4+4+5+3+4+3+4 TotalDistance 2+1+1+0+2+1+2+1 Sum 5 5 5 5 5 5 5 5 t 11/13/2018 CSE 5290, Fall 2011

Motif Finding Problem vs. 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 Median String Problem needs to examine all 4l combinations for v. This number is relatively smaller 11/13/2018 CSE 5290, Fall 2011

Motif Finding: Improving the Running Time Recall the BruteForceMotifSearch: BruteForceMotifSearch(DNA, t, n, l) bestScore  0 for each s=(s1,s2 , . . ., st) from (1,1 . . . 1) to (n-l+1, . . ., n-l+1) if (Score(s,DNA) > bestScore) bestScore  Score(s, DNA) bestMotif  (s1,s2 , . . . , st) return bestMotif 11/13/2018 CSE 5290, Fall 2011

Structuring the Search How can we perform the line for each s=(s1,s2 , . . ., st) from (1,1 . . . 1) to (n-l+1, . . ., n-l+1) ? We need a method for efficiently structuring and navigating the many possible motifs This is not very different than exploring all t-digit numbers 11/13/2018 CSE 5290, Fall 2011

Median String: Improving the Running Time MedianStringSearch (DNA, t, n, l) bestWord  AAA…A bestDistance  ∞ for each l-mer s from AAA…A to TTT…T if TotalDistance(s,DNA) < bestDistance bestDistanceTotalDistance(s,DNA) bestWord  s return bestWord 11/13/2018 CSE 5290, Fall 2011

Structuring the Search For the Median String Problem we need to consider all 4l possible l-mers: aa… aa aa… ac aa… ag aa… at . tt… tt How to organize this search? l 11/13/2018 CSE 5290, Fall 2011

Alternative Representation of the Search Space Let A = 1, C = 2, G = 3, T = 4 Then the sequences from AA…A to TT…T become: 11…11 11…12 11…13 11…14 . 44…44 Notice that the sequences above simply list all numbers as if we were counting on base 4 without using 0 as a digit l 11/13/2018 CSE 5290, Fall 2011

aa ac ag at ca cc cg ct ga gc gg gt ta tc tg tt Linked List Suppose l = 2 aa ac ag at ca cc cg ct ga gc gg gt ta tc tg tt Need to visit all the predecessors of a sequence before visiting the sequence itself Start 11/13/2018 CSE 5290, Fall 2011

aa ac ag at ca cc cg ct ga gc gg gt ta tc tg tt Linked List (cont’d) Linked list is not the most efficient data structure for motif finding Let’s try grouping the sequences by their prefixes aa ac ag at ca cc cg ct ga gc gg gt ta tc tg tt 11/13/2018 CSE 5290, Fall 2011

aa ac ag at ca cc cg ct ga gc gg gt ta tc tg tt Search Tree a- c- g- t- aa ac ag at ca cc cg ct ga gc gg gt ta tc tg tt root -- 11/13/2018 CSE 5290, Fall 2011

Analyzing Search Trees Characteristics of the search trees: The sequences are contained in its leaves The parent of a node is the prefix of its children How can we move through the tree? 11/13/2018 CSE 5290, Fall 2011

Visit the Next Leaf NextLeaf( a,L, k ) // a : the array of digits Given a current leaf a , we need to compute the “next” leaf: NextLeaf( a,L, k ) // a : the array of digits for i  L to 1 // L: length of the array if ai < k // k : max digit value ai  ai + 1 return a ai  1 11/13/2018 CSE 5290, Fall 2011

NextLeaf (cont’d) The algorithm is common addition in radix k: Increment the least significant digit “Carry the one” to the next digit position when the digit is at maximal value 11/13/2018 CSE 5290, Fall 2011

NextLeaf: Example Moving to the next leaf: Current Location 1- 2- 3- 4- 11 12 13 14 21 22 23 24 31 32 33 34 41 42 43 44 -- Current Location 11/13/2018 CSE 5290, Fall 2011

NextLeaf: Example (cont’d) Moving to the next leaf: 1- 2- 3- 4- 11 12 13 14 21 22 23 24 31 32 33 34 41 42 43 44 -- Next Location 11/13/2018 CSE 5290, Fall 2011

Visit All Leaves Printing all permutations in ascending order: AllLeaves(L,k) // L: length of the sequence a  (1,...,1) // k : max digit value while forever // a : array of digits output a a  NextLeaf(a,L,k) if a = (1,...,1) return 11/13/2018 CSE 5290, Fall 2011

Tree Search So we can search leaves How about searching all vertices of the tree? We can do this with a depth first search 11/13/2018 CSE 5290, Fall 2011

Visit the Next Vertex NextVertex(a,i,L,k) // a : the array of digits if i < L // i : prefix length a i+1  1 // L: max length return ( a,i+1) // k : max digit value else for j  l to 1 if aj < k aj  aj +1 return( a,j ) return(a,0) 11/13/2018 CSE 5290, Fall 2011

Example Moving to the next vertex: Current Location 1- 2- 3- 4- 1- 2- 3- 4- 11 12 13 14 21 22 23 24 31 32 33 34 41 42 43 44 Current Location -- 11/13/2018 CSE 5290, Fall 2011

Example Moving to the next vertices: 1- 2- 3- 4- 11 12 13 14 21 22 23 24 31 32 33 34 41 42 43 44 Location after 5 next vertex moves -- 11/13/2018 CSE 5290, Fall 2011

Bypass Move Given a prefix (internal vertex), find next vertex after skipping all its children Bypass(a,i,L,k) // a: array of digits for j  i to 1 // i : prefix length if aj < k // L: maximum length aj  aj +1 // k : max digit value return(a,j) return(a,0) 11/13/2018 CSE 5290, Fall 2011

Bypass Move: Example Bypassing the descendants of “2-”: 1- 2- 3- 4- 11 12 13 14 21 22 23 24 31 32 33 34 41 42 43 44 Current Location -- 11/13/2018 CSE 5290, Fall 2011

Example Bypassing the descendants of “2-”: Next Location 1- 2- 3- 4- 1- 2- 3- 4- 11 12 13 14 21 22 23 24 31 32 33 34 41 42 43 44 Next Location -- 11/13/2018 CSE 5290, Fall 2011

Revisiting Brute Force Search Now that we have a method for navigating the tree, lets look again at BruteForceMotifSearch 11/13/2018 CSE 5290, Fall 2011

Brute Force Search Again BruteForceMotifSearchAgain(DNA, t, n, l) s  (1,1,…, 1) bestScore  Score(s,DNA) while forever s  NextLeaf (s, t, n- l +1) if (Score(s,DNA) > bestScore) bestScore  Score(s, DNA) bestMotif  (s1,s2 , . . . , st) return bestMotif 11/13/2018 CSE 5290, Fall 2011

Can We Do Better? Sets of s=(s1, s2, …,st) may have a weak profile for the first i positions (s1, s2, …,si) Every row of alignment may add at most l to Score Optimism: if all subsequent (t-i) positions (si+1, …st) add (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 Use ByPass() 11/13/2018 CSE 5290, Fall 2011

Branch and Bound Algorithm for Motif Search Since each level of the tree goes deeper into search, discarding a prefix discards all following branches This saves us from looking at (n – l + 1)t-i leaves Use NextVertex() and ByPass() to navigate the tree 11/13/2018 CSE 5290, Fall 2011

Pseudocode for Branch and Bound Motif Search BranchAndBoundMotifSearch(DNA,t,n,l) s  (1,…,1) bestScore  0 i  1 while i > 0 if i < t optimisticScore  Score(s, i, DNA) +(t – i ) * l if optimisticScore < bestScore (s, i)  Bypass(s,i, n-l +1) else (s, i)  NextVertex(s, i, n-l +1) if Score(s,DNA) > bestScore bestScore  Score(s) bestMotif  (s1, s2, s3, …, st) (s,i)  NextVertex(s,i,t,n-l + 1) return bestMotif 11/13/2018 CSE 5290, Fall 2011

Median String Search Improvements Recall the computational differences between motif search and median string search The Motif Finding Problem needs to examine all (n-l +1)t combinations for s. The Median String Problem needs to examine 4l combinations of v. This number is relatively small We want to use median string algorithm with the Branch and Bound improvement. 11/13/2018 CSE 5290, Fall 2011

Branch and Bound Applied to Median String Search Note that if the total distance for a prefix is greater than that for the best word so far: TotalDistance (prefix, DNA) > BestDistance there is no use exploring the remaining part of the word We can eliminate that branch and BYPASS exploring that branch further 11/13/2018 CSE 5290, Fall 2011

Bounded Median String Search BranchAndBoundMedianStringSearch(DNA,t,n,l ) s  (1,…,1) bestDistance  ∞ i  1 while i > 0 if i < l prefix  string corresponding to the first i nucleotides of s optimisticDistance  TotalDistance(prefix,DNA) if optimisticDistance > bestDistance (s, i )  Bypass(s,i, l, 4) else (s, i )  NextVertex(s, i, l, 4) word  nucleotide string corresponding to s if TotalDistance(s,DNA) < bestDistance bestDistance  TotalDistance(word, DNA) bestWord  word (s,i )  NextVertex(s,i,l, 4) return bestWord 11/13/2018 CSE 5290, Fall 2011

Improving the Bounds Given an l-mer w, divided into two parts at point i u : prefix w1, …, wi, v : suffix wi+1, ..., wl Find minimum distance for u in a sequence No instances of u in the sequence have distance less than the minimum distance Note this doesn’t tell us anything about whether u is part of any motif. We only get a minimum distance for prefix u 11/13/2018 CSE 5290, Fall 2011

Improving the Bounds (cont’d) Repeating the process for the suffix v gives us a minimum distance for v Since u and v are two substrings of w, and included in motif w, we can assume that the minimum distance of u plus minimum distance of v can only be less than the minimum distance for w 11/13/2018 CSE 5290, Fall 2011

Better Bounds 11/13/2018 CSE 5290, Fall 2011

Better Bounds (cont’d) If d(prefix) + d(suffix) > bestDistance: Motif w (prefix.suffix) cannot give a better (lower) score than d(prefix) + d(suffix) In this case, we can ByPass() 11/13/2018 CSE 5290, Fall 2011

More on the Motif Problem Exhaustive Search and Median String are both exact algorithms They always find the optimal solution, though they may be too slow to perform practical tasks Many algorithms sacrifice optimal solution for speed Examples: Local search, Stochastic sampling… 11/13/2018 CSE 5290, Fall 2011