1 / 82

Graph Algorithms in Bioinformatics

Graph Algorithms in Bioinformatics. Credits: Batzoglou, S., Jones, N. C., Pevzner, P. A. . Outline. Introduction to Graph Theory Eulerian & Hamiltonian Cycle Problems DNA Sequencing The Shortest Superstring & Traveling Salesman Problems Sequencing by Hybridization

jana
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 Credits: Batzoglou, S., Jones, N. C., Pevzner, P. A.

  2. Outline • Introduction to Graph Theory • Eulerian & Hamiltonian Cycle Problems • DNA Sequencing • The Shortest Superstring & Traveling Salesman Problems • Sequencing by Hybridization • Fragment Assembly and Repeats in DNA • Fragment Assembly Algorithms

  3. The Bridge Obsession Problem Find a tour crossing every bridge just once Leonhard Euler, 1735 Bridges of Königsberg

  4. Eulerian Cycle Problem • Find a cycle that visits everyedge exactly once • Linear time (~e, where “e” is the number of edges) More complicated Königsberg

  5. Find a cycle that visits every vertex exactly once NP – complete Hamiltonian Cycle Problem Game invented by Sir William Hamilton in 1857

  6. Polynomial Time: P • The notion of polynomial time is a natural notion of efficientalgorithms, and many simple problems can be solved by algorithms that run in polynomial time: for example, given a number of cities n cities with the distances between them and a home city among them, find the shortest paths from the home city to all other cities. This problem can be solved in number of steps proportional to p(n) = n2, hence polynomial time. • Problems that are solvable by such efficient algorithms comprise a class of problems known as P (for polynomial-time computable).

  7. Travelling Salesperson Problem (TSP) • In this problem one is given a number of cities with the distances between them, and a maximum mileage that the salesperson can travel. • The goal of the problem is to find a tour of all the cities that covers a distance less than the maximum mileage. • All algorithms for solving this problem thus far have amounted to the following: Try out all the possible tours that the salesperson could make, measure the length of each, and determine if there is one whose length is less than the maximum.

  8. Travelling Salesperson Problem (TSP) • Even for an instance of this problem involving a modest 30 cities, this search process could take many ages of the universe to complete! • On the other hand, suppose we just guessed a tour. Suppose the one we guessed had a distance below the maximum. We would have been very lucky indeed, but given that lucky break, we would have solved the problem quickly. • Thus allowing nondeterminism in algorithms (in the form of guessing) appears to make them more powerful.

  9. Nondeterministic Polynomial Time: NP • The class of problems solvable in this way is known as NP. • Those are the problems whose (tentative) solutions can be verified in polynomial time. • Is TSP in the class P, that is, efficiently solvable? • Is P = NP? • Intuitively, the answer is “no”. • To see this, we can phrase the question in more everyday terms. It is legitimate to think of P as those problems that can be easily solved. By contrast, NP can be thought of as those problems whose solutions can be easily verified once they have been found. • The question, “Is P=NP?” thus roughly translates to, “Is it just as easy to find the solution to a problem as it is to recognize that you have found one?” Surely not; looking up the answer to a problem and verifying its correctness is easier than solving it by yourself!

  10. Nondeterministic Polynomial Time: NP • Despite the strong intuition that the answer is negative, proving this has been found to be an extremely difficult problem. • The “P=?NP” question is sometimes referred to as the “Holy Grail of Computer Science”. • It has been named as one of the Millennium Prize Problems by the Clay Mathematical Institute (each carrying a one million dollar prize).

  11. NP-Complete Problems • The hardest problems in the class NP. • All problems in NP are “reducible” to any NP-complete problem, such as Hamiltonian cycle problem or TSP. • If any NP-complete problem is in the class P, then NP = P. • If NP = P then there will be no secure encryption scheme! All cryptographic protocols become easily breakable.

  12. DNA Sequencing: History Gilbert method (1977): chemical method to cleave DNA at specific points (G, G+A, T+C, C). Sanger method (1977): labeled ddNTPs terminate DNA copying at random points. • Both methods generate labeled fragments of varying lengths that are further electrophoresed.

  13. 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

  14. DNA Sequencing • Shear DNA into millions of small fragments • Read 500 – 700 nucleotides at a time from the small fragments (Sanger method)

  15. 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 intractable problem

  16. Shortest Superstring Problem (SSP) • 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

  17. Shortest Superstring Problem: Example

  18. Reducing SSP to TSP • Define overlap ( si, sj ) as the length of the longest prefix of sj that matches a suffix of si. aaaggcatcaaatctaaaggcatcaaa aaaggcatcaaatctaaaggcatcaaa What is overlap ( si, sj ) for these strings?

  19. Reducing SSP to TSP • Define overlap ( si, sj ) as the length of the longest prefix of sj that matches a suffix of si. aaaggcatcaaatctaaaggcatcaaa aaaggcatcaaatctaaaggcatcaaa aaaggcatcaaatctaaaggcatcaaa overlap=12

  20. Reducing SSP to TSP • Define overlap ( si, sj ) as the length of the longest prefix of sj that matches a suffix of si. aaaggcatcaaatctaaaggcatcaaa aaaggcatcaaatctaaaggcatcaaa aaaggcatcaaatctaaaggcatcaaa • 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 a modified version of the Traveling Salesman Problem (TSP); it is also NP–complete.

  21. Reducing SSP to TSP (cont’d)

  22. Shortest Superstring Problem: Example

  23. S = { ATC, CCA, CAG, TCC, AGT } SSP AGT CCA ATC ATCCAGT TCC CAG SSP to TSP: An Example TSP ATC 2 0 1 1 AGT 1 CCA 1 2 2 2 1 TCC CAG ATCCAGT

  24. Sequencing by Hybridization (SBH): History • 1988: SBH suggested as an an alternative sequencing method. Nobody believed 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)

  25. 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.

  26. How SBH Works (cont’d) • Using a spectroscopic detector, determine which probes hybridize to the DNA fragment to obtain the l–mer composition of the target DNA fragment. • Apply the combinatorial algorithm (below) to reconstruct the sequence of the target DNA fragment from the l – mer composition.

  27. Hybridization on DNA Array

  28. l-mer composition • Spectrum ( s, l ) - unordered set of all possible (n – l + 1) l-mers 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}

  29. l-mer composition • Spectrum ( s, l ) - unordered set of all possible (n – l + 1) l-mers 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} • We usually choose the lexicographically maximal representation as the canonical one.

  30. Different sequences – the same spectrum • Different sequences may have the same spectrum: Spectrum(GTATCT,2)= Spectrum(GTCTAT,2)= {AT, CT, GT, TA, TC}

  31. The SBH Problem • Goal: Reconstruct a string from its l-mer composition • Input: A set S, representing all l-mers from an (unknown) string s • Output: String s such that Spectrum ( s, l ) = s

  32. SBH: Hamiltonian Path Approach S = { ATG AGG TGC TCC GTC GGT GCA CAG } H AGG TGC TCC GTC GCA CAG GGT ATG ATG C A G G T C C Path visited every VERTEX once

  33. A more complicated graph: S = { ATG TGG TGC GTG GGC GCA GCG CGT } SBH: Hamiltonian Path Approach

  34. S = { ATG TGG TGC GTG GGC GCA GCG CGT } Path 1: SBH: Hamiltonian Path Approach ATGCGTGGCA Path 2: ATGGCGTGCA

  35. CG GT TG CA AT GC Path visited every EDGE once. GG SBH: Eulerian Path Approach S = { ATG, TGC, GTG, GGC, GCA, GCG, CGT, TGG } Vertices correspond to (l – 1)–mers : { AT, TG, GC, GG, GT, CA, CG } Edges correspond to l–mers from S ATGCGTGGCA ATG

  36. S = { AT, TG, GC, GG, GT, CA, CG } corresponds to two different paths: SBH: Eulerian Path Approach CG CG GT GT AT TG AT TG GC GC CA CA GG GG ATGGCGTGCA ATGCGTGGCA

  37. Euler’s Theorem • A graph is balanced if for every vertex the number of incoming edges equals to the number of outgoing edges: in(v) = out(v) • Theorem: A connected graph is Eulerian (i.e., it has an Euler cycle) if and only if each of its vertices is balanced.

  38. Euler Theorem: Proof • Eulerian → balanced for every edge entering v (incoming edge) there exists an edge leaving v (outgoing edge). Therefore in(v)=out(v) • Balanced → Eulerian ???

  39. 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 graph is Eulerian this dead end is necessarily the starting point, i.e., vertex v.

  40. Algorithm for Constructing an Eulerian Cycle (cont’d) b. If cycle from (a) above doesn’t cover the whole graph, it must contain a vertex w, which has un-traversed edges. Perform step (a) again, using vertex w as the starting point. Once again, we will end up in the starting vertex w.

  41. Algorithm for Constructing an Eulerian Cycle (cont’d) c. Combine the cycles from (a) and (b) into a single cycle and iterate step (b).

  42. Euler Theorem: Extension • Theorem: A connected graph has an Eulerian path if and only if it contains at most two semi-balanced vertices (one has one more outgoing edge and the other has one more incoming edge) and all other vertices are balanced.

  43. Some Difficulties with SBH • Fidelity of Hybridization: difficult to detect differences between probes hybridized with perfect matches and 1 or 2 mismatches • Array Size: Effect of low fidelity can be decreased with longer l-mers, but array size increases exponentially in l. Array size is limited with current technology. • Practicality: SBH is still impractical. As DNA microarray technology improves, SBH may become practical in the future • Practicality again: Although SBH is still impractical, it spearheaded expression analysis and SNP analysis techniques

  44. Shotgun Sequencing genomic segment cut many times at random (Shotgun) Get one or two reads from each segment plasmids (2 – 10 Kbp) ~500 bp ~500 bp cosmids (40 Kbp)

  45. Steps to Assemble a Genome Some Terminology read a 500-900 long word that comes out of sequencer mate pair a pair of reads from two ends of the same insert fragment contig a contiguous sequence formed by several overlapping reads with no gaps supercontig an ordered and oriented set (scaffold) of contigs, usually by mate pairs consensus sequence derived from the sequene multiple alignment of reads in a contig 1. Find overlapping reads 2. Merge some “good” pairs of reads into longer contigs 3. Link contigs to form supercontigs 4. Derive consensus sequence ..ACGATTACAATAGGTT..

  46. Fragment Assembly reads Cover region with ~7-fold redundancy Overlap reads and extend to reconstruct the original genomic region

  47. Read Coverage Length of genomic segment: L Number of reads: n Coverage C = n l / L Length of each read: l How much coverage is enough? Lander-Waterman model: Assuming uniform distribution of reads, C=10 results in 1 gapped region per 1,000,000 nucleotides C

  48. Repeat Repeat Repeat Green and blue fragments are interchangeable when assembling repetitive DNA Challenges in Fragment Assembly • Repeats: A major problem for fragment assembly • > 50% of human genome are repeats: - over 1 million Alu repeats (about 300 bp) - about 200,000 LINE repeats (1000 bp and longer)

  49. Triazzle: A Fun Example The puzzle looks simple BUT there are repeats!!! The repeats make it very difficult. Try it – only $7.99 at www.triazzle.com

  50. Repeat Types • Low-Complexity DNA (e.g. ATATATATACATA…) • Microsatellite repeats (a1…ak)N where k ~ 3-6 (e.g. CAGCAGTAGCAGCACCAG) • Transposons/retrotransposons • SINEShort Interspersed Nuclear Elements (e.g., Alu: ~300 bp long, 106 copies) • LINELong Interspersed Nuclear Elements ~500 - 5,000 bp long, 200,000 copies • LTRretroposonsLong Terminal Repeats (~700 bp) at each end • Gene Families genes duplicate & then diverge • Segmental duplications ~very long, very similar copies

More Related