What is the difference between the breakpoint graph and the de Bruijn graph?

The breakpoint graph and the de Bruijn graph are two key data structures in the studies of genome rearrangements and genome assembly. However, the classical breakpoint graphs are defined on two genomes (represented as sequences of synteny blocks), while the classical de Bruijn graphs are defined on a single genome (represented as DNA strings). Thus, the connection between these two graph models is not explicit. We generalize the notions of both the breakpoint graph and the de Bruijn graph, and make it transparent that the breakpoint graph and the de Bruijn graph are mathematically equivalent. The explicit description of the connection between these important data structures provides a bridge between two previously separated bioinformatics communities studying genome rearrangements and genome assembly.


Introduction
The de Bruijn graph is a data structure first brought to bioinformatics as a method to assemble genomes from the experimental data generated by sequencing by hybridization [1]. It later became the key algorithmic technique in genome assembly [2,3] that resulted in dozens of software tools [4][5][6][7][8][9][10][11][12]. In addition, the de Bruijn graphs have been used for repeat classification [13], de novo protein sequencing [14], synteny block construction [15,16], multiple sequence alignment [17], and other applications in genomics and proteomics.
The breakpoint graph is a data structure introduced to study the reversal distance [18], which has formed the basis for much algorithmic research on rearrangements over the last two decades [19].
Since the connections between the breakpoint graphs and the de Bruijn graphs was never explicitly described, researchers studying genome rearrangements often do not realize that breakpoint graphs are merely de Bruijn graphs in disguise. As a result, they often do not know how to move from the traditional breakpoint graphs on synteny blocks to the breakpoint graphs on genomes (with "single nucleotide" resolution), particularly in the case of doublestranded genomes with inverted repeats. Likewise, researchers working in genome assembly are often unaware about the connections between the de Bruijn graphs and the breakpoint graphs. As a result, the exchange of ideas between these two communities has been limited. For example, Iqbal et al. [20] recently introduced the notion of the colored de Bruijn graphs that resulted in a popular Cortex assembler. While the notion of the colored de Bruijn graphs is essentially identical to the notion of the breakpoint graph, authors of [20] are probably unaware about this connection since they provided no references to previous genome rearrangement studies. This is unfortunate since various results about the breakpoint graphs (e.g., the connection between rearrangements and alternating cycles) remained beyond the scope of this very useful study.
Recently, genome rearrangement studies moved from the level of synteny blocks to the level of single nucleotides [21]. Likewise, genome assembly experts recently moved towards the analysis of structural variations and comparative assembly of related species based on the analysis of the de Bruijn graphs [20]. We thus argue that the time has come to explain that the breakpoint graphs and the de Bruijn graphs are two identical data structures (if one ignores a cosmetic difference between them) as they both represent specific instances of a general notion of the A-Bruijn graph introduced in [13]. The A-Bruijn graphs are based on representing genomes as sets of labeled paths and further gluing identically labeled edges (breakpoint graphs) or vertices (de Bruijn graphs) in the resulting paths.
We argue that a unified framework covering both breakpoint and de Bruijn graphs is important to bridge the divide between researchers working with breakpoint graphs (that usually focus in rearrangements and ignore repeats) and researchers working with de Bruijn graphs (that usually focus on repeats and ignore rearrangements). In reality, there exists a complex interplay between rearrangements and repeats, e.g., LINE repeats and segmental duplications often trigger rearrangements [22][23][24]. However, this interplay is not explicitly revealed by the breakpoint graphs since they do not even encode repeats (repeats are intentionally masked at the synteny block construction step). For example, the interplay between LINEs and rearrangements cannot be derived from the breakpoint graph alone forcing Zhao and Bourque [23] to perform additional analysis. Our goal is to introduce the graphs that encode both rearrangements and repeats and immediately reveal this interplay. For example, encoding repeats present in the breakpoint regions (that may potentially trigger rearrangements) leads to gluing alternating cycles in the breakpoint graphs and requires development of new algorithms that integrate rearrangements and repeats. In such graphs, the classical non-self-intersecting alternating cycles formed by edges alternating between two colors (the workhorse of genome rearrangement studies) may turn into self-intersecting cycles formed by edges alternating between 3 colors, where the third color corresponds to repeated elements (see Figure 1). Nurk and Pevzner [25] recently used this framework to develop a new comparative genome analysis tool SPArcle and applied it to analyzing multiple bacterial strains resulting from the "controlled evolution" experiments [26]. SPArcle is based on SPAdes assembler and, in difference from Cortex, it uses ideas from the previous genome rearrangement studies (e.g., alternating cycles) to analyze the resulting A-Bruijn graphs.
Genome rearrangement studies usually start from constructing a set of synteny blocks shared by two genomes (see Figure 2). Each genome is defined as a sequence of synteny blocks separated by breakpoint regions and is represented as a path formed by alternating colored and black edges, where synteny blocks correspond to directed and labeled black edges and breakpoint regions correspond to undirected colored edges. Figure 3(a) presents paths corresponding to 11 synteny blocks shared by Human and Mouse × chromosomes. Each synteny block S i is represented as an directed black edge (S t i , S h i ), where S t i and S h i refer to the endpoints of the synteny blocks representing its tail and head, respectively. Two consecutive synteny blocks are separated by a breakpoint region in the Human (Mouse) × chromosome that is modeled by a red (blue) edge connecting the corresponding endpoints of these synteny blocks. The (traditional) breakpoint graph of Human and Mouse × chromosomes is obtained by "gluing" identically labeled black edges in these two paths as shown in Figure 3.
The multiple breakpoint graphs [27] are constructed from a set of k > 2 genomes using the same procedure. While every synteny block appears just once in each of the genomes shown above, the definition of the breakpoint graph naturally extends to the case when a synteny block appears multiple times (or does not appear in a particular genome).
The classical de Bruijn graph is defined on a single genome (represented as a DNA string), while the classical breakpoint graph is defined on two genomes (represented as sequences of synteny blocks). Since synteny blocks are DNA strings, the question arises whether one can study both the de Bruijn graph and the breakpoint graph in the same framework, and what is the difference between the de Bruijn graph and the breakpoint graph.
In this paper, we generalize the definitions of both the de Bruijn graph and the breakpoint graph for both single and multiple genomes and for both single-stranded and double-stranded cases. We further show that the breakpoint graph and the de Bruijn graph are mathematically equivalent.

A single genome (single-stranded case)
We now generalize the definition of the breakpoint graph to a single DNA strings. Traditionally, breakpoint graphs were defined on the set of synteny blocks rather than directly on DNA strings. Given a string String, we define its "synteny blocks" as its (k-1)-mers, represent each (k-1)-mer by a directed black edge, and construct an alternating path, denoted Path BP (String, k), by inserting directed colored edges between consecutive (k-1)mers. The breakpoint graph is obtained by gluing identical (k-1)-mers (directed black edges) in this path. It is easy to see that each breakpoint region connects 2 consecutive (k-1)-mers and thus corresponds to a kmer. The breakpoint graph of a string String, denoted BP (String, k), is shown in Figure 4.
Given a string String = s 1 s 2 . . . s n , the de Bruijn graph DB(String, k) is defined as follows. The string String is represented as a colored path Path DB (String, k), whose (n − k + 1) edges are labeled by k-mers, s 1 s 2 . . . s k , s 2 s 3 . . . s k+1 , . . ., and s n−k+1 s n−k+2 . . . s n . Implicitly, each vertex in the path is labeled by a (k-1)-mer. The de Bruijn graph DB(String, k) results from gluing identically labeled vertices in the path [28]. Figure 5 shows the de Bruijn graph on the same string as in Figure 4.
Comparison of Figure 4 and 5 reveals that BP (String, k) is equivalent to DB(String, k). BP (String, k) can be converted into DB(String, k) by collapsing all black edges, while DB(String, k) can be converted into BP (String, k) by expanding each vertex v into a directed edge (v′, v″) in such a way that all incoming edges into v (outgoing edges from v) become incoming edges into v′ (outgoing edges from v″). Table 1 summarizes the correspondence between BG(String, k) and DB(String, k).   We note that while the notions of the breakpoint graph and the de Bruijn graph were defined for a single string, the same definition works for a set of strings (see Figure 6).

Multiple genomes (single-stranded case)
Given genomes G A and G B (represented as sets of strings), we classify their k-mers into 3 classes: A (occur only in G A ), B (occur only in G B ) and AB (occur in both G A and G B ).
The breakpoint graph BP (G A , G B , k) is simply coloring the k-mer edges of the breakpoint graph BP(G A ∪ G B , k) into 3 colors: A (blue), B (red) and AB (green) (Figure 7). Similarly, the de Bruijn graph DB(G A , G B , k) is simply coloring the edges of the de Bruijn graph DB (G A ∪ G B , k) into 3 colors: A (blue), B (red) and AB (green) (see Figure 8).
In practice, both BP (G A , G B , k) and DB(G A , G B , k) are often condensed as follows.
A non-branching directed path consisting of 3 edges is called condensible in BP(G A , G B , k) if its middle edge is black and its starting and ending edges have the same color C. We substitute a condensible path by a single directed edge colored C with the same direction as the direction of the path. The condensed breakpoint graph CBP(G A , G B , k) iteratively replaces all condensible paths by single edges in BP(G A , G B , k) (Figure 7(c)). A new edge resulting from condensing a nonbranching path formed by edges e 1 , e 2 , and e 3 is assigned a label whose prefix is a label of e 1 and whose suffix is the label of e 3 (labeling of edges in the condensed graphs is not the focus of this paper and is not discussed in the examples below).
A non-branching directed path consisting of 2 edges is called condensible in DB(G A , G B , k) if its starting and ending edges have the same color C. We substitute a condensible path by a single edge colored C with the same direction as the direction of the path. The condensed de Bruijn graph CDB(G A , G B , k) iteratively replaces all condensible paths by single edges in DB(G A , G B , k) (Figure 8(c)).
Note that both the condensed breakpoint graph in Figure 7(c) and the condensed de Bruijn graph in Figure  8(c) reveal an alternating red-blue cycle on 6 edges, a signature of a transposition. While researchers working on genome rearrangements are well aware about alternating cycles in the breakpoint graphs, the researchers working on de Bruijn graphs may not know that these cycles represent fingerprints of rearrangements. Figure 7 and 8 illustrate that BP(G A , G B , k) is mathematically equivalent to DB(G A , G B , k). BP (G A , G B , k) can be converted into DB(G A , G B , k) by collapsing all black edges, while DB(G A , G B , k) can be converted into BP(G A , G B , k) by expanding all vertices. It is the same for the condensed case. Table 2 summarizes the comparison between DB(G A , G B , k) and BP(G A , G B , k).
While the above notions of the breakpoint graph and the de Bruijn graph were defined for 2 genomes, they naturally generalize to any number of genomes [27].

A single genome (double-stranded case)
We now generalize the notions of the de Bruijn and breakpoint graphs from single-stranded to doublestranded genomes. Instead of the explicit representation of both strands (like in most existing assemblers), we describe a more efficient representation that encodes both strands in a single canonical strand (compare with similar representations of both strands in SPAdes [12] and some other assemblers).  For a nucleotide x, we denote its complementary nucleotide as x, e.g., A = T T and C = G . Given a k-mer s = s 1 s 2 . . . s k , we define its reverse complement as the k-mer s = s k . . . s 2 s 1 . We call a k-mer canonical if it is smaller or equal (in the lexicographic order) than its reverse complement. For example, AG and AT are canonical 2-mers but CT is not a canonical 2-mer. In this section, we will represent strings as paths labeled only by canonical k-mers and will define the breakpoint and de Bruijn graphs as the results of gluing these paths.
While DB(String, k) and BP (String, k) glue identical (k-1)-mers in String, these graphs were not designed to glue a (k-1)-mer with its reverse complement (see Figure 9). In many applications, gluing (k-1)-mers with their reverse complements would be beneficial; for example, developers of many genome assemblers invest significant efforts in maintaining the "symmetric" de Bruijn graphs at all stages of the assembly so that the subgraph representing one strand is topologically identical to the subgraph representing another strand [12]. Since the breakpoint graph and the de Bruijn graph in Figure 9 do not allow one to analyze the interplay between rearrangements and inverted repeats, we need to come up with a new graph-theoretical model for double-stranded genomes. We note that since A-Bruijn graphs were designed to accommodate gluing of arbitrary positions in String (as long as they are defined as "aligned" in the A-Bruijn graph framework [13]), gluing (k-1)-mers with their reverse complements perfectly fits in the framework of the A-Bruijn graphs.
To model double-stranded strings as paths, we introduce the concept of a canonical path representing a string String (that differs from the standard representation of String as a path from Section 2). To transform a standard path Path BP (String, k) into a canonical path CPathBP (String, k), we reverse directions of all black edges labeled by non-canonical (k-1)-mers and change their labels into their reverse complements (see Figure 10, left). As a result, Figure 6 The the breakpoint graph (left) and the de Bruijn graph (right) of two strings CATGATC and CTGAG. all black edges in the canonical path are labeled by canonical (k-1)-mers.
To transform a standard path Path DB (String, k) into a canonical path CPath DB (String, k), we simply change labels of all vertices labeled by non-canonical (k-1)-mers into their reverse complements (see Figure 10, right).
After transforming standard paths Path BP (String, k) and Path DB (String, k) into a canonical paths CPath BP (String, k) and CPath DB (String, k) respectively, the definition of the breakpoint graph (gluing of identically labeled black edges in CPath BP (String, k)) and the de Bruijn graph (gluing of identically labeled vertices in Table 2 The correspondence between DB(G A , G B , k) and BP(G A , G B , k) (under the single-stranded representation) color red/blue/green directed edge blue in G A , red in G B , green in both G A and G B red/blue/green directed edge (E 2 ) blue in G A , red in G B , green in both G A and G B We refer to black directed edges in the de Bruijn graph as E 1 -edges and to colored directed edges as E 2 -edges CPath BP (String, k)) remain unchanged. Pairs of k-mer edges are also glued if they represent the reverse complement k-mer of each other and are labeled by both k-mers. The graphs obtained after gluing these paths are called the double-stranded breakpoint graph BP* (String, k) and the double-stranded de Bruijn graph DB* (String, k) ( Figure 10). While BP*(String, k) makes use of the direction of the black edge to represent whether the canonical string or its reverse complement is used, DB* (String, k) collapses all black edges into vertices and no longer maintains the direction information to distinguish these two possibilities.
A pair of vertices in DB* (String, k) labeled by canonical (k-1)-mers v and w may potentially correspond to 4 types of edges depending on whether the edge connects (i) v and w, (ii) v and w, (iii) v and w, and (iv) v and w (compare to the bi-directed de Bruijn graph [29]). As before, DB*(String, k) is obtained from BP*(String, k) by collapsing all black edges, while BP*(String, k) is obtained from DB*(String, k) by expanding all vertices into black edges (and connecting black edges according to the labels on the colored edges).
One may notice that while the double-stranded de Bruijn graph is similar to the bi-directional de Bruijn graph introduced in [29], it does not require the explicit introduction of the bi-directional edges. The notions of the double-stranded breakpoint graphs and de Bruijn graphs also can be naturally extended from a single double-stranded string to multiple double-stranded strings.

Multiple genomes (double-stranded case)
Given a string String = s 1 s 2 . . . s i−1 s i s i+1 . . . s j−1 s j s j+1 . . . s n−1 s n , a reversal of the segment s i s i+1 . . . s j−1 s j results in a string s 1 s 2 · · · s j s j−1 · · · s i+1 s i s j+1 · · · s n−1 s n where this segment is substituted by its reverse complement. Below we illustrate that reversals are represented as usual alternating blue-red cycles in the condensed double-stranded breakpoint and de Bruijn graphs.
Given two genomes G A and G B , we classify each kmer s into 3 classes: A (if either s or s belongs to G A but neither s or s belongs to G B ), B (if either s or s belongs to G B but neither s or s belongs to G A ) and AB (if both G A and G B contain either S or S ).
The double-stranded breakpoint graph BP*(G A , G B , k) is simply coloring the edges in BP* (G A ∪ G B , k) into 3 colors: A (blue), B (red) and AB (green) (Figure 11). Similarly, the double-stranded de Bruijn graph DB*(G A , G B , k) is simply coloring the edges in DB*(G A ∪ G B , k) into 3 colors: A (blue), B (red) and AB (green) (Figure 12).  Both BP*(G A , G B , k) and DB*(G A , G B , k) can be further condensed as described in Table 2 resulting in the condensed double-stranded breakpoint graph CBP* (G A , G B , k) and the condensed double-stranded de Bruijn graph CDB*(G A , G B , k), respectively (Figure 11(c) and Figure 12(c)).
As before, BP*(G A , G B , k) (CBP*(G A , G B , k)) is obtained from DB*(G A , G B , k) (CDB*(G A , G B , k)) by collapsing all black edges, while DB*(G A , G B , k) (CDB* (G A , G B , k)) is obtained from BP*(G A , G B , k) (CBP*(G A , G B , k)) by expanding all vertices into black edges (and connecting black edges according to the labels on the colored edges).
While the above notions of the double-stranded breakpoint graph and the double-stranded de Bruijn graph were defined for 2 genomes, they naturally generalize to any number of genomes.

Conclusion
We described the connection between the breakpoint graph and the de Bruijn graph that reveals that these constructions (that have been treated as two different data structures for over two decades) are essentially identical. We believe that the explicit description of this connection will contribute to a dialog between two previously separated bioinformatics communities studying genome rearrangements and genome assembly. It may also clarify the connection between the breakpoint graph, the de Bruijn graph, and the string graph introduced by Myers [30], another powerful paradigm for genome assembly. As hinted by Pop [31], the string graphs are functionally equivalent to the de Bruijn graphs, e.g., the comparison of Figure 1 in [30] and Figure 2 in [13]) suggests that the string graph is a special case of the ABruijn graph. Simpson and Durbin [32] further suggested that the de Bruijn graph and the string graph constructions on all the k-mers of a genome (using parameter τ = k − 1 for the string graph) are equivalent. However, the explicit description of this equivalence is still missing and we hope that the proposed A-Bruijn graph framework can be further extended to cover the string graphs as well.