Lecture 7: Assembly  Necessary Conditions for Successful Assembly
Monday 18 April 2016
Scribed by Vivek Kumar Bagaria and revised by the course staff
Topics
 The greedy algorithm (cont.)
 Interleaved Repeats
 Necessary conditions for genome assembly
 Dense Read Model and the Lspectrum
 de Bruijn Graphs
The greedy algorithm (cont.)
At the end of last lecture, we had proved the following theorem. Recall that a repeat is a subsequence of the genome that appears in multiple places. A repeat is also maximal in the sense that it cannot be extended and still be a repeat.
Theorem. Let a set of reads from a genome fully cover the genome. Moreover, suppose each repeat in the genome is bridged by at least one read. In other words, there exists a read that starts at least one base before a copy of every repeat and ends at least one base after. Then the greedy algorithm is guaranteed to reconstruct the original DNA.
We note that the condition for this algorithm to succeed depends upon a property of the genome that is being inferred (i.e. if its repeats are bridged). Thus a priori given a set of reads, it is not clear if the greedy algorithm will succeed. Despite this, we note that this theorem can be applied in two ways:
 One could run the greedy algorithm on a set of reads. If this returns a sequence, then one can find the set of all repeats in the assembled sequence and check if each one of them is bridged. If that is the case then we have a certificate of the greedy algorithm succeeding in assembling the underlying genome. If there are any unbridged repeats, then whether the greedy algorithm has returned the right genome is unclear.
 We can use the theorem to compute the read lengths and coverage necessary for the greedy algorithm to succeed in known genomes. This can be used as a benchmark on its performance.
Given a known genome of length , the probability that the greedy algorithm will succeed assembling from reads of length is the probability that every repeat in is bridged by a read.
To compute this we begin by computing the probability that a repeat of length is bridged by a read of length . We note that this happens if the read starts at a position in the window before either repeat (Note that the bridging condition requires the read to extend at least one base after the repeat, and hence the ). We also assume that there exists at least 1 base between the two repeats. Thus,
Thus we have that,
Let the genome have repeats of lengths . If a repeat appears 5 times, then it is counted 5 times towards . Further, let us assume that for . After getting reads of length from the genome,
where is the coverage depth, and the first inequality follows from a union bound. To change the perspective a bit we define,
This gives us that,
We note that to compute this upper bound on probability of failure of greedy algorithm, the number of repeats of a given length, are sufficient statistics (and if there is a repeat of length atleast , greedy fails with probability ).
Interleaved Repeats
In the last two sections we gave a lower bound on the number of reads necessary for assembly using the LanderWaterman calculation. We then went through the greedy algorithm and derived the number of reads necessary to achieve a given probability of successful assembly.
This number is shown below for an example genome, Chromosome 19. We note that while the LanderWaterman calculation gives us a lowerbound independent of the repeat statistics of the genome, the greedy algorithm gives us an achievable scheme that depends upon repeat statistics of the genome. In particular, we note the greedy algorithm fails if the read length is smaller than the length of the longest repeat in the genome. In this section, we derive a genomedependent lowerbound on both the read length and number of reads required for successful assembly.
A pair of repeats are said to be interleaved repeats if they appear alternately in the genome. The length of the shorter of two interleaved repeats is called the length of the interleaved repeat. For example, in the figure below, and are interleaved repeats, and the length of the interleaved repeat is the length of .
An interleaved repeat is said to be bridged if at least one copy of one of the repeats is bridged.
Triple Repeats
A triple repeat is a repeat that appears thrice in the genome. This is a special case of an interleaved repeat. This is illustrated below.
Necessary conditions for genome assembly
Theorem [Ukkonen 1992; Bresler, Bresler, and Tse 2013]: Assembly of a genome is impossible if any interleaved repeat is not bridged.
As a corollary, we note that this theorem means that the at least one copy of a triple repeat needs to be bridged for assembly of a genome to be feasible.
Proof by picture
Using calculations almost identical to those used in quantifying the performance of the greedy algorithm, we can derive a curve showing the number of reads necessary for successful assembly in a given genome. This is shown for an example genome below
Dense Read Model and the Lspectrum
To come up with an algorithm that performs better than the greedy algorithm, we first take a detour. We consider an idealized setting called the dense read model. Trying to solve the assembly problem in this setting gives us an algorithm which we can then modify for the shotgun sequencing case.
A dense read model assumes that we have a read starting at every position in the genome. The multiset of reads thus obtained is called the Lspectrum.
This is illustrated below.
The Lspectrum can be thought of as the set of all unique lengthL reads we obtain when we have infinitely many reads from the genome (unique in terms of position).
de Bruijn graphs
In graph theory, the standard de Bruijn graph is the graph obtained by taking all strings over any finite alphabet of length as vertices,= and adding edges between vertices that have an overlap of . In the following, we consider assembly using a slightly modified version of the standard de Bruijn graph from the Lspectrum of a genome.
Given the Lspectrum of a genome, we construct a de Bruijn graph as follows:

Add a vertex for each (L1)mer in the Lspectrum.

Add kedges between two (L1)mers if their overlap has length L2 and the corresponding Lmer appears k times in the Lspectrum.
An example de Bruijn graph construction is shown below.
We note that an Eulerian path in the de Bruijn graph corresponds to a sequence consistent with an Lspectrum. Thus if a de Bruijn graph corresponding to the Lspectrum of a genome has a unique Eulerian path, then a genome can be assembled from its Lspectrum.
Theorem [Pevzner 1995]: If L  1 is strictly greater than the maximum interleaved repeat length of a genome, then the de Bruin graph corresponding to the Lspectrum of the genome has a unique Eulerian path corresponding to the original genome.
This gives us Ukkonenâ€™s lower bound; successful assembly can be achieved as the number of reads become arbitrarily large.