Abstract
Background
The doublecutandjoin (DCJ) is a model that is able to efficiently sort a genome into another, generalizing the typical mutations (inversions, fusions, fissions, translocations) to which genomes are subject, but allowing the existence of circular chromosomes at the intermediate steps. In the general model many circular chromosomes can coexist in some intermediate step. However, when the compared genomes are linear, it is more plausible to use the socalled restricted DCJ model, in which we proceed the reincorporation of a circular chromosome immediately after its creation. These two consecutive DCJ operations, which create and reincorporate a circular chromosome, mimic a transposition or a blockinterchange. When the compared genomes have the same content, it is known that the genomic distance for the restricted DCJ model is the same as the distance for the general model. If the genomes have unequal contents, in addition to DCJ it is necessary to consider indels, which are insertions and deletions of DNA segments. Linear time algorithms were proposed to compute the distance and to find a sorting scenario in a general, unrestricted DCJindel model that considers DCJ and indels.
Results
In the present work we consider the restricted DCJindel model for sorting linear genomes with unequal contents. We allow DCJ operations and indels with the following constraint: if a circular chromosome is created by a DCJ, it has to be reincorporated in the next step (no other DCJ or indel can be applied between the creation and the reincorporation of a circular chromosome). We then develop a sorting algorithm and give a tight upper bound for the restricted DCJindel distance.
Conclusions
We have given a tight upper bound for the restricted DCJindel distance. The question whether this bound can be reduced so that both the general and the restricted DCJindel distances are equal remains open.
Background
The distance between two genomes is often computed using only the common content, which occurs in both genomes. Such distance takes into consideration only organizational operations, which change the organization of the genome, that is, the positions and orientations of DNA segments, number and types of chromosomes. Inversions, translocations, fusions and fissions are some of these operations [1]. All these rearrangements can be generically represented as doublecutandjoin (DCJ) operations [2]. The DCJ model has simple linear algorithms to compute the distance and to find an optimal sorting sequence [3]. However, while sorting a genome into another by DCJ, circular chromosomes can appear in the intermediate species [3]. In the general model many circular chromosomes can coexist in some intermediate species. Due to this fact, when the compared genomes are linear, it is desirable to consider the socalled restricted model, in which we proceed the reincorporation of a circular chromosome immediately after its creation [2,4]. These two consecutive DCJ operations, which create and reincorporate a circular chromosome, mimic a transposition or a blockinterchange. In other words, in the restricted model most of the classical organizational operations (reversals, translocations, fusions and fissions) cost one DCJ, while transpositions and blockinterchanges cost two DCJs.
When comparing genomes with the same content and without duplicated DNA segments, it is already known that the genomic distance for the restricted DCJ model is the same as the distance for the general model and can be computed in linear time [2,3]. In contrast, while the genomes can be sorted also in linear time in the general model [3], the best sorting algorithm in the restricted model up to now takes O(n log n) [4]. Figure 1 shows an example of a general and a restricted sorting sequence.
Figure 1. (i) An optimal sorting sequence in the general DCJ model  many circular chromosomes can coexist in the intermediate species. (ii) An optimal sorting sequence in the restricted DCJ model  a circular chromosome is immediately reincorporated after its excision. The distance is always the same for both general and restricted DCJ models.
If the genomes have unequal contents, in addition to DCJ operations it is necessary to consider insertions and deletions of DNA segments. Insertions and deletions are jointly called indels. In this context, linear algorithms were proposed to compute the distance and to find a sorting scenario in a general, unrestricted model that handles genomes without duplicated DNA segments, considering DCJ and indel operations [5,6]. During the evolution of many organisms, indel operations are said to occur more often than organizational operations and, consequently, should be assigned to a lower cost. Examples are bacteria that are obligate intracellular parasites, such as Rickettsia [7]. The genomes of such intracellular parasites are observed to have a reductive evolution, that is, the process by which genomes shrink and undergo extreme levels of gene degradation and loss.
The general DCJindel model has the flexibility of assigning different positive costs to DCJ and indel operations [5,6]. But, again, many circular chromosomes may coexist in intermediate stages of the sorting process. Thus, while sorting linear genomes, it would be more plausible to consider a restricted DCJindel model, in which a circular chromosome must be reincorporated immediately after its creation. Figure 2 shows an example of a general and a restricted sorting sequence with DCJs and indels. In this case, no algorithm was provided up to now and even the question whether the distance is the same for both the general and the restricted DCJindel models remains open. Here we address this issue and give a sorting algorithm and a tight upper bound for the restricted DCJindel distance, also allowing the assignment of distinct costs to indel and DCJ operations and with the restriction that the indel cost is upper bounded by the DCJ cost.
Figure 2. (i) An optimal sorting sequence in the general DCJindel model  many circular chromosomes can coexist in the intermediate species. (ii) An optimal sorting sequence in the restricted DCJindel model  a circular chromosome is immediately reincorporated after its excision. Although the number of steps in (i) and (ii) is the same, the question whether the distance is the same for both general and restricted DCJindel models is open. (The common content of the initial and the final genomes is represented in black, while the content exclusive to the initial genome is represented in red.).
This paper is organized as follows. In the remainder of this section we recall some key concepts of the DCJindel model with distinct operation costs [6], which is based on the DCJmodel [2,3]. We then develop a restricted DCJindel sorting algorithm, that gives an upper bound for the restricted DCJindel distance. Finally we conclude our work with some final remarks.
The DCJ model
A linear genome is composed of linear chromosomes and can be represented by a set of strings as follows. For each chromosome of each genome, we build a string obtained by the concatenation of all markers in . Each marker g is a DNA fragment and is represented by the symbol g, if it is read in direct orientation, or by the symbol , if it is read in reverse orientation. Each one of the two extremities of a linear chromosome is called a telomere, represented by the symbol ○.
Given two linear genomes A and B, possibly with unequal content, let , and be three disjoint sets, such that the set is the set of markers which occur in A and in B, the set is the set of markers which occur only in A and the set is the set of markers which occur only in B. The markers in and in are also called unique markers. As an example, consider the genomes and . Here we have , and .
Given two genomes A and B, we denote the two extremities of each by g^{t }(tail) and g^{h }(head). A adjacency or simply adjacency [5] in genome A (respectively in genome B) is a string , such that each γ_{i }is a telomere or an extremity of a marker from and ℓ is a substring composed of the markers which are between γ_{1 }and γ_{2 }in A (respectively in B) and contains no marker which also belongs to . The substring ℓ is the label of v. If ℓ is empty, the adjacency is said to be clean, otherwise it is said to be labeled. If a linear chromosome is composed only of markers which are not in , it is represented by an adjacency ○ℓ○.
DCJ operations
A cut performed on a genome A separates two adjacent markers of A. A cut affects a single adjacency v in A: it is done between two symbols of v, creating two open ends. A doublecut and join or DCJ applied on a genome A is the operation that performs cuts in two different adjacencies in A, creating four open ends, and joins these open ends in a different way. In other words, a DCJ rearranges two adjacencies in A, transforming them into two new adjacencies.
Consider a DCJ ρ applied to adjacencies v_{1 }= γ_{1}ℓ_{1}ℓ_{4}γ_{4 }and v_{2 }= γ_{3}ℓ_{3}ℓ_{2}γ_{2}, which creates x_{1 }= γ_{1}ℓ_{1}ℓ_{2}γ_{2 }and x_{2 }= γ_{3}ℓ_{3}ℓ_{4}γ_{4}. We represent such an operation as ρ = ({γ_{1}ℓ_{1}ℓ_{4}γ_{4}, γ_{3}ℓ_{3}ℓ_{2}γ_{2}} → {γ_{1}ℓ_{1}ℓ_{2}γ_{2}, γ_{3}ℓ_{3}ℓ_{4}γ_{4}}). The two adjacencies v_{1 }and v_{2 }are called the sources, while the two adjacencies x_{1 }and x_{2 }are called the resultants of ρ [8]. One or more labels among ℓ_{1}, ℓ_{2}, ℓ_{3 }and ℓ_{4 }can be equal to ε (the empty string), as well as one or more extremities among γ_{1}, γ_{2}, γ_{3 }and γ_{4 }can be equal to ○ (a telomere), A DCJ operation can correspond to several rearrangement events, such as an inversion, a translocation, a fusion or a fission [2].
Adjacency graph and the DCJ distance
Given two genomes A and B, the adjacency graph AG(A, B) [3] is the bipartite multigraph whose vertices are the adjacencies of A and of B and that has one edge for each common extremity of a pair of vertices. The graph AG(A, B) is composed of connected components that alternate vertices in genome A and in genome B. Each component can be either a cycle, or an ABpath (which has one endpoint in genome A and the other in B), or an AApath (which has both endpoints in genome A), or a BBpath (which has both endpoints in B). A special case of an AA or a BBpath is a linear singleton, that is a linear chromosome represented by an adjacency of type ○ℓ○. In Figure 3 we show the example of an adjacency graph.
Figure 3. For genomes A and B, the graph has one BB and two ABpaths.
Components with 3 or more vertices need to be reduced  by applying DCJ operations  to components with only 2 vertices, that can be cycles or ABpaths [8]. This procedure is called DCJsorting of A into B. The number of ABpaths in AG(A, B) is always even and a DCJ operation can be of three types [5]: it can either increase the number of cycles by one, or the number of ABpaths by two (optimal DCJ); or it does not affect the number of cycles and ABpaths (neutral DCJ); or it can either decrease the number of cycles by one, or the number of ABpaths by two (counteroptimal DCJ). We assign the same cost to any DCJ operation. For simplicity, we consider the DCJ cost equal to one. Then, the DCJ distance of A and B, denoted by d_{DCJ }(A, B), corresponds to the minimum number of steps required to do a DCJsorting of A into B and is given by the following theorem.
Theorem 1([3]) Given two genomes A and B without duplicated markers, we have , where is the set of common markers and c and b are, respectively, the number of cycles and of ABpaths in AG (A, B).
The DCJindel model with distinct costs
Although the DCJmodel was defined in the previous sections for genomes with unequal contents, only the common markers were handled. In this section we explain how to deal with unique markers, that are markers which occur only in genome A and markers which occur only in genome B.
Indel operations
In order to deal with unique markers, we need operations that change the content of a genome. These operations can be an insertion or a deletion of a block of contiguous markers. Insertions and deletions can be jointly called indel operations. We consider a model in which an indel only affects the label of one single adjacency, by deleting or inserting contiguous markers in this label, with the restriction that an insertion cannot produce duplicated markers [5]. In other words, while sorting A into B, the indel operations are the steps in which the markers in are deleted and the markers in are inserted.
Given ℓ_{3 }≠ ε, the deletion of ℓ_{3 }from the adjacency γ_{1}ℓ_{1}ℓ_{3}ℓ_{2}γ_{2 }is represented as (γ_{1}ℓ_{1}ℓ_{3}ℓ_{2}γ_{2 }→ γ_{1}ℓ_{1}ℓ_{2}γ_{2}), while the insertion of ℓ_{3 }in the adjacency γ_{1}ℓ_{1}ℓ_{2}γ_{2 }is represented as (γ_{1}ℓ_{1}ℓ_{2}γ_{2 }→ γ_{1}ℓ_{1}ℓ_{3}ℓ_{2}γ_{2}). One or both extremities among γ_{1 }and γ_{2 }can be equal to ○ (a telomere), as well as one or both labels among ℓ_{1 }and ℓ_{2}, can be equal to ε (the empty string). Observe that at most one chromosome can be entirely deleted or inserted at once. Moreover, since duplications are not allowed, an insertion of a marker that already exists is not allowed. Consequently, in this model, it is not possible to apply insertions and/or deletions involving the markers in .
Given two genomes A and B, the DCJindel distance of A and B, denoted by , is the minimum cost of a DCJindel sequence of operations which sorts A into B, assigning the cost of 1 to each DCJ and a positive cost w ≤ 1 to each indel operation. If w = 1, the DCJindel distance corresponds exactly to the minimum number of steps required to sort A into B [5].
Runs, indelpotential and the DCJindel distance
Let us recall the concept of run, introduced by Braga et al. [5]. Given two genomes A and B and a component C of AG(A, B), a run is a maximal subpath of C, in which the first and the last vertices are labeled and all labeled vertices belong to the same genome (or partition). A run is then a subpath of a component and can be represented by its list of vertices. A vertex v that corresponds to an entire run is called a compactrun. If a run is not compact, it is a longrun. An example of a component with 3 runs is given in Figure 4. A run in genome A is also called an run, and a run in genome B is called a run. We denote by Λ(C) the number of runs in a component C. While a path can have 0 or any positive number or runs, a cycle has either 0, 1, or an even number of runs.
Figure 4. An ABpath with 3 runs (extracted from Figure 3). The first and the second runs are compact, while the third run is long and composed of three vertices.
A set of labels of one genome can be accumulated with DCJs. In particular, when we apply optimal DCJs on only one component of the adjacency graph, we can accumulate an entire run into a single adjacency [5]. It is possible to do a separate DCJsorting using only optimal DCJs in any component C of AG(A, B) [8]. We denote by d_{DCJ }(C) the number of optimal DCJ operations used for DCJsorting C separately (d_{DCJ }(C) depends only on the number of vertices or, equivalently, the number of edges of C [8]). The DCJ distance can also be rewritten as d_{DCJ}(A, B) = ∑_{c∈AG(A, B) }d_{DCJ}(C).
Runs can be merged by DCJ operations. Consequently, during the optimal DCJsorting of a component C, we can reduce its number of runs. The indelpotential of C, denoted by λ(C), is defined by Braga et al. [5] as the minimum number of runs that we can obtain doing a separate DCJsorting in C with optimal DCJ operations. An example is given in Figure 5.
Figure 5. Two optimal sequences for DCJsorting an ABpath with Λ = 3 (the cuts of each DCJ in each sequence are represented by ""). In (i) the overall number of runs in the resulting components is three, while in (ii) the resulting components have only two runs. Indeed, in this case, the best we can have is the indelpotential λ = 2.
The indelpotential of a component depends only on its number of runs:
Proposition 1 ([5]) Given two genomes A and B and a component C of AG(A, B), the indelpotential of C is given by , if Λ(C) ≥ 1. Otherwise, if Λ(C) = 0, then λ(C) = 0.
Let λ_{0 }and λ_{1 }be, respectively, the sum of the indelpotentials for the components of the adjacency graph before and after a DCJ operation ρ, and let Δλ(ρ) = λ_{1 } λ_{0}. If ρ is an optimal DCJ acting on two adjacencies of a single component of the graph, the definition of indelpotential implies Δλ(ρ) ≥ 0. We also know that Δλ(ρ) ≥ 0, if ρ is counteroptimal, and Δλ(ρ) ≥ 1, if ρ is neutral [5]. This allows us to exactly compute , that is the DCJindel distance of a component C of [6]. We can then derive the following upper bound for the DCJindel distance:
Lemma 1 ([6]) Given two genomes A and B without duplicated markers and a positive indel cost w ≤ 1, we have
Recombinations
Until this point, we have explored the possible effects of any DCJ that is applied to two adjacencies belonging to a single component of the graph. However, there is another type of DCJ that must be considered. A DCJ operation ρ applied to adjacencies belonging to two different components is called a recombination and can have Δλ(ρ) < 0 [5]. Thus, depending on the value of w and on whether the recombination is an optimal, a neutral or a counteroptimal DCJ, a recombination with Δλ(ρ) < 0 can lead to a sorting sequence with lower cost. As an example, a neutral recombination with Δλ = 2 is represented in Figure 6.
Figure 6. This recombination is a neutral DCJ that has Δλ = 2 (we represent only the labels of the adjacencies, the cuts of the recombination are represented by "/"and "\").
Although many different recombinations can occur, it is possible to explore the space of recombinations in linear time and compute the maximum deduction that we can obtain with respect to the upper bound of Lemma 1 [6].
Results
In this section we develop a restricted DCJindel sorting algorithm, from which we can derive an upper bound for the restricted DCJindel distance.
Chained operations
Let us generalize to the DCJindel model a concept introduced in [8]. Let s = ρ_{1}ρ_{2 }... ρ_{n1}ρ_{n }be a DCJindel sequence of operations sorting genome A into genome B. Two consecutive operations ρ_{i }and ρ_{i+1 }of s are said to be independent when no source of ρ_{i+1 }is a resultant of ρ_{i}. Otherwise, ρ_{i+1 }use as a source a resultant from ρ_{i}. In this case, the operations ρ_{i }and ρ_{i+1 }are said to be chained.
Bidirectional approach
Although in general a sorting algorithm is conceived to follow a single direction, in which all operations are applied on the initial genome, here we design a bidirectional algorithm, in which some operations are applied on genome A and the others are applied on genome B. Running a bidirectional algorithm we actually transform genomes A and B into an intermediate genome I. However, with the operations that transform A and B into I, we can derive an optimal sequence of operations simply sorting genome A into B. Given any DCJ or indel operation ρ = (X → Y), the inverse of ρ is ρ^{1 }= (Y → X) [5]. This notation can also be extended to a sequence of operations: given a sequence s = ρ_{1}ρ_{2 }... ρ_{n }, we have . Observe that the inverse of a deletion is an insertion, and viceversa.
Proposition 2 ([5]) Given two genomes A and B, and a pair of sequences s_{1 }and s_{2 }composed of DCJ and indel operations applied respectively on genomes A and B, transforming both A and B into an intermediate genome I, such that , then is an optimal sequence of DCJ and indel operations that transforms A into B.
Figure 7 illustrates the generation of a sequence of operations sorting A into B from a bidirectional sequence of operations.
Figure 7. (i) Two sequences of lengths 3 and 2, sorting and B = {○azbwcde○} into . (ii) A corresponding sequence of length 5 sorting A into B. (Unique markers are represented in red.).
Accumulating x splitting labels
A DCJ that accumulates labels is always applied to two labeled adjacencies and results into a clean adjacency and an adjacency containing the concatenation of the labels of the original adjacencies. In general, we can represent such an accumulating DCJ ρ by ({γ_{1}ℓ_{1}γ_{4}, γ_{3}ℓ_{2}γ_{2}}→{γ_{1}ℓ_{1}ℓ_{2}γ_{2}, γ_{3}γ_{4}}). If ρ accumulate labels of an run, it is denoted by . Similarly, if ρ accumulates labels of a run, it is denoted by .
The inverse of an accumulating DCJ ρ is a splitting DCJ ρ^{1 }= ({γ_{1}ℓ_{1}ℓ_{2}γ_{2}, γ_{3}γ_{4}} → {γ_{1}ℓ_{1}γ_{4}, γ_{3}ℓ_{2}γ_{2}}). Observe that, if ρ is applied on A, ρ^{1 }is applied on B and split a label of an run. In other words, the inverse of an is a DCJ applied on B that separates vertices belonging to the same run in two different cycles, denoted by . Similarly, the inverse of a is a DCJ applied on A that separates vertices belonging to the same run, denoted by . An or a is called an invertedsplit. In Table 1 we summarize the operations described above.
Table 1. Accumulating and splitting DCJ operations
Accumulationdeletion x insertionsplit
Let n be a positive integer, such that n ≥ 2 and let r_{1 }= v_{1}x_{1}v_{2}x_{2 }... v_{i}x_{i }... v_{j}x_{j }... v_{n1}x_{n1}v_{n }be a longrun, in which v_{1 }and v_{n }are labeled, each v_{k }(2 ≤ k ≤ n  1) can also be labeled and all x_{k }(1 ≤ k ≤ n  1) are clean. We say that two vertices v_{i }and v_{j }(1 ≤ i <j ≤ n) in r_{1 }are partners if v_{i }and v_{j }are labeled and all vertices between v_{i }and v_{j }in r_{1 }are clean. We can apply an accumulating DCJ on the two partners v_{i }and v_{j}, accumulating their labels into a new vertex v_{ij}, reducing r_{1 }to r_{2 }= v_{1}x_{1}v_{2}x_{2 }... v_{i1}x_{i1}v_{ij}x_{j}v_{j+1}x_{j+1 }... v_{n1}x_{n1}v_{n}. The subsequent step of accumulation then occurs between two partners of r_{2}, reducing r_{2 }to r_{3}, and so on. Assuming that the initial r_{1 }has m ≤ n labeled vertices, we need to apply m  1 accumulating operations. In the end of the process, we obtain the compactrun r_{m}, that corresponds to a single vertex whose label is the accumulation of all labels of r_{1}. Observe that all labeled vertices will be used in some accumulating DCJ, until the compactrun r_{m }is obtained.
As an example, take v_{1 }= γ_{1}ℓ_{1}γ_{2}, x_{1 }= γ_{2}γ_{3}, v_{2 }= γ_{3}ℓ_{2}γ_{4}, x_{2 }= γ_{4}γ_{5}, v_{3 }= γ_{5}ℓ_{3}γ_{6}, x_{3 }= γ_{6}γ_{7}, v_{4 }= γ_{7}ℓ_{4}γ_{8}, with all ℓ_{k }≠ ε and let r_{1 }= v_{1}x_{1}v_{2}x_{2}v_{3}x_{3}v_{4 }be a run. We can start the accumulation with a DCJ of type on partners v_{2 }and v_{3}, creating v_{23 }= γ_{3}ℓ_{2}ℓ_{3}γ_{6 }and γ_{4}γ_{5}, reducing r_{1 }to r_{2 }= v_{1}x_{1}v_{23}x_{3}v_{4}. We then apply another DCJ of type on partners v_{1 }and v_{23}, creating v_{123 }= γ_{1}ℓ_{1}ℓ_{2}ℓ_{3}γ_{6 }and γ_{2}γ_{3}, reducing r_{2 }to r_{3 }= v_{123}x_{3}v_{4}. Finally, we apply a DCJ of type on partners v_{123 }and v_{4}, creating v_{1234 }= γ_{1}ℓ_{1}ℓ_{2}ℓ_{3}ℓ_{4}γ_{8 }and γ_{6}γ_{7}, reducing r_{3 }to r_{4 }= v_{1234}. If we follow the accumulation of a run, considering only the labeled vertices, we obtain a rooted tree that is built from the leafs to the root (see Figure 8). The root of the tree indicates the possible positions of a deletion.
Figure 8. The rooted tree of an accumulation of a run is built from the leafs to the root (bottom to up). Inversely, the rooted tree of an invertedsplit of a run is built from the root to the leafs (top to down).
The inversion of the run accumulation described in the example above is the invertedsplit of the label of the compactrun r_{4 }= v_{1234 }into the labeled vertices v_{1 }= γ_{1}ℓ_{1}γ_{2}, v_{2 }=γ_{3}ℓ_{2}γ_{4}, v_{3 }= γ_{5}ℓ_{3}γ_{6 }and v_{4 }= γ_{7}ℓ_{4}γ_{8}. We start by applying a DCJ on v_{1234 }= γ_{1}ℓ_{1}ℓ_{2}ℓ_{3}ℓ_{4}γ_{8 }and γ_{6 }γ_{7}, obtaining v_{123 }= γ_{1}ℓ_{1}ℓ_{2}ℓ_{3}γ_{6 }and v_{4 }= γ_{7}ℓ_{4}γ_{8}. We then apply a on v_{123 }and γ_{2}γ_{3}, obtaining v_{2 }= γ_{1}ℓ_{1}γ_{1 }and v_{23 }= γ_{3}ℓ_{2}ℓ_{3}γ_{6}. Finally we apply a on v_{23 }and γ_{4}γ_{5}, obtaining v_{2 }= γ_{3}ℓ_{2}γ_{4 }and v_{3 }=γ_{5}ℓ_{3}γ_{6}. If we follow the invertedsplit of a run, considering only the labeled vertices, we obtain a rooted tree that is built from the root to the leafs (see Figure 8 again). In this case, the first invertedsplit defines the root. Then, each one of the subsequent invertedsplits must be chained with a DCJ in this tree. The root of the tree indicates the possible positions of an insertion.
An indel does not have to occur while a circular chromosome exists
We now show that an indel must not be applied while a circular chromosome exists.
Proposition 3 shows that an insertion can always be "moved up" in a DCJindel sorting sequence.
Proposition 3 Let s = ρ_{1}ρ_{2 }... ρ_{n1}ρ_{n }be a DCJindel sequence sorting genome A into genome B, such that, for an integer 1 ≤ i <n, ρ_{i }is a DCJ operation and ρ_{i+1 }is an insertion. Then ρ_{i }ρ_{i+1 }can be replaced θ_{1}θ_{2}, such that θ_{1 }is an insertion and θ_{2 }is a DCJ and s' = ρ_{1}ρ_{2 }... ρ_{i1}θ_{1}θ_{2}ρ_{i+ 2 }... ρ_{n1}ρ_{n }is also a DCJindel sequence sorting genome A into genome B.
Proof: Observe that, if ρ_{i }and ρ_{i}+1 are independent, it is easy to see that they can be simply switched, that is: θ_{1 }= ρ_{i+1 }and θ_{2 }= ρ_{i}. We still need to examine the case in which ρ_{i }and ρ_{i+1 }are chained.
Observe that a DCJ in any optimal sorting scenario either accumulates or does not change the composition of runs. Take ρ_{i }= ({γ_{1}ℓ_{1}γ_{4}, γ_{3}ℓ_{2}γ_{2}} → {γ_{1}ℓ_{1}ℓ_{2}γ_{2}, γ_{3}γ_{4}}). Furthermore, since an insertion in any optimal sequence is performed without breaking any existing label, without loss of generality, take ρ_{i+1} = (γ_{1}ℓ_{1}ℓ_{2}γ_{2 }→ γ_{1}ℓ_{1}ℓ_{2}ℓ_{3}γ_{2}). Then ρ_{i}ρ_{i+1 }could be replaced by: θ_{1 }= (γ_{3}ℓ_{2}γ_{2 }→ γ_{3}ℓ_{2}ℓ_{3}γ_{2}) followed by θ_{2 }= ({γ_{1}ℓ_{1}γ_{4}, γ_{3}ℓ_{2}ℓ_{3}γ_{2}} → {γ_{1}ℓ_{1}ℓ_{2}ℓ_{3}γ_{2}, γ_{3}γ_{4}}).
Similarly, a deletion can always be "moved down" in a DCJindel sorting sequence.
Proposition 4 Let s = ρ_{1}ρ_{2 }... ρ_{n1}ρ_{n }be a DCJindel sequence sorting genome A into genome B, such that, for an integer 1 ≤ i <n, ρ_{i }is a deletion and ρ_{i+1 }is a DCJ operation. Then ρ_{i}ρ_{i+1 }can be replaced by θ_{1}θ_{2}, such that θ_{1 }is a DCJ operation and θ_{2 }is a deletion and s' = ρ_{1}ρ_{2 }... ρ_{i1}θ_{1}θ_{2}ρ_{i+2} ... ρ_{n1}ρ_{n }is also a DCJindel sequence sorting genome A into genome B.
Proof: Analogous to the proof of Proposition 3. □
From the previous propositions we observe that finding a position to perform an indel imposes no difficulties to design a restricted DCJindel sorting algorithm. The trick is how to determine the DCJ part of the sorting sequence, so that we reincorporate each circular chromosome after its creation and achieve the indelpotential per component.
Restricted DCJindel sorting
Basically, our approach disregards recombinations and sorts the components of the graph separately, using optimal DCJ operations to achieve the minimum number of indels per component, that is given by the indelpotential. In this way, we achieve the distance given by the upper bound of Lemma 1, as we will see in the remainder of this section.
Capping
Disregarding recombinations, we can first perform the genome capping, a technique that helps us to avoid difficulties and special cases produced by telomeres: we adjoin new markers (caps) to the ends of the chromosomes (and new chromosomes composed of caps only, if necessary) so that we do not change the distance and we do not have to worry about telomeres [4]. After the capping, the two genomes have the same number of chromosomes and the corresponding adjacency graph contains only clean paths of size 1 and cycles. Recall that, since AG(A, B) is bipartite, all cycles have even length and can have 0, 1 or an even number of runs. Capped genomes can be then sorted with translocations (which mimic also fusions and fissions), inversions, circular chromosome excisions and reincorporations.
Merging runs in cycles
An important step of the DCJindel sorting is to merge runs in cycles with at least 4 runs, so that the indelpotential for each cycle is achieved.
Proposition 5 The indelpotential of a cycle C with at least 4 vertices and 2 or more runs can be achieved by extracting from C a cycle with a single run.
Proof: For any positive integer i let . If Λ(C) = 2, we can split C into two cycles containing a single run each, and the indelpotential is preserved. For any cycle C with 4 or more runs, since the number of runs in this case is always even, we have . We then denote by λ' the alternative potential, obtained by extracting cycles with a single run from C. Observe that, for any i = 4, 6, 8, ..., λ'(i) = λ(i  2) + 1. It is easy to check the base case, that is . By induction, for i = 6, 8, 10 ..., we have □
Chromosome reincorporation
In the restricted sorting of linear genomes a circular chromosome has to be immediately reincorporated after its excision  these two consecutive operations mimic either a transposition or a blockinterchange [2,4]. As we have seen before, the general DCJindel sorting is bidirectional  the operations can be applied on genome A or B, depending on whether we accumulate runs in A or in B. However, when a DCJ creates a circular chromosome, we need to apply the subsequent DCJ on the same genome, and it is not easy to see how this interferes with the indelpotential of AG(A, B).
Suppose that a DCJ performed an excision of a circular chromosome. Let (v_{1}, v_{2}) be a pair of vertices, such that v_{1 }and v_{2 }are in the same genome and belong to the same cycle in AG(A, B), v_{1 }is an adjacency at the circular chromosome and v_{2 }is an adjacency at a linear chromosome. The pair (v_{1}, v_{2}) is called a link. Since v_{1 }and v_{2 }are in the same cycle, a chromosome reincorporation can always be done by applying a DCJ on the two vertices v_{1 }and v_{2 }[8].
The cycle to which a link (v_{1}, v_{2}) belongs is called a connection cycle. Let C be a connection cycle of AG(A, B) with 2k ≥ 4 vertices. Since C has k vertices in each genome, there are at least k  1 and at most distinct links in C.
The two vertices v_{1 }and v_{2 }of a link in a connection cycle C are connected by two distinct subpaths of C. The distance between v_{1 }and v_{2 }is given by the number of edges in the shortest path connecting them. Since both v_{1 }and v_{2 }are in the same genome, this distance is always even and positive. If the distance between v_{1 }and v_{2 }is 2, v_{1 }and v_{2 }have a common neighbor, and (v_{1}, v_{2}) is called a shortlink.
Proposition 6 After the excision of a circular chromosome by a DCJ, there is at least one shortlink in AG(A, B).
Proof: Suppose that the circular chromosome is in genome A. If AG(A, B) contained no connection cycle, genome B would also have a circular chromosome, which would be a contradiction. Let C = v_{1}x_{1}v_{2}x_{2 }... v_{n}x_{n }be a connection cycle in AG(A, B), in which the vertices v_{1}, ..., v_{n }are in A and the vertices x_{1}, ..., x_{n }are in B, and let (v_{i}, v_{j}) be a link in C such that v_{i }is in the circular chromosome and v_{j }is in a linear chromosome of A. Consider without loss of generality that i <j. Then take the vertex v_{k}, i ≤ k <j, such that k is the largest index of a vertex between v_{i }and v_{j }belonging to the circular chromosome. Then (v_{k}, v_{k+1}) is a shortlink. □
In order to find out whether the indelpotential of the connection cycle C can be preserved after applying a DCJ on a certain link (v_{1}, v_{2}), basically we need to analyze how the connection cycle C is split, by analyzing the vertices that are between v_{1 }and v_{2 }in C.
We focus on the shortlinks only. Let (v_{1},v_{2}) be a shortlink in a connection cycle C, such that v_{1 }= γ_{1}ℓ_{1}γ_{2 }and v_{2 }= γ_{3}ℓ_{2}γ_{4 }(ℓ_{1 }and ℓ_{2 }can be equal to ε). Without loss of generality, let z = γ_{2}ℓ_{3}γ_{3 }be the common neighbor of v_{1 }and v_{2 }(ℓ_{3 }can also be equal to ε). We then define the optimal DCJ ρ(v_{1}, v_{2}) = ({v_{1}, v_{2}} → {x_{1}, x_{2}}), such that x_{1 }= γ_{2}γ_{3 }and x_{2 }= γ_{1}ℓ_{1}ℓ_{2}γ_{4}. Observe that ρ(v_{1}, v_{2}) always extracts z together with a new clean vertex x_{1 }into a cycle, and accumulates the labels of v_{1 }and v_{2 }into a new vertex x_{2}, which is extracted into a cycle with the remaining vertices of C. There are three different cases:
1. Gaps: If the two vertices of a shortlink have a clean common neighbor, it is called a gap. A DCJ applied to a gap of a connection cycle C splits C into a clean cycle C' and a cycle C'' that has the same indelpotential of C.
2. Compactruns: Let (v_{1}, v_{2}) be a shortlink in AG(A, B), such that the common neighbor z of v_{1 }and v_{2 }is a compactrun. An optimal DCJ ρ(v_{1}, v_{2}) extracts the compactrun z and a new clean vertex into a new cycle. According to Proposition 5, ρ(v_{1}, v_{2}) preserves the indelpotential of AG(A, B).
3. Invertedsplits: If a shortlink (v_{1}, v_{2}) is not a gap nor is separated by a compactrun, only one possiblity remains: the common neighbor z of v_{1 }and v_{2 }is labeled and belongs to a longrun r. Observe that an optimal DCJ ρ(v_{1}, v_{2}) splits C into a cycle C' containing a new clean vertex and z (Λ(C') = 1) and a cycle C'' containing all remaining runs of C and the remaining vertices of r, that is, we have Λ(C'') = Λ(C).
Although the overall indelpotential seems to be increased, the DCJ described above is an invertedsplit of type if the circular chromosome is in A and r is in B (or, symmetrically, of type , if the circular chromosome is in B and r is in A). We have seen that invertedsplits, if properly applied, do the backtracing of the insertion position of a run in the opposite genome and do not increase the indelpotential of AG(A, B).
It is important to guarantee that, after applying a DCJ that inversely splits a run r_{1 }and another DCJ that inversely splits another run r_{2}, the runs r_{1 }and r_{2 }are not merged. We do this by simply extracting the residual part of an inversely split run into a new cycle. Furthermore, during the merging or accumulation of runs, a run r can be inversely split by successive DCJs. In this case, we need to guarantee that each new invertedsplit of r is either the first or chained with one of the previous invertedsplits.
We can always reincorporate the circular chromosome with a DCJ applied to any shortlink (v_{1}, v_{2}), except if ρ(v_{1}, v_{2}) splits a run r that is already inversely split and ρ(v_{1}, v_{2}) cannot be chained with a previous invertedsplit of r. However, in this case, r will be separated alone in a cycle (each run is immediately separated after its first invertedsplit).
After an excision, suppose that the circular chromosome is in genome A (respectively in B). Let C be a connection cycle in AG(A, B). For each vertex v of C in A (respectively in B), there is at least one link containing v. Due to this fact, when we have a cycle containing a single inversely split run r, it is easy to find a link chained with a previous inverted split of r.
Proposition 7 If a connection cycle C with a single run r has links in one genome and its run r is in the other genome, we can always reincorporate the circular chromosome and preserve the indelpotential.
Proof: Let C have links in genome A. Each shortlink of C is either a gap, or a compactrun, or the first invertedsplit of the run r. Otherwise, C has in genome A a vertex v that was created by a previous invertedsplit ρ of r. Since each vertex of C in A is part of a link, we can choose a link that contains v and, consequently, is chained with ρ. □
The sorting algorithm and an upper bound for the restricted DCJindel distance
We put everything together in Algorithm 1 (Additional file 1) and describe the sorting of capped genomes for the restricted model, in which each circular chromosome is reincorporated immediately after its creation. Applying this procedure we can find a sequence of optimal DCJs that sort A into B while preserving the indelpotential. In other words, this algorithm results in a sorting sequence in the restricted model that has exactly the same cost given by the upper bound of Lemma 1.
Format: PDF Size: 107KB Download file
This file can be viewed with: Adobe Acrobat Reader
Conclusions
In this work we have presented a method to compute a restricted DCJindel sequence of operations that sort a linear genome into another linear genome. This method leads to a tight upper bound for the restricted DCJindel distance. The general DCJindel distance can be computed exactly and is a lower bound for the restricted DCJindel distance. However, the question whether these bounds are equal, meaning that both distances are equal, remains open.
Competing interests
The authors declare that they have no competing interests.
Authors' contributions
PHS, MDVB, RM and SD have elaborated the model, proved the results and written the paper.
Algorithm 1 Restricted sorting of genome A into B with optimal DCJs and indels
Input: Two linear genomes A and B
Output: A restricted sequence of DCJ and indel operations sorting A into B
cap genomes A and B;
[MERGING:]
r ← null;
if there is a cycle C ∈ AG(A,B) with at least 4 vertices and at least 2 runs then
r ← run from C;
while r ≠ null do
extract r into a cycle; [this preserves the indelpotential of AG(A,B) according to Proposition 5]
r ← null;
if a circular chromosome was created then
find a shortlink (v_{1}, v_{2}); [Proposition 6]
if (v_{1}, v_{2}) is a gap or a compactrun then
apply the optimal DCJ ρ(v_{1}, v_{2});
else
let r_{1 }be the run that would be inversely split by ρ(v_{1}, v_{2});
if ρ(v_{1}, v_{2}) is the first invertedsplit of r_{1 }then
apply the optimal DCJ ρ(v_{1}, v_{2});
let r_{2 }be the residual part of r_{1};
if r_{2 }is in a cycle with more runs then
r ← r_{2}; [extract r_{2 }from its cycle in the next step]
else
[r_{1 }was inversely split before and is separated alone in cycle]
find a link (x_{1}, x_{2}) such that x_{1 }is a vertex created by a previous invertedsplit of r_{1}; Proposition 7]
apply the optimal DCJ ρ(x_{1}, x_{2});
if r = null and there is a cycle C ∈ AG(A,B) with at least 4 vertices and at least 2 runs then
r ← run from C;
[ACCUMULATING: (each cycle with 4 or more vertices has at most one run)]
while there is a longrun r in AG(A,B) do
apply an optimal DCJ accumulating the labels of two partners of r;
if a circular chromosome was created then
find a shortlink (v_{1}, v_{2}); [Proposition 6]
if (v_{1}, v_{2}) is a gap or a compactrun then
apply the optimal DCJ ρ(v_{1}, v_{2});
else
let r_{1 }be the run that would be inversely split by ρ(v_{1}, v_{2});
if ρ(v_{1}, v_{2}) is the first invertedsplit of r_{1 }then
apply the optimal DCJ ρ(v_{1}, v_{2});
else
[r_{1 }was inversely split before and is separated alone in cycle]
find a link (x_{1}, x_{2}) such that x_{1 }is a vertex created by a previous invertedsplit of r_{1}; [Proposition 7]
apply the optimal DCJ ρ(x_{1}, x_{2});
[DCJSORTING: (each remaining cycle with 4 or more vertices has at most one compactrun)]
while there is cycle C ∈ AG(A,B) with at least 4 vertices do
extract a cycle from C, with an optimal DCJ applied on genome A;
if a circular chromosome was created then
find a shortlink (v_{1}, v_{2}); [Proposition 6]
[at this stage this shortlink is a gap or a compactrun]
apply the optimal DCJ ρ(v_{1}, v_{2});
invert all DCJs applied on genome B;
insert each run r before the first invertedsplit of r;
move up insertions that occur in circular chromosomes;
Acknowledgements
This research was partially supported by the Brazilian research agencies CNPq and FAPERJ.
This article has been published as part of BMC Bioinformatics Volume 13 Supplement 19, 2012: Proceedings of the Tenth Annual Research in Computational Molecular Biology (RECOMB) Satellite Workshop on Comparative Genomics. The full contents of the supplement are available online at http://www.biomedcentral.com/bmcbioinformatics/supplements/13/S19
References

Hannenhalli S, Pevzner P: Transforming men into mice (polynomial algorithm for genomic distance problem).

Yancopoulos S, Attie O, Friedberg R: Efficient sorting of genomic permutations by translocation, inversion and block interchange.
Bioinformatics 2005, 21:33403346. PubMed Abstract  Publisher Full Text

Bergeron A, Mixtacki J, Stoye J: A unifying view of genome rearrangements.

Kovác J, Warren R, Braga MDV, Stoye J: Restricted DCJ Model: rearrangement problems with chromosome reincorporation.
Journal of Computational Biology 2011, 18(9):12311241. PubMed Abstract  Publisher Full Text

Braga MDV, Willing E, Stoye J: Double Cut and Join with Insertions and Deletions.
Journal of Computational Biology 2011, 18(9):11671184. PubMed Abstract  Publisher Full Text

da Silva PH, Braga MDV, Machado R, Dantas S: DCJindel distance with distinct operation costs. [http://link.springer.com/chapter/10.1007/9783642331220_30] webcite
Proceedings of WABI 2012, Lecture Notes in BioInformatics 2012, 7534:378390.

Blanc G, Ogata H, Robert C, et al.: Reductive genome evolution from the mother of Rickettsia.
PLoS Genetics 2007, 3:e14. PubMed Abstract  Publisher Full Text  PubMed Central Full Text

Braga MDV, Stoye J: The solution space of sorting by DCJ.
Journal of Computational Biology 2010, 17(9):11451165. PubMed Abstract  Publisher Full Text