 Proceedings
 Open Access
 Published:
Optimal assembly for high throughput shotgun sequencing
BMC Bioinformatics volume 14, Article number: S18 (2013)
Abstract
We present a framework for the design of optimal assembly algorithms for shotgun sequencing under the criterion of complete reconstruction. We derive a lower bound on the read length and the coverage depth required for reconstruction in terms of the repeat statistics of the genome. Building on earlier works, we design a de Brujin graph based assembly algorithm which can achieve very close to the lower bound for repeat statistics of a wide range of sequenced genomes, including the GAGE datasets. The results are based on a set of necessary and sufficient conditions on the DNA sequence and the reads for reconstruction. The conditions can be viewed as the shotgun sequencing analogue of UkkonenPevzner's necessary and sufficient conditions for Sequencing by Hybridization.
Introduction
Problem statement
DNA sequencing is the basic workhorse of modern day biology and medicine. Since the sequencing of the Human Reference Genome ten years ago, there has been an explosive advance in sequencing technology, resulting in several orders of magnitude increase in throughput and decrease in cost. Multiple "nextgeneration" sequencing platforms have emerged. All of them are based on the wholegenome shotgun sequencing method, which entails two steps. First, many short reads are extracted from random locations on the DNA sequence, with the length, number, and error rates of the reads depending on the particular sequencing platform. Second, the reads are assembled to reconstruct the original DNA sequence.
Assembly of the reads is a major algorithmic challenge, and over the years dozens of assembly algorithms have been proposed to solve this problem [1]. Nevertheless, the assembly problem is far from solved, and it is not clear how to compare algorithms nor where improvement might be possible. The difficulty of comparing algorithms is evidenced by the recent assembly evaluations Assemblathon 1 [2] and GAGE [3], where which assembler is "best" depends on the particular dataset as well as the performance metric used. In part this is a consequence of metrics for partial assemblies: there is an inherent tradeoff between larger contiguous fragments (contigs) and fewer mistakes in merging contigs (misjoins). But more fundamentally, independent of the metric, performance depends critically on the dataset, i.e. length, number, and quality of the reads, as well as the complexity of the genome sequence.
With an eye towards the near future, we seek to understand the interplay between these factors by using the intuitive and unambiguous metric of complete reconstruction. The notion of complete reconstruction can be thought of as a mathematical idealization of the notion of "finishing" a sequencing project as defined by the National Human Genome Research Institute [4], where finishing a chromosome requires at least 95% of the chromosome to be represented by a contiguous sequence. Note that this objective of reconstructing the original DNA sequence from the reads contrasts with the many optimizationbased formulations of assembly, such as shortest common superstring (SCS) [5], maximumlikelihood [6], [7], and various graphbased formulations [8], [9]. When solving one of these alternative formulations, there is no guarantee that the optimal solution is indeed the original sequence.
Given the goal of complete reconstruction, the most basic questions are 1) feasibility: given a set of reads, is it possible to reconstruct the original sequence? 2) optimality: which algorithms can successfully reconstruct whenever it is feasible to reconstruct? The feasibility question is a measure of the intrinsic information each read provides about the DNA sequence, and for given sequence statistics depends on characteristics of the sequencing technology such as read length and noise statistics. As such, it can provide an algorithmindependent basis for evaluating the efficiency of a sequencing technology. Equally important, algorithms can be evaluated on their relative read length and data requirements, and compared against the fundamental limit.
In studying these questions, we consider the most basic shotgun sequencing model where N noiseless reads (i.e. exact subsequences) of a fixed length L base pairs are uniformly and independently drawn from a DNA sequence of length G. In this statistical model, feasibility is rephrased as the question of whether, for given sequence statistics, the correct sequence can be reconstructed with probability 1  ∈ when N reads of length L are sampled from the genome. We note that answering the feasibility question of whether each N, L pair is sufficient to reconstruct is equivalent to finding the minimum required N (or the coverage depth c = NL/G) as a function of L.
A lower bound on the minimum coverage depth needed was obtained by Lander and Waterman [10]. Their lower bound c_{LW} = c_{LW}(L, ∈) is the minimum number of randomly located reads needed to cover the entire DNA sequence with a given target success probability 1  ∈. While this is clearly a necessary condition, it is in general not tight: only requiring the reads to cover the entire genome sequence does not guarantee that consecutive reads can actually be stitched back together to recover the original sequence. Characterizing when the reads can be reliably stitched together, i.e. determining feasibility, is an open problem. In fact, the ability to reconstruct depends crucially on the repeat statistics of the DNA sequence.
An earlier work [11] has answered the feasibility and optimality questions under an i.i.d. model for the DNA sequence. However, real DNA, especially those of eukaryotes, have much longer and complex repeat structures. Here, we are interested in determining feasibility and optimality given arbitrary repeat statistics. This allows us to evaluate algorithms on statistics from already sequenced genomes, and gives confidence in predicting whether the algorithms will be useful for an unseen genome with similar statistics.
Results
Our approach results in a pipeline, which takes as input a genome sequence and desired success probability 1  ∈, computes a few simple repeat statistics, and from these statistics computes a feasibility plot that indicates for which L, N reconstruction is possible. Figure 1 displays the simplest of the statistics, the number of repeats as a function of the repeat length ℓ. Figure 2 shows the resulting feasibility plot produced for the statistics of human chromosome 19 (henceforth hc19) with success probability 99%. The horizontal axis signifies read length L and the vertical axis signifies the normalized coverage depth $\stackrel{\u0304}{c}:=c/{c}_{LW}$, the coverage depth c normalized by c_{LW}, the coverage depth required as per LanderWaterman [10] in order to cover the sequence.
Since the coverage depth must satisfy c ≥ c_{LW}, the normalized coverage depth satisfies $\stackrel{\u0304}{c}\ge 1$, and we plot the horizontal line $\stackrel{\u0304}{c}=1$. This lower bound holds for any assembly algorithm. In addition, there is another lower bound, shown as the thick black nearly vertical line in Figure 2. In contrast to the coverage lower bound, this lower bound is a function of the repeat statistics. It has a vertical asymptote at L_{crit} := max{ℓ_{interleaved}, ℓ_{triple}} + 1, where ℓ_{interleaved} is the length of the longest interleaved repeats in the DNA sequence and ℓ_{triple} is the length of the longest triple repeat (see Section for precise definitions). Our lower bound can be viewed as a generalization of a result of Ukkonen [12] for Sequencing by Hybridization to the shotgun sequencing setting.
Each colored curve in the feasibility plot is the lower boundary of the set of feasible N,L pairs for a specific algorithm. The rightmost curve is the one achieved by the greedy algorithm, which merges reads with largest overlaps first (used for example in TIGR [13], CAP3 [14], and more recently SSAKE [15]). As seen in Figure 2, its performance curve asymptotes at L = ℓ_{repeat}, the length of the longest repeat. De Brujin graph based algorithms (e.g. [16] and [8]) take a more global view via the construction of a de Brujin graph out of all the Kmers of the reads. The performance curves of all Kmer graph based algorithms asymptote at read length L = L_{crit}, but different algorithms use read information in a variety of ways to resolve repeats in the Kmer graph and thus have different coverage depth requirement beyond read length L_{crit}. By combining the ideas from several existing algorithms (including [8], [17]) we designed MULTI BRIDGING, which is very close to the lower bound for this dataset. Thus Figure 2 answers, up to a very small gap, the feasibility of assembly for the repeat statistics of hc19, where successful reconstruction is desired with probability 99%.
We produce similar plots for a dozen or so datasets (Additional file 1). For datasets where ℓ_{interleaved} is significantly larger than ℓ_{triple} (the majority of the datasets we looked at, including those used in the recent GAGE assembly algorithm evaluation [3]), MULTI BRIDGING is near optimal, thus allowing us to characterize the fundamental limits for these repeat statistics (Figure 9). On the other hand, if ℓ_{triple} is close to or larger than ℓ_{interleaved}, there is a gap between the performance of MULTI BRIDGING and the lower bound (see for example Figure 3). The reason for the gap is explained later in the paper.
An interesting feature of the feasibility plots is that for typical repeat statistics exhibited by DNA data, the minimum coverage depth is characterized by a critical phenomenon: If the read length L is below L_{crit} = ℓ_{interleaved}, reliable reconstruction of the DNA sequence is impossible no matter what the coverage depth is, but if the read length L is slightly above L_{crit}, then covering the sequence suffices, i.e. $\stackrel{\u0304}{c}=c/{c}_{\mathsf{\text{LW}}}=1$. The sharpness of the critical phenomenon is described by the size of the critical window, which refers to the range of L over which the transition from one regime to the other occurs. For the case when MULTI BRIDGING is near optimal, the width W of the window size can be well approximated as:
For the hc19 dataset, the critical window size evaluates to about 19% of L_{crit}.
In Sections and, we discuss the underlying analysis and algorithm design supporting the plots. The curves are all computed from formulas, which are validated by simulations. We return in Section to put our contributions in a broader perspective and discuss extensions to the basic framework. All proofs can be found in the appendix.
Lower bounds
In this section we discuss lower bounds, due to coverage analysis and certain repeat patterns, on the required coverage depth and read length. The style of analysis here is continued in Section, in which we search for an assembly algorithm that performs close to the lower bounds.
Coverage bound
Lander and Waterman's coverage analysis [10] gives the well known condition for the number of reads N_{LW} required to cover the entire DNA sequence with probability at least 1  ∈. In the regime when L ≪ G, one may make the standard assumption that the starting locations of the N reads follow a Poisson process with rate λ = N/G, and the number N_{LW} is to a very good approximation given by the solution to the equation
The corresponding coverage depth is c_{LW} = N_{LW}L/G. This is our baseline coverage depth against which to compare the coverage depth of various algorithms. For each algorithm, we will plot
the coverage depth required by that algorithm normalized by c_{LW}. Note that $\stackrel{\u0304}{c}$ is also the ratio of the number of reads N required by an algorithm to N_{LW}. The requirement $\stackrel{\u0304}{c}\ge 1$ is due to the lower bound on the number of reads obtained by the LanderWaterman coverage condition.
Ukkonen's condition
A second constraint on reads arises from repeats. A lower bound on the read length L follows from Ukkonen's condition [12]: if there are interleaved repeats or triple repeats in the sequence of length at least L  1, then the likelihood of observing the reads is the same for more than one possible DNA sequence and hence correct reconstruction is not possible. Figure 4 shows an example with interleaved repeats. (Note that we assume 1∈ > 1/2, so random guessing between equally likely sequences is not viable.)
We take a moment to carefully define the various types of repeats. Let ${\mathsf{\text{s}}}_{t}^{\ell}$ denote the lengthℓ subsequence of the DNA sequence s starting at position t. A repeat of length ℓ is a subsequence appearing twice, at some positions t_{1}, t_{2} (so ${\mathsf{\text{s}}}_{{t}_{1}}^{\ell}={\mathsf{\text{s}}}_{{t}_{2}}^{\ell}$) that is maximal (i.e. s(t_{1}  1) ≠ s(t_{2}  1) and s(t_{1} + ℓ) ≠ s(t_{2} + ℓ)). Similarly, a triple repeat of length ℓ is a subsequence appearing three times, at positions t_{1}, t_{2}, t_{3}, such that ${\mathsf{\text{s}}}_{{t}_{1}}^{\ell}={\mathsf{\text{s}}}_{{t}_{2}}^{\ell}={\mathsf{\text{s}}}_{{t}_{3}}^{\ell}$, and such that neither of s(t_{1}  1) = s(t_{2}  1) = s(t_{3}  1) nor s(t_{1} + ℓ) = s(t_{2} + ℓ) = s(t_{3} + ℓ) holds. (Note that a subsequence that is repeated f times gives rise to ${(}_{2}^{f})$ repeats and ${(}_{3}^{f})$ triple repeats.) A copy is a single one of the instances of the subsequence's appearances. A pair of repeats refers to two repeats, each having two copies. A pair of repeats, one at positions t_{1}, t_{3} with t_{1} < t_{3} and the second at positions t_{2}, t_{4} with t_{2} < t_{4}, is interleaved if t_{1} < t_{2} < t_{3} < t_{4} or t_{2} < t_{1} < t_{4} < t_{3} (Figure 4). The length of a pair of interleaved repeats is defined to be the length of the shorter of the two repeats.
Ukkonen's condition implies a lower bound on the read length,
Here ℓ_{interleaved} is the length of the longest pair of interleaved repeats on the DNA sequence and ℓ_{triple} is the length of the longest triple repeat.
Ukkonen's condition says that for read lengths less than L_{crit}, reconstruction is impossible no matter what the coverage depth is. But it can be generalized to provide a lower bound on the coverage depth for read lengths greater than L_{crit}, through the important concept of bridging as shown in Figure 5. We observe that in Ukkonen's interleaved or triple repeats, the actual length of the repeated subsequences is irrelevant; rather, to cause confusion it is enough that all the copies of the pertinent repeats are unbridged. This leads to the following theorem.
Theorem 1. Given a DNA sequence s and a set of reads, if there is a pair of interleaved repeats or a triple repeat whose copies are all unbridged, then there is another sequence s' of the same length under which the likelihood of observing the reads is the same.
For brevity, we will call a repeat or a triple repeat bridged if at least one copy of the repeat is bridged, and a pair of interleaved repeats bridged if at least one of the repeats is bridged. Thus, the above theorem says that a necessary condition for reconstruction is that all interleaved and triple repeats are bridged.
How does Theorem 1 imply a lower bound on the coverage depth? Focus on the longest pair of interleaved repeats and suppose the read length L is between the lengths of the shorter and the longer repeats. The probability this pair is unbridged is ${\left({p}_{{\ell}_{\mathsf{\text{inter}}1\mathsf{\text{eaved}}}}^{\mathsf{\text{unbridged}}}\right)}^{2}$, where
Theorem 1 implies that the probability of making an error in the reconstruction is at least 1/2 if this event occurs. Hence, the requirement that P_{error} ≤ ∈ implies a lower bound on the number of reads N:
A similar lower bound can be derived using the longest triple repeat. A slightly tighter lower bound can be obtained by taking into consideration the bridging of all the interleaved and triple repeats, not only the longest one, resulting in the black curve in Figure 2.
Towards optimal assembly
We now begin our search for algorithms performing close to the lower bounds derived in the previous section. Algorithm assessment begins with obtaining deterministic sufficient conditions for success in terms of repeatbridging. We then find the necessary N and L in order to satisfy these sufficient conditions with a target probability 1  ∈. The required coverage depth for each algorithm depends only on certain repeat statistics extracted from the DNA data, which may be thought of as sufficient statistics.
Greedy algorithm
The greedy algorithm, denoted GREEDY, with pseudocode in the supplementary material, is described as follows. Starting with the initial set of reads, the two fragments (i.e. subsequences) with maximum length overlap are merged, and this operation is repeated until a single fragment remains. Here the overlap of two fragments x, y is a suffix of x equal to a prefix of y, and merging two fragments results in a single longer fragment.
Theorem 2. GREEDY reconstructs the original sequence s if every repeat is bridged.
Theorem 2 allows us to determine the coverage depth required by GREEDY: we must ensure that all repeats are bridged. By the union bound,
where ${p}_{m}^{\mathsf{\text{unbridged}}}$ is defined in (3) and a_{ m } is the number of repeats of length m. Setting the righthand side of (5) to ∈ ensures P_{error} ≤ ∈ and yields the performance curve of GREEDY in Figure 2. Note that the repeat statistics {a_{ m }} are sufficient to compute this curve.
GREEDY requires L > ℓ_{repeat} + 1, whereas the lower bound has its asymptote at L = ℓ_{interleaved} + 1. In chromosome 19, for instance, there is a large difference between ℓ_{interleaved} = 2248 and ℓ_{repeat} = 4092, and in Figure 2 we see a correspondingly large gap. GREEDY is evidently suboptimal in handling interleaved repeats. Its strength, however, is that once the reads are slightly longer than ℓ_{repeat}, coverage of the sequence is sufficient for correct reconstruction. Thus if ℓ_{repeat} ≈ ℓ_{interleaved}, then GREEDY is close to optimal.
Kmer algorithms
The greedy algorithm fails when there are unbridged repeats, even if there are no unbridged interleaved repeats, and therefore requires a read length much longer than that required by Ukkonen's condition. As we will see, Kmer algorithms do not have this limitation.
Background
In the introduction we mention Sequencing By Hybridization (SBH), for which Ukkonen's condition was originally introduced. In the SBH setting, an optimal algorithm matching Ukkonen's condition is known, due to Pevzner [18].
Pevzner's algorithm is based on finding an appropriate cycle in a Kmer graph (also known as a de Bruijn graph) with K = L  1 (see e.g. [19] for an overview). A Kmer graph is formed by first creating a node in the graph for each unique Kmer (length K subsequence) in the set of reads, and then adding an edge with overlap K  1 between any two nodes representing K mers that are adjacent in a read, i.e. offset by a single nucleotide. Edges thus correspond to unique (K + 1)mers in s and paths correspond to longer subsequences obtained by merging the constituent nodes. There exists a cycle corresponding to the original sequence s, and reconstruction entails finding this cycle.
As is common, we will replace edges corresponding to an unambiguous path by a single node (c.f. Figure 6). Since the subsequences at some nodes are now longer than K, this is no longer a Kmer graph, and we call the more general graph a sequence graph. The simplified graph is called the condensed sequence graph.
The condensed graph has the useful property that if the original sequence s is reconstructible, then s is determined by a unique Eulerian cycle:
Theorem 3. Let ${G}_{0}$ be the Kmer graph constructed from the(K + 1)spectrum ${\mathcal{S}}_{K+1}$ of s , and let $G\phantom{\rule{0.3em}{0ex}}$be the condensed sequence graph obtained from ${G}_{0}$. If Ukkonen's condition is satisfied, i.e. there are no triple or interleaved repeats of length at least K, then there is a unique Eulerian cycle $\mathcal{C}\phantom{\rule{0.3em}{0ex}}$in $G\phantom{\rule{0.3em}{0ex}}$and $\mathcal{C}\phantom{\rule{0.3em}{0ex}}$corresponds to s.
Theorem 3 characterizes, deterministically, the values of K for which reconstruction from the (K + 1)spectrum is possible. We proceed with application of the Kmer graph approach to shotgun sequencing data.
Basic Kmer algorithm
Starting with Idury and Waterman [16], and then Pevzner et al.'s [8] EULER algorithm, most current assembly algorithms for shotgun sequencing are based on the Kmer graph. Idury and Waterman [16] made the key observation that SBH with subsequences of length K+1 can be emulated by shotgun sequencing if each read overlaps the subsequent read by K: the set of all (K +1)mers within the reads is equal to the (K+1)spectrum ${\mathcal{S}}_{K+1}$. The resultant algorithm DE BRUIJN which consists of constructing the K mer graph from the (K+1)spectrum observed in the reads, condensing the graph, and then identifying an Eulerian cycle, has sufficient conditions for correct reconstruction as follows.
Theorem 4. DE BRUIJN with parameter choice K reconstructs the original sequence s if:

(a)
K > ℓ _{ interleaved }

(b)
K > ℓ _{ triple }

(c)
adjacent reads overlap by at least K
Lander and Waterman's coverage analysis applies also to Condition (c) of Theorem 4, yielding a normalized coverage depth requirement $\stackrel{\u0304}{c}=1/\left(1K/L\right)$. The larger the overlap K, the higher the coverage depth required. Conditions (a) and (b) say that the smallest K one can choose is K = max{ℓ_{triple}, ℓ_{interleaved}} + 1, so
The performance of DE BRUIJN is plotted in Figure 2. DE BRUIJN significantly improves on GREEDY by obtaining the correct first order performance: given sufficiently many reads, the read length L may be decreased to {ℓ_{triple}, ℓ_{interleaved}} + 1. Still, the number of reads required to approach this critical length is far above the lower bound. The following subsection pursues reducing K in order to reduce the required number of reads.
Improved Kmer algorithms
Algorithm DE BRUIJN ignores a lot of information contained in the reads, and indeed all of the Kmer based algorithms proposed by the sequencing community (including [16], [8], [20], [21], [22], [23]) use the read information to a greater extent than the naive DE BRUIJN algorithm. Better use of the read information, as described below in algorithms SIMPLE BRIDGING and MULTI BRIDGING, will allow us to relax the condition K > max{ℓ_{interleaved}, ℓ_{triple}} for success of DE BRUIJN, which in turn reduces the high coverage depth required by Condition (c).
Existing algorithms use read information in a variety of distinct ways to resolve repeats. For instance, Pevzner et al. [8] observe that for graphs where each edge has multiplicity one, if one copy of a repeat is bridged, the repeat can be resolved through what they call a "detachment". The algorithm SIMPLE BRIDGING described below is very similar, and resolves repeats with two copies if at least one copy is bridged.
Meanwhile, other algorithms are better suited to higher edge multiplicities due to higher order repeats; IDBA (Iterative DeBruijn Assembler) [17] creates a series of Kmer graphs, each with larger K, and at each step uses not just the reads to identify adjacent Kmers, but also all the unbridged paths in the Kmer graph with smaller K. Although not stated explicitly in their paper, we observe here that if all copies of every repeat are bridged, then IDBA correctly reconstructs.
However, it is suboptimal to require that all copies of every repeat up to the maximal K be bridged. We introduce MULTI BRIDGING, which combines the aforementioned ideas to simultaneously allow for singlebridged double repeats, triple repeats in which all copies are bridged, and unbridged noninterleaved repeats.
SimpleBridging
SIMPLE BRIDGING improves on DE BRUIJN by resolving bridged 2repeats (i.e. a repeat with exactly two copies in which at least one copy is bridged by a read). Condition (a) K > ℓ_{interleaved} for success of DE BRUIJN (ensuring that no interleaved repeats appear in the initial Kmer graph) is updated to require only no unbridged interleaved repeats, which matches the lower bound. With this change, Condition (b) K > ℓ_{triple} forms the bottleneck for typical DNA sequences. Thus SIMPLE BRIDGING is optimal with respect to interleaved repeats, but it is suboptimal with respect to triple repeats.
SIMPLE BRIDGING deals with repeats by performing surgery on certain nodes in the sequence graph. In the sequence graph, a repeat corresponds to a node we call an Xnode, a node with indegree and outdegree each at least two (e.g. Figure 7). A selfloop adds one each to the in degree and outdegree. The cycle $\mathcal{C}\left(\mathsf{\text{s}}\right)$ traverses each Xnode at least twice, so Xnodes correspond to repeats in s. We call an Xnode traversed exactly twice a 2Xnode; these nodes correspond to 2repeats, and are said to be bridged if the corresponding repeat in s is bridged.
In the repeat resolution step of SIMPLE BRIDGING (illustrated in Figure 7), bridged 2Xnodes are duplicated in the graph and incoming and outgoing edges are inferred using the bridging read, reducing possible ambiguity.
Theorem 5. SIMPLE BRIDGING with parameter choice K reconstructs the original sequence s if:

(a)
all interleaved repeats are bridged

(b)
K > ℓ _{ triple }

(c)
adjacent reads overlap by at least K.
By the union bound,
where b_{ m,n } is the number of interleaved repeats in which one repeat is of length m and the other is of length n. To ensure that condition (a) in the above theorem fails with probability no more than ∈, the right hand side of (7) is set to be ∈; this imposes a constraint on the coverage depth. Furthermore, conditions (b) and (c) imply that the normalized coverage depth $\stackrel{\u0304}{c}\ge 1/\left(1\left({\ell}_{\mathsf{\text{triple}}}+1\right)/L\right)$. These two constraints together yield the performance curve of SIMPLE BRIDGING in Figure 2.
MultiBridging
We now turn to triple repeats. As previously observed, it can be challenging to resolve repeats with more than one copy [8], because an edge into the repeat may be paired with more than one outgoing edge. As discussed above, our approach here shares elements with IDBA [17]: we note that increasing the node length serves to resolve repeats. Unlike IDBA, we do not increase the node length globally.
As noted in the previous subsection, repeats correspond to nodes in the sequence graph we call Xnodes. Here the converse is false: not all repeats correspond to Xnodes. A repeat is said to be allbridged if all repeat copies are bridged, and an Xnode is called allbridged if the corresponding repeat is allbridged.
The requirement that triple repeats be all bridged allows them to be resolved locally (Figure 8). The Xnode resolution procedure given in Step 4 of MULTI BRIDGING can be interpreted in the Kmer graph framework as increasing K locally so that repeats do not appear in the graph. In order to do this, we introduce the following notation for extending nodes: Given an edge (v, q) with weight a_{v,q}, let v^{→q}denote v extended one base to the right along (v, q), i.e. ${\mathsf{\text{v}}}^{\to \mathsf{\text{q}}}={\mathsf{\text{vq}}}_{{a}_{vq}+1}^{1}$ (notation introduced in Sec.). Similarly, let ${}^{p\to}\mathsf{\text{v}}={\mathsf{\text{p}}}_{\mathsf{\text{end}}{a}_{pv}}^{1}\mathsf{\text{v}}$. MULTI BRIDGING is described as follows.
Algorithm 1 MULTI BRIDGING. Input: reads $\mathcal{R}\phantom{\rule{0.3em}{0ex}}$, parameter K. Output: sequence $\widehat{\mathsf{\text{s}}}$.
Kmer steps 13:
1. For each subsequence x of length K in a read, form a node with label x.
2. For each read, add edges between nodes representing adjacent Kmers in the read.
3. Condense the graph (c.f. Figure 6).
4. Bridging step: (See Figure 8). While there exists a bridged Xnode v: (i) For each edge (p_{ i }, v) with weight ${a}_{{p}_{i,}v}$, create a new node ${\mathsf{\text{u}}}_{i}{=}^{{\mathsf{\text{p}}}_{i}\to}v$ and an edge (p_{ i }, u_{ i }) with weight $1+{a}_{{p}_{i,}v}$. Similarly for each edge (v, q_{ j } ), create a new node ${w}_{j}={v}^{\to {q}_{j}}$ and edge (w_{j} , q_{ j } ). (ii) If v has a selfloop (v, v) with weight a_{v,v}, add an edge $\left({v}^{\to v}{,}^{v\to}v\right)$ with weight a_{v,v}+ 2. (iii) Remove node v and all incident edges. (iv) For each pair u_{ i }, w_{ j } adjacent in a read, add edge (u_{ i },w_{ j } ). If exactly one each of the u_{ i } and w_{ j } nodes have no added edge, add the edge. (v) Condense graph.
5. Finishing step: Find an Eulerian cycle in the graph and return the corresponding sequence.
Theorem 6. The algorithm MULTI BRIDGING reconstructs the sequence s if:

(a)
all interleaved repeats are bridged

(b)
all triple repeats are allbridged

(c)
the sequence is covered by the reads.
A similar analysis as for SIMPLE BRIDGING yields the performance curve of MULTI BRIDGING in Figure 2.
Gap to lower bound
The only difference between the sufficient condition guaranteeing the success of MULTI BRIDGING and the necessary condition of the lower bound is the bridging condition of triple repeats: while MULTI BRIDGING requires bridging all three copies of the triple repeats, the necessary condition requires only bridging a single copy. When ℓ_{triple} is significantly smaller than ℓ_{interleaved}, the bridging requirement of interleaved repeats dominates over that of triple repeats and MULTI BRIDGING achieves very close to the lower bound. This occurs in hc19 and the majority of the datasets we looked at. (See Figure 9 and the plots in additional file 1.) A critical phenomenon occurs as L increases: for L < L_{crit} reconstruction is impossible, over a small critical window the bridging requirement of interleaved repeats (primarily the longest) dominates, and then for larger L, coverage suffices.
On the other hand, when ℓ_{triple} is comparable or larger than ℓ_{interleaved}, then MULTI BRIDGING has a gap in the coverage depth to the lower bound (see for example Figure 3). If we further assume that the longest triple repeat is dominant, then this gap can be calculated to be a factor of $\mathsf{\text{3}}\cdot \frac{\text{log}3{\epsilon}^{1}}{\text{log}{\epsilon}^{1}}\approx 3.72$ for ∈ = 10^{2}. This gap occurs only within the critical window where the repeatbridging constraint is active. Beyond the critical window, the coverage constraint dominates and MULTI BRIDGING is optimal. Further details are provided in the appendices.
Simulations and complexity
In order to verify performance predictions, we implemented and ran the algorithms on simulated errorfree reads from sequenced genomes. For each algorithm, we sampled (N, L) points predicted to give < 5% error, and recorded the number of times correct reconstruction was achieved out of 100 trials. Figure 9 shows results for the three GAGE reference sequences.
We now estimate the runtime of MULTI BRIDGING. The algorithm has two phases: the Kmer graph formation step, and the repeat resolution step. The Kmer graph formation runtime can be easily bounded by O((LK)NK), assuming O(K) lookup time for each of the (LK)N Kmers observed in reads. This step is common to all Kmer graph based algorithms, so previous works to decrease the practical runtime or memory requirements are applicable.
The repeat resolution step depends on the repeat statistics and choice of K. It can be loosely bounded as $O\left({\sum}_{\ell =K}^{L}L{\sum}_{\begin{array}{c}\text{max}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\mathsf{\text{repeats}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}x\\ \mathsf{\text{of}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\mathsf{\text{length}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\ell \end{array}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}{d}_{x}\right)$. The second sum is over distinct of length maximal repeats x of length ℓ and d_{ x } is the number of (not necessarily maximal) copies of repeat x. The bound comes from the fact that each maximal repeat of length K < ℓ < L is resolved via exactly one bridged Xnode, and each such resolution requires examining at most the Ld_{ x } distinct reads that contain the repeat. We note that ${\sum}_{\ell =K}^{L}L{\sum}_{\begin{array}{c}\mathsf{\text{max}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\mathsf{\text{repeats}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}x\\ \mathsf{\text{of}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\mathsf{\text{length}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\ell \end{array}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}{d}_{x}<L{\sum}_{\ell =K}^{L}{a}_{\ell}$, and the latter quantity is easily computable from our sufficient statistics.
For our data sets, with appropriate choice of K, the bridging step is much simpler than the Kmer graph formation step: for R. sphaeroides we use K = 40 to get ${\sum}_{\ell =K}^{L}L{a}_{\ell}=412$; in contrast, N > 22421 for the relevant range of L. Similarly, for hc14, using K = 300, ${\sum}_{\ell =K}^{L}L{a}_{\ell}=661$ while N > 733550; for S. Aureus, ${\sum}_{\ell =K}^{L}L{a}_{\ell}=558$ while N > 8031.
Discussions and extensions
The notion of optimal shotgun assembly is not commonly discussed in the literature. One reason is that there is no universally agreedupon metric of success. Another reason is that most of the optimizationbased formulations of assembly have been shown to be NPhard, including Shortest Common Superstring [24], [5], De Bruijn Superwalk [8], [25], and Minimum sWalk on the string graph [9], [25]. Thus, it would seem that optimal assembly algorithms are out of the question from a computational perspective. What we show in this paper is that if the goal is complete reconstruction, then one can define a clear notion of optimality, and moreover there is a computationally efficient assembly algorithm (MULTI BRIDGING) that is near optimal for a wide range of DNA repeat statistics. So while the reconstruction problem may well be NPhard, typical instances of the problem seem much easier than the worstcase, a possibility already suggested by Nagarajan and Pop [26].
The MULTI BRIDGING algorithm is near optimal in the sense that, for a wide range of repeat statistics, it requires the minimum read length and minimum coverage depth to achieve complete reconstruction. However, since the repeat statistics of a genome to be sequenced are usually not known in advance, this minimum required read length and minimum required coverage depth may also not be known in advance. In this context, it would be useful for the MultiBridging algorithm to validate whether its assembly is correct. More generally, an interesting question is to seek algorithms which are not only optimal in their data requirements but also provide a measure of confidence in their assemblies.
How realistic is the goal of complete reconstruction given currentday sequencing technologies? The minimum read lengths L_{crit} required for complete reconstruction on the datasets we examined are typically on the order of 5003000 base pairs (bp). This is substantially longer than the reads produced by Illumina, the current dominant sequencing technology, which produces reads of lengths 100200bp; however, other technologies produce longer reads. PacBio reads can be as long as several thousand base pairs, and as demonstrated by [27], the noise can be cleaned by Illumina reads to enable near complete reconstruction. Thus our framework is already relevant to some of the current cutting edge technologies. To make our framework more relevant to shortread technologies such as Illumina, an important direction is to incorporate matepairs in the read model, which can help to resolve long repeats with short reads. Other extensions to the basic shotgun sequencing model: heterogenous read lengths: This occurs in some technologies where the read length is random (e.g. Pacbio) or when reads from multiple technologies are used. Generalized Ukkonen's conditions and the sufficient conditions of MULTI BRIDGING extend verbatim to this case, and only the computation of the bridging probability (3) has to be slightly modified.
nonuniform read coverage: Again, only the computation of the bridging probability has to be modified. One issue of interest is to investigate whether reads are sampled less frequently from long repeat regions. If so, our framework can quantify the performance hit.
double strand: DNA is doublestranded and consists of a lengthG sequence u and its reverse complement $\stackrel{\u0303}{u}$. Each read is either sampled from u or $\stackrel{\u0303}{u}$. This more realistic scenario can be mapped into our singlestrand model by defining s as the length2G concatenation of u and $\stackrel{\u0303}{u}$, transforming each read into itself and its reverse complement so that there are 2N reads. Generalized Ukkonen's conditions hold verbatim for this problem, and MULTI BRIDGING can be applied, with the slight modification that instead of looking for a single Eulerian path, it should look for two Eulerian paths, one for each component of the sequence graph after repeatresolution. An interesting aspect of this model is that, in addition to interleaved repeats on the single strand u, reverse complement repeats on u will also induce interleaved repeats on the sequence s.
Author's contributions
Author ordering is alphabetical. GB, MB, and DT developed the method, performed the mathematical analysis, and wrote the manuscript. MB and GB implemented the method. MB designed and carried out the simulations. All authors read and approved the final manuscript.
References
 1.
Wikipedia: Sequence assembly  Wikipedia, the free encyclopedia. 2012, [Online; accessed Nov202012], [http://en.wikipedia.org/wiki/Sequence_assembly]
 2.
Earl D, Bradnam K, John JS, Darling A, Lin D, Fass J, Yu HOK, Buffalo V, Zerbino DR, Diekhans M: Assemblathon 1: A competitive assessment of de novo short read assembly methods. Genome research. 2011, 21 (12): 22242241. 10.1101/gr.126599.111.
 3.
Steven Salzberg, Adam Phillippy, Aleksey Zimin, Daniela Puiu, Tanja Magoc, Sergey Koren, Todd Treangen, Michael Schatz, Arthur Delcher, Michael Roberts, Guillaume Marcais, Mihai Pop, James Yorke: GAGE: A critical evaluation of genome assemblies and assembly algorithms. Genome research. 2012, 22 (3): 557567. 10.1101/gr.131383.111.
 4.
NIH National Human Genome Research Institute. Human genome sequence quality standards. 2012, Online; accessed Dec122012, [http://www.genome.gov/10000923]
 5.
John Kececioglu, Eugene Myers: Combinatorial algorithms for DNA sequence assembly. Algorithmica. 1993, 13: 751.
 6.
Myers EW: Toward simplifying and accurately formulating fragment assembly. Journal of Computational Biology. 1995, 2 (2): 275290. 10.1089/cmb.1995.2.275.
 7.
Medvedev P, Brudnox M: Maximum likelihood genome assembly. Journal of computational Biology. 2009, 16 (8): 11011116. 10.1089/cmb.2009.0047.
 8.
Pevzner PA, Tang HT, Waterman MS: An Eulerian path approach to DNA fragment assembly. Proc Natl Acad Sci USA. 2001, 98: 974853. 10.1073/pnas.171285098.
 9.
Myers E: The fragment assembly string graph. Bioinformatics. 2005, 21: ii79ii85. 10.1093/bioinformatics/bti1114.
 10.
Lander ES, Waterman MS: Genomic mapping by fingerprinting random clones: A mathematical analysis. Genomics. 1988, 2 (3): 231239. 10.1016/08887543(88)900079.
 11.
Motahari SA, Bresler G, Tse D: Information theory of DNA sequencing. 2012, [http://arxiv.org/abs/1203.6233]
 12.
Ukkonen E: Approximate string matching with qgrams and maximal matches. Theoretical Computer Science. 1992, 92 (1): 191211. 10.1016/03043975(92)901434.
 13.
Sutton GG, White OW, Adams MD, Kerlavage Ar: TIGR Assembler: A new tool for assembling large shotgun sequencing projects. Genome Science & Technology. 1995, 1: 919. 10.1089/gst.1995.1.9.
 14.
Huang X, Madan A: CAP3: A DNA sequence assembly program. Genome Research. 1999, 9 (9): 868877. 10.1101/gr.9.9.868.
 15.
Warren RL, Sutton GG, Jones SJ, Holt RA: Assembling millions of short DNA sequences using SSAKE. Bioinformatics. 2007, 23: 500501. 10.1093/bioinformatics/btl629.
 16.
Idury R, Waterman MS: A new algorithm for DNA sequence assembly. J Comp Bio. 1995, 2: 291306. 10.1089/cmb.1995.2.291.
 17.
Peng Y, Leung H, Yiu S, Chin F: IDBAa practical iterative de Bruijn graph de novo assembler. Research in Computational Molecular Biology. 2010, 426440.
 18.
Pevzner PA: DNA physical mapping and alternating Eulerian cycles in colored graphs. Algorithmica. 1995, 13 (1/2): 77105.
 19.
Compeau P, Pevzner P, Tesler G: How to apply de Bruijn graphs to genome assembly. Nat Biotech. 2011, 29 (11): 987991. 10.1038/nbt.2023. 11
 20.
Jared Simpson, Wong Kim, Jackman Shaun, Schein Jacqueline, Jones Steven, İnanc Birol: ABySS: A parallel assembler for short read sequence data. Genome Research. 2009, 19 (6): 1117123. 10.1101/gr.089532.108.
 21.
Gnerre Sante, MacCallum Iain, Przybylski Dariusz, Ribeiro Filipe, Burton Joshua, Walker Bruce, Sharpe Ted, Hall Giles, Shea Terrance, Sykes Sean, Berlin Aaron, Aird Daniel, Costello Maura, Daza Riza, Williams Louise, Nicol Robert, Gnirke Andreas, Nusbaum Chad, Lander Eric, Jaffe David: Highquality draft assemblies of mammalian genomes from massively parallel sequence data. Proceedings of the National Academy of Sciences. 2011, 108 (4): 15131518. 10.1073/pnas.1017351108.
 22.
Maccallum Iain, Przybylski Dariusz, Gnerre Sante, Burton Joshua, Shlyakhter Ilya, Gnirke Andreas, Malek Joel, McKernan Kevin, Ranade Swati, Shea Terrance, Williams Louise, Young Sarah, Nusbaum Chad, Jaffe David: Allpaths 2: small genomes assembled accurately and with high continuity from short paired reads. Genome Biol. 2009, 10 (10): R10310.1186/gb20091010r103.
 23.
Daniel R, Zerbino , Ewan Birney: Velvet: algorithms for de novo short read assembly using de Bruijn graphs. Genome Res. 2008, 18 (5): 8219. 10.1101/gr.074492.107.
 24.
Gallant J, Maier D, Astorer J: On finding minimal length superstrings. Journal of Computer and System Sciences. 1980, 20 (1): 5058. 10.1016/00220000(80)900045.
 25.
Medvedev P, Georgiou K, Myers G, Brudno M: Computability of models for sequence assembly. Algorithms in Bioinformatics. 2007, 289301.
 26.
Nagarajan N, Pop M: Parametric complexity of sequence assembly: theory and applications to next generation sequencing. Journal of computational biology. 2009, 16 (7): 897908. 10.1089/cmb.2009.0005.
 27.
Sergey Koren, Michael Schatz, Brian Walenz, Jeffrey Martin, Jason Howard, Ganeshkumar Ganapathy, Zhong Wang, David Rasko, W Richard McCombie, Erich Jarvis, Adam Phillippy: Hybrid error correction and de novo assembly of singlemolecule sequencing reads. Nat Biotech. 2012, 30: 693700. 10.1038/nbt.2280.
Acknowledgements
The authors thank Yun Song, Lior Pachter, Sharon Aviran, and Serafim Batzoglou for stimulating discussions. This work is supported by the Center for Science of Information (CSoI), an NSF Science and Technology Center, under grant agreement CCF0939370. M. Bresler is also supported by NSF grant DBI0846015.
This article has been published as part of BMC Bioinformatics Volume 14 Supplement 5, 2013: Proceedings of the Third Annual RECOMB Satellite Workshop on Massively Parallel Sequencing (RECOMBseq 2013). The full contents of the supplement are available online at http://www.biomedcentral.com/bmcbioinformatics/supplements/14/S5.
Declarations
Publication of this article is funded by the NSF Center for Science of Information grant agreement CCF0939370.
Publisher's note
This article was omitted from the original supplement publication and thus the publication was updated on 9 July 2013.
Author information
Affiliations
Corresponding author
Additional information
Competing interests
The authors declare that they have no competing interests.
Electronic supplementary material
12859_2013_5968_MOESM1_ESM.PDF
Additional file 1: In this supplementary material, we display in Figures 1017 the output of our pipeline for 9 datasets (in addition to hc19, whose output is in the introduction, and the GAGE datasets R. sphaeroides, S. Aureus, and hc14). For each dataset we plot$\text{log}\left(1+{a}_{\ell}\right),$the log of one plus the number of repeats of each length ℓ. From the repeat statistics a_{ m }, b_{ m,n }, and c_{ m }, we produce a feasibility plot. The thick black line denotes the lower bound on feasible N, L, and the green line is the performance achieved by MULTI BRIDGING. (PDF 825 KB)
Rights and permissions
This article is published under license to BioMed Central Ltd. This is an open access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
About this article
Cite this article
Bresler, G., Bresler, M. & Tse, D. Optimal assembly for high throughput shotgun sequencing. BMC Bioinformatics 14, S18 (2013). https://doi.org/10.1186/1471210514S5S18
Published:
Keywords
 Read Length
 Shotgun Sequencing
 Repeat Statistic
 Coverage Depth
 Assembly Algorithm