1 / 61

Graph Algorithms in Bioinformatics

Graph Algorithms in Bioinformatics. An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info. The Bridge Obsession Problem. Find a tour crossing every bridge just once Leonhard Euler, 1735. Bridges of Königsberg.

makoto
Download Presentation

Graph Algorithms in Bioinformatics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Graph Algorithmsin Bioinformatics An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  2. The Bridge Obsession Problem Find a tour crossing every bridge just once Leonhard Euler, 1735 Bridges of Königsberg An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  3. Eulerian Cycle Problem • Find a cycle that visits everyedge exactly once • Polynomial time More complicated Königsberg An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  4. Find a cycle that visits every vertex exactly once NP – complete Hamiltonian Cycle Problem Game invented by Sir William Hamilton in 1857 An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  5. Find a cycle that visits every vertex exactly once NP – complete Hamiltonian Cycle Problem Start Game invented by Sir William Hamilton in 1857 An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  6. Mapping Problems to Graphs • Arthur Cayley studied chemical structures of hydrocarbons in the mid-1800s • He used trees (acyclic connected graphs) to enumerate structural isomers An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  7. Seymour Benzer, 1950s Beginning of Graph Theory in Biology Benzer’s work • Developed deletion mapping • “Proved” linearity of the gene • Demonstrated internal structure of the gene An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  8. Viruses Attack Bacteria • Normally bacteriophage T4 kills bacteria • However if T4 is mutated (e.g., an important gene is deleted) it is disabled and looses its ability to kill bacteria • Suppose the bacteria is infected with two different mutants each of which is disabled – would the bacteria still survive? • Amazingly, a pair of disabled viruses can kill a bacteria. • How can it be explained? An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  9. Benzer’s Experiment • Idea: infect bacteria with pairs of mutant T4 bacteriophage (virus) • Each T4 mutant has an unknown interval deleted from its genome • If the two intervals overlap: T4 pair is missing part of its genome and is disabled – bacteria survive • If the two intervals do not overlap: T4 pair has its entire genome and is enabled – bacteria die An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  10. Complementation between pairs of mutant T4 bacteriophages An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  11. Benzer’s Experiment and Graphs • Construct an interval graph: each T4 mutant is a vertex, place an edge between mutant pairs where bacteria survived (i.e., the deleted intervals in the pair of mutants overlap) • Interval graph structure reveals whether DNA is linear or branched DNA A graph G = (V,E) is an interval graph if it captures the intersection relation for some set of intervals on the real line. Star graphs are interval graphs, but cycle graphs (for n≥4) are not (where a cycle graph is a graph on n nodes containing a single cycle through all nodes). Wolfram MathWorld An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  12. Interval Graph: Linear Genes An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  13. Not an Interval Graph: Branched Genes An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  14. Comparison Linear genome (interval graph) Branched genome (not an interval graph) An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  15. DNA Sequencing: History • Gilbert method (1977): • chemical method to cleave DNA at specific points. Sanger method(1977): labeled ddNTPs* terminate DNA copying at random points. • Both methods generate labeled fragments of varying lengths that are further electrophoresed. *dideoxynucleotides An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  16. DNA Sequencing • Shear DNA into millions of small fragments • Read 500 – 700 nucleotides at a time from the small fragments (Sanger method) An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  17. Start at primer (restriction site) Grow DNA chain Include ddNTPs Stops reaction at all possible points Separate products by length, using gel electrophoresis Sanger Method: Generating Read Sanger Ladder An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  18. Fragment Assembly • Computational Challenge: assemble individual short fragments (reads) into a single genomic sequence (“superstring”) • Until late 1990s the shotgun fragment assembly of human genome was viewed as an intractable problem An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  19. Shortest Superstring Problem • Problem: Given a set of strings, find a shortest string that contains all of them • Input: Strings s1, s2,…., sn • Output: A string s that contains all strings s1, s2,…., sn as substrings, such that the length of s is minimized • Complexity: NP – complete • Note: this formulation does not take into account sequencing errors An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  20. Shortest Superstring Problem: Example Set of strings: {AAA, AAT, ATA, ATT, TAA, TAT, TTA, TTT} Concatenation superstring: AAA AAT ATA ATT TAA TAT TTA TTT A shortest superstring = ? An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  21. Shortest Superstring Problem: Example Set of strings: {AAA, AAT, ATA, ATT, TAA, TAT, TTA, TTT} Concatenation superstring: AAA AAT ATA ATT TAA TAT TTA TTT A shortest superstring An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  22. Reducing SSP to TSP • Define overlap ( si, sj ) as the length of the longest prefix of sj that matches a suffix of si. atcggcatcaaatctaaaggcatcaaa aaaggcatcaaatctaaaggcatcaaa si = = sj What is overlap ( si, sj ) for these strings? An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  23. Reducing SSP to TSP • Define overlap ( si, sj ) as the length of the longest prefix of sj that matches a suffix of si. atcggcatcaaatctaaaggcatcaaa aaaggcatcaaatctaaaggcatcaaa si = = sj What is overlap ( si, sj ) for these strings? An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  24. Reducing SSP to TSP • Define overlap ( si, sj ) as the length of the longest prefix of sj that matches a suffix of si. atcggcatcaaatctaaaggcatcaaa aaaggcatcaaatctaaaggcatcaaa overlap=12 si = = sj An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  25. Reducing SSP to TSP • Define overlap ( si, sj ) as the length of the longest prefix of sj that matches a suffix of si. atcggcatcaaatctaaaggcatcaaa aaaggcatcaaatctaaaggcatcaaa overlap=12 si = = sj • Construct a graph with n vertices representing the n strings s1, s2,…., sn. • Insert edges of length overlap ( si, sj ) between vertices siand sj. • Find the “longest” path which visits every vertex exactly once. This is the modified Traveling Salesman Problem (TSP), which is also NP–complete. An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  26. Reducing SSP to TSP (cont’d) An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  27. S = { ATC, CCA, CAG, TCC, AGT } SSP to TSP: An Example An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  28. S = { ATC, CCA, CAG, TCC, AGT } SSP to TSP: An Example ATC CCA AGT TCC CAG An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  29. S = { ATC, CCA, CAG, TCC, AGT } SSP to TSP: An Example ATC 2 0 1 1 CCA AGT 1 1 2 2 2 1 TCC CAG An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  30. S = { ATC, CCA, CAG, TCC, AGT } SSP to TSP: An Example ATC 2 0 1 1 CCA AGT 1 1 2 2 2 1 TCC CAG ATCCAGT An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  31. S = { ATC, CCA, CAG, TCC, AGT } SSP AGT CCA ATC ATCCAGT TCC CAG SSP to TSP: An Example TSP ATC 2 0 1 1 CCA AGT 1 1 2 2 2 1 TCC CAG ATCCAGT An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  32. Sequencing by Hybridization (SBH): History • 1988: SBH suggested as an alternative sequencing method. Few believe it will ever work • 1991: Light directed polymer synthesis developed by Steve Fodor and colleagues. • 1994: Affymetrix develops first 64-kb DNA microarray First microarray prototype (1989) First commercial DNA microarray prototype w/16,000 features (1994) 500,000 features per chip (2002) An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  33. How SBH Works • Attach all possible DNA probes of length l to a flat surface, each probe at a distinct and known location. This set of probes is called the DNA array. • Apply a solution containing fluorescently labeled DNA fragment to the array. • The DNA fragment hybridizes with those probes that are complementary to substrings of length l of the fragment. • Using a spectroscopic detector, determine which probes hybridize to the DNA fragment to obtain the lmer composition of the target DNA fragment. • Apply the combinatorial algorithm (below) to reconstruct the sequence of the target DNA fragment from the lmer composition. An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  34. Hybridization on DNA Array An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  35. l-mer composition • Spectrum ( s, l ) - unorderedmultiset1of all possible (n – l + 1) lmers in a string s of length n • The order of individual elements in Spectrum ( s, l ) does not matter • For s = TATGGTGC all of the following are equivalent representations of Spectrum ( s, 3 ): {TAT, ATG, TGG, GGT, GTG, TGC} {ATG, GGT, GTG, TAT, TGC, TGG} {TGG, TGC, TAT, GTG, GGT, ATG} 1Note that, because the spectrum is actually a multiset, there could be repeated lmers. For example, the spectrum (s,3) of s = ACTGACT is {ACT, CTG, TGA, GAC, ACT}. We usually choose the lexicographically maximal representation as the canonical one. An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  36. Different sequences – the same spectrum • Different sequences may have the same spectrum: Spectrum(GTATCT,2)= Spectrum(GTCTAT,2)= {AT, CT, GT, TA, TC} An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  37. The SBH Problem • Goal: Reconstruct a string from its lmer composition • Input: A set S, representing all lmers from an (unknown) string s • Output: String s such that Spectrum (s, l ) = S An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  38. SBH: Hamiltonian Path Approach Definition: Two lmers p and q “overlap” if overlap(p, q)) = l-1 (i.e., last l-1 letters of p coincide with first l-1 letters of q. Method: • Given Spectrum(s, l) of a DNA fragment s, construct a directed graph H such that there is a vertex for every lmer in Spectrum(s, l) and a directed edge from p to q if p and q overlap. • Note: there is a 1-to-1 correspondence between paths that visit each vertex of H exactly once and DNA fragments with Spectrum(s, l). An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  39. SBH: Hamiltonian Path Approach S = { ATG AGG TGC TCC GTC GGT GCA CAG } ATG AGG TGC TCC GTC GCA CAG GGT H ATG C A G G T C C Path visited every VERTEX once An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  40. A more complicated graph: S = { ATG TGG TGC GTG GGC GCA GCG CGT } (i.e., showing choices…) SBH: Hamiltonian Path Approach An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  41. S= { ATG TGG TGC GTG GGC GCA GCG CGT } Path 1: SBH: Hamiltonian Path Approach ATGCGTGGCA Path 2: ATGGCGTGCA An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  42. CG GT TG CA AT GC Path visiting every EDGE once GG SBH: Eulerian Path Approach S = { ATG, TGG, TGC, GTG, GGC, GCA, GCG, CGT } Vertices correspond to (l – 1)mers : { AT, TG, GC, GG, GT, CA, CG } Edges correspond to lmers from S An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  43. S = { ATG, TGG, TGC, GTG, GGC, GCA, GCG, CGT } Vertices = { AT, TG, GC, GG, GT, CA, CG } Corresponds to two different paths: SBH: Eulerian Path Approach CG CG GT GT 5 4 6 5 4 3 TG AT TG GC AT GC 1 2 CA CA 1 7 8 8 2 3 6 7 GG GG ATGGCGTGCA ATGCGTGGCA An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  44. Euler Theorem • A graph is balanced if for every vertex the number of incoming edges equals to the number of outgoing edges: inDegree(v)=outDegree(v) • Theorem: A connected graph is Eulerian (i.e., contains an Euler cycle) if and only if each of its vertices is balanced. An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  45. Euler Theorem: Proof • Eulerian → balanced For every edge entering v (incoming edge) there exists an edge leaving v (outgoing edge). Therefore inDegree(v)=outDegree(v) • Balanced → Eulerian ??? An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  46. Algorithm for Constructing an Eulerian Cycle • Start with an arbitrary vertex v and form an arbitrary cycle with unused edges until a dead end is reached. Since the sub-graph is Eulerian this dead end is necessarily the starting point, i.e., vertex v. An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  47. Algorithm for Constructing an Eulerian Cycle (cont’d) b. If cycle from (a) above is not an Eulerian cycle, it must contain a vertex w, which has untraversed edges. Perform step (a) again, using vertex w as the starting point. Once again, we will end up in the starting vertex w. An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  48. Algorithm for Constructing an Eulerian Cycle (cont’d) c. Combine the cycles from (a) and (b) into a single cycle and iterate step (b). An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  49. Algorithm for Constructing an Eulerian Cycle (cont’d) An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

  50. Euler Theorem: Extension • A vertex is semi-balanced if | inDegree(v) – outDegree(v) | = 1 • Theorem: A connected graph has an Eulerian path if and only if it contains at most two semi-balanced vertices and all other vertices are balanced. Note: assumes we do not pre-specify edge direction for the semi-balanced nodes… (i.e., consider ) or that inDegree(v) – outDegree(v) = -1 for the start node and inDegree(v) – outDegree(v) = 1 for the end node Example: Consider ATATAATTA for lmer length = 3 An Introduction to Bioinformatics Algorithms (Jones and Pevzner) www.bioalgorithms.info

More Related