Background

Next-generation sequencing (NGS) technologies have drastically reduced the cost of genome sequencing [1]. As more genomic sequences have become available, it has become clear that genomes contain many structural variations (SVs), which include large insertions, deletions, tandem duplications, and translocations. SVs have already been associated with diverse diseases [2]. For example, the fusion genes BCRABL and EML4-ALK play key roles in the development of cancer, and it is believed that other recurrent rearrangements remain to be discovered [3]. In cancer genomes, many SVs are occasionally concentrated in a small region of the genome [46]. It has been suggested that a single catastrophic mutational event, known as chromothripsis [6], causes these concentrations. A study of prostate cancer also uncovered a distinct type of complex rearrangement termed chromoplexy [7, 8], wherein rearrangements are unclustered but involve multiple chromosomes. Complex genomic rearrangements have even been observed in germline mutations, resulting in serious congenital diseases [9]. Because of their importance in functions of the genome, various methods have been developed for finding SVs [1016]. When genomic rearrangements are complex, enumerating only individual SVs is insufficient for elucidating the global structure of chromosomes, i.e., how the segments in a reference genome are extracted and ordered in an unknown target genome. Here, the reference genome is known and is a pre-existing sequenced genome of the same organism, such as the GRCh38 build of the human genome [17].

In this study, we address the problem of inferring the global structure of chromosomes based on SV data, which refer to aberrant adjacencies of genomic regions and copy number variations (CNVs) in this study. By solving this problem, we can determine the order of the genomic regions in the target genome. This order affects the structure of proteins if the genomic regions contain coding regions, and regulation of genes if the genomic regions include promoters or enhancers. In addition, raw SV data could be corrected by inferring the global structure of chromosomes because an optimal global structure would ignore false positive detection of aberrant adjacencies or correct wrongly estimated copy numbers. The task of inferring chromosomes is formulated as an optimization problem on a graph, which we term as a chromosome graph. Our contributions are summarized as follows:

  • To infer the global structure of chromosomes, we formulate a computational problem that takes into account the number and length of chromosomes, as well as aberrant adjacencies and CNVs caused by genomic rearrangements. By taking SV data as the input, relatively low-depth NGS sequencing can be used.

  • We prove that the problem is NP-complete.

  • We propose a biologically meaningful restriction that makes the problem solvable in polynomial time. We also show an algorithm that solves the restricted problem.

Oesper et al. [18] presented a pioneering work that aimed to infer the global structure of chromosomes from SV data. They formulated the copy number and adjacency genome reconstruction problem. Their formulation is based on graphs that they termed interval-adjacency graphs. These graphs are essentially the same as our chromosome graphs, except that we used bidirected graphs [19, 20] while they used alternating paths to exclude paths on the graph that do not correspond to chromosomes. They also implemented an efficient algorithm called paired-end reconstruction of genome organization (PREGO) that solved their problem and obtained promising results. Our work includes the following results that were not addressed by Oesper et al. First, we present a formulation that takes into account the number and length of chromosomes determined experimentally. Second, we prove that the problem is NP-complete. Finally, we propose a variation of the problem that can be solved in polynomial time.

Some methods can also be applied to analyze the global structure of genomes by using non-SV data. First, de novo sequence assembly aims at reconstructing target genomes from raw NGS sequences [19, 2125]. It includes a step to order fragments of genomes obtained by assembling NGS sequences. The step is usually implemented as an optimization problem, involving searching for paths that cover all vertices or all edges corresponding to substrings of genome sequences [19, 21]. By contrast, we allow some vertices and edges to be ignored because some portions of the reference genome might not appear in the target genome. Second, reference-assisted assembly [26], also known as comparative assembly [27], aims at ordering segments of an unknown target genome by using known genomes of other organisms. By contrast, we order segments so that the chromosomes in the solution are most consistent with the SV data and the experimentally determined number and length of chromosomes. Finally, methods based on permutations of integers [28] compare two genomes represented by two sequences of integers corresponding to genes or markers in the genome. Instead of using such sequences, we exploit SV data.

The rest of this paper is organized as follows. First, we present types of experimental data from which we infer the global structure of chromosomes. Next, we give our formulation of the problem of inferring the global structure of chromosomes, and show that the problem is NP-complete. Then, we show a variation of the problem that is solvable in polynomial time. Finally, we discuss our results and state our conclusions.

Results

Experimental data

We assume the following experimental data as input.

Aberrant adjacencies

In the target genome, distant segments in the reference genome may be adjacent because of rearrangements (Figure 1). Such aberrant adjacencies are detected by using NGS technologies as follows. First, NGS technologies can generate read pairs that are a few hundred bases apart from each other in the target genome. If two reads of a pair are not mapped to the reference genome with the expected orientations and mapped distance, the pair is called a discordant pair and is likely to be caused by SVs [1214]. Second, if the alignment of a read and reference genome is split into more than one portion, such a split read also indicates a rearrangement [16]. A breakpoint is a position at a boundary of a rearrangement. Here, we ignore small differences between the real breakpoints and their estimations.

Figure 1
figure 1

Aberrant adjacencies of genomic regions. Thick vertical lines represent chromosomes in the reference genome, circles represent breakpoints, small black boxes represent NGS reads, solid curved lines represent paired-reads, dashed curved lines represent split reads, and thin solid oblique lines represent aberrant adjacencies. Aberrant adjacencies are detected by using two types of NGS reads abnormally mapped to the reference genome: discordant pairs (three pairs from above), and split reads (two pairs from below). Yasuda and Miyano Page 11 of 11

Copy numbers

The number of occurrences of a subsequence in the reference genome may change because of rearrangements. This phenomenon results in copy number variations (CNVs). Traditionally, CNVs have been analyzed by using DNA microarrays [11]. Several recent methods detect CNVs by finding changes in the depth of coverage of NGS sequences [4, 15]. Although tumor samples are usually a mixture of normal cells and various tumor cells, the copy numbers of a cancer cell can still be estimated by single-cell analysis [29]. In this paper, for the sake of conciseness, the boundaries of CNVs are also called breakpoints.

Number of chromosomes and truncations

Identifying chromosomes and finding aberrant chromosomes by microscopy is an important part of clinical diagnostics [30]. The number of chromosomes, denoted by n N in this paper, is available after inspection. Throughout this paper, we assume that n N ≥ 1. In addition, we also take into account the number of chromosomal truncations, which we denote as n T . Chromosomal truncations are detected as a decrease in copy numbers without aberrant adjacencies. We consider n N and n T to improve the inference of the global structure of chromosomes from SV data.

Chromosome length

The length of chromosomes can be estimated experimentally from flow karyotyping, and, approximately, from microscopic images [31]. Here, the estimated length is denoted by λ i for 1 ≤ iN L , where N L (≥ n N ) is the maximum possible number of chromosomes.

Problem definition

Any instance of our problem is modeled as a graph that we term a chromosome graph. The graph contains elements derived from the reference genome and experimental data. Each vertex corresponds to a location in the reference genome. In addition, each edge corresponds to either a segment in the reference genome, an adjacency of flanking segments in the reference genome, or an aberrant adjacency in the target genome caused by rearrangements.

We assume that the target genome is a set of chromosomes, each of which is a concatenation of segments in the reference genome. Each chromosome in the target genome is represented as a path on the graph, and these paths explain how segments in the reference genome are incorporated into the target genome. The goodness of the estimated target genome is measured by a cost function, and we search for an optimal set of chromosomes that minimizes this cost function.

We first define a graph that contains some of elements described above. Then, we extend the graph to a chromosome graph. Finally, we present the formal definition of the problem.

Prototype chromosome graph

We first construct an undirected graph called a prototype chromosome graph, G = (V,E) (Figure 2). Let N C be the number of chromosomes of the reference genome and n i be the number of breakpoints in the i-th chromosome of the reference genome. Then, V contains the following vertices.

Figure 2
figure 2

An example of a prototype chromosome graph. Thick vertical edges represent edges in E S that correspond to segments in the reference genome, oblique edges represent edges in E L that correspond to aberrant adjacencies. Vertices surrounded by dashed lines belong to V5, V M , and V3, read from the bottom of the graph to top.

  • Vertices corresponding to breakpoints:

    V M = { v i , j | 1 i N C , 1 j n i } .
  • Vertices corresponding to the beginning of chromosomes in the reference genome:

    V 5 = { v i , 0 | 1 i N C } .
  • Vertices corresponding to the end of chromosomes in the reference genome:

    V 3 = { v i , n i + 1 | 1 i N C } .

Then, we define V = V5V3V M .

Next, we define a set of edges, E. We make the following two types of edges.

  • Edges corresponding to segments between two breakpoints that are next to each other in the reference genome. For each 1 ≤ iN C and 0 ≤ jn i , we make an edge e i,j = (v i,j , v i,j +1).

  • Edges corresponding to aberrant adjacency of two segments in the reference genome. Let N A be the number of detected aberrant adjacencies. For the k-th aberrant adjacency (1 ≤ kN A ) that links positions corresponding to v i 1 , j 1 and v i 2 , j 2 , we make an edge e L k = ( v i 1 , j 1 , v i 2 , j 2 ) .

Then, we define

E S = { e i , j | 1 i N C , 0 j n i } , E L = { e L k | 1 k N A } , E = E S E L .

Chromosome graph

In a prototype chromosome graph, a path might visit two edges in E L contiguously. Such a path does not correspond to a real chromosome. To exclude such a path we use a technique similar to that of Oesper et al. [18]. Although Oesper et al. [18] used alternating paths, their formulation can be represented by using a bidirected graph whose edges have directions at both ends [19, 32]. We directly define our graph by using a bidirected graph (Figure 3). Let d(e, v) ∈ {+,−} be the direction of an edge e at a vertex v, and −d(e, v) be the opposite direction of d(e, v).

Figure 3
figure 3

An example of a chromosome graph. Thin vertical edges represent edges in E R . Arrowheads represent the '+'-direction, whereas ends of edges without arrowheads represent '−'-direction.

  • Each vertex v i,j V M is split into two vertices v i , j + and v i , j - . The set V M is redefined as

    V M = { v i , j - , v i , j + | 1 i N C , 1 j n i } .

Vertices in V5 and V3 are renamed so that

V 5 = { v i , 0 - | 1 i N C } , V 3 = { v i , n i + 1 + | 1 i N C } .
  • An edge e i,j = (v i,j , vi,j+1) ∈ E S is reconnected to v i , j - and v i , j + 1 + . In addition, d ( e i , j , v i , j - ) =- and d ( e i , j , v i , j + 1 + ) =+.

  • Let eE L be an edge connected to v i,j in the prototype chromosome graph. If e corresponds to an aberrant adjacency involving the segment that stretches toward vi,j+1, e is reconnected to v i , j - and d ( e , v i , j - ) is set to '+'. Otherwise, e is reconnected to v i , j + and d ( e , v i , j + ) is set to '−'.

  • We add the following set of new edges:

    E R = { e ^ i , j = ( v i , j + , v i , j - ) | 1 i N C , 1 i n i } .

Directions are set so that d ( e ^ i , j , v i , j + ) =- and d ( e ^ i , j , v i , j - ) =+.

The modified graph represents a chromosome graph.

Paths and chromosomes

A path c = v1e1v2e2v3 ... e l vl+1on a chromosome graph G is an alternating sequence of vertices and edges, which has the following properties:

  • The first and the last of c are vertices.

  • Any subsequence of the form e k v k ek+1(1 ≤ kl) means that d(e k , v k ) = −d(ek+1, v k ).

A path c is said to visit an edge e if c contains e. Similarly, c is said to visit a vertex v if c contains v. When a path is written as a sequence of vertices and edges, for simplicity, we omit the notation of the vertices if they are clear. Let C = {c1, c2,..., c|C|} be a multiset of paths on G. We define C as a multi-set so that more than one identical path can exist. In addition, let m(c, e) be the number of times c visits an edge e, and m ( C , e ) = c i C m ( c i , e ) . A cycle is a path whose first and last vertices are identical and the directions of the first and the last edges at the vertex are opposite. A chromosome on G is a path whose first and last edges are both in E S .

Copy numbers and lengths

Two integers are assigned to each eE. First, n(e) for eE S represents an experimentally estimated copy number of the corresponding segment in the reference genome. Second, |e| for eE S represents the length of the corresponding segment in the reference genome. For eE L E R , we set n(e) and |e| to 0. The length of a path c is defined as |c|= e E |e|m ( c , e ) . To simply describe all properties of e together, we use the following notation:

e = d ( e , v 1 ) v 1 , d ( e , v 2 ) v 2 , n ( e ) , | e | .

Upper bound on parameters

Campbell et al. [4] presented examples of amplified regions in cancer cells. The copy numbers were less than 100 in these regions. Therefore, we assume that the copy numbers are in at most hundreds. We also assume that short repeat elements are masked in advance in order to exclude segments that appear spuriously. Based on the details given above, we assume that n N , n T , and n(e) for eE S are all less than a fixed constant U. The value of U does not have to be determined because U is only used in the analysis of computational complexity.

Formulation of the problem

To find an optimal set of chromosomes, we define an optimization problem over a chromosome graph. We define a cost function to be used as a target function of the optimization problem. This function imposes costs on the number of chromosomes, the number of chromosomal truncations, and the number of visits to edges, penalizing for deviations from those that are experimentally expected.

Let C = {c1, c2,..., c|C|} be a multi-set of chromosomes on G, and w N (C) be the cost of the difference between n N and |C|. Also let Tr(C) be the number of ends of chromosomes in V M , and w T (C) be the cost of the difference between n T and Tr(C). In addition, w(e, x) for eE S is defined as the cost when e is visited x-times. For eE L E R , w(e, x) is set to 0.

We assume that w N (C), w T (C), and w(e, x) for eE S monotonically increase as ||C| − n N |, |Tr(C) − n N |, and |xn(e)| increase, respectively. Then, we define the cost function W(C) as follows:

W ( C ) = w N ( C ) + w T ( C ) + e E w ( e , m ( C , e ) ) .
(1)

We assume that each term is 0 if and only if

| C | = n N , T r ( C ) = n T , m ( C , e ) = n ( e )  for  e E S .
(2)

With these notations, we formulate the problem of inferring the global structure of chromosomes as follows:

Definition 1 (Chromosome problem (ChrP)) Suppose that we are given a chromosome graph G = (V,E), a cost function W(C), and parameters λ i (1 ≤ iN L ), where N L is the maximum possible number of chromosomes. Then, find a multi-set of chromosomes C on G that minimizes W(C) under the constraint that |c i | ≤ λ i for c i C.

Although a similar problem was proposed previously [18], its computational complexity was not analyzed.

Theorem 1 ChrP is NP-complete.

In the Methods section, we prove Theorem 1.

Polynomial-time solvable variation

We propose a variation of ChrP that is solvable in polynomial time. For eE L E R , it is highly likely that m(C, e) ≥ 1 if e is supported by a large number of paired-reads. Therefore, it is worth considering a variation in which some edges in E L E R must appear in the target genome. We refer to the edges as required edges. In addition, because chromosomal truncations can be detected, it is also worth considering a variation in which we know where the ends of the chromosomes of the target genome exist in the reference genome. Because the definition of W(C) is abstract, we focus on a cost function such that

w N ( C ) = Q N | | C | - n N | , w T ( C ) = Q T | T r ( C ) - n T | , w ( e , x ) = | e | | x - n ( e ) | ,
(3)

where Q N and Q T are constants given as parameters. The values of Q N and Q T are tuned in advance so that known global structures of genomes are well reconstructed.

Weakly connected constraint

Let G = (V, E) be a general bidirected graph. A subgraph g of G is a weakly connected component if g is a connected component when all directions are removed [33]. In addition, g is maximal if g is not a subgraph of a larger weakly connected component. For a subset E' of E, we define CC(G,E') as a set of maximal weakly connected components of a graph induced from G by removing the edges not in E'.

Definition 2 (Weakly connected constraint (WCC)) Let G = (V, E) be a chromosome graph. Also let V W and E W be subsets of V and E, respectively. Each gCC(G, E W ) is good if g contains at least one vertex in V W . Then, G satisfies the weakly connected constraint (WCC) if all gCC(G, E W ) are good.

We use WCC by setting V W to a set of vertices that correspond to ends of chromosomes in the target genome, and E W = {eE S |n(e) ≥ 1} ∪ {eE L E R |e is required}. See Figure 4 for an example. An instance that satisfies WCC can be obtained as follows. First, V W is obtained by finding the positions of chromosomal truncations, as well as the ends of the chromosomes of the reference genome that remain in the target genome. Because a chromosome that does not include detected ends can be in a solution, V W does not need to contain all ends of chromosomes in the target genome. We assume that n T ≥ |V W |. Next, if g ∈ CC(G, E W ) is not good, edges eE on some path connecting g and good g' ∈ CC(G, E W ) are added to E W . To do this, if possible, we experimentally confirm that n(e) ≥ 1 if eE S or that e is required if eE L E R . Finally, if some g ∈ CC(G,E W ) that are not good still remain, edges in g are forcibly removed from E W by setting n(e) to 0 if eE S or by changing e not required if eE L E R .

Figure 4
figure 4

An example of a chromosome graph that satisfies WCC. Gray circles are vertices in VW and thick arrows are edges in E W .

Definition 3 (Chromosome problem with WCC (ChrW)) Let G = (V,E) be a chromosome graph that satisfies WCC with respect to some V W V and E W E. Then, find a set C of chromosomes on G that minimizes W(C) when (3) is satisfied.

Theorem 2 The problem ChrW can be solved in O(|E|2 log |V | log |E|) time.

See the Methods section for the algorithm that solves ChrW.

Restriction on the length of chromosomes

In ChrW, we removed restrictions on the length of chromosomes. This relaxation is necessary to make the problem solvable in polynomial time.

Definition 4 (ChrW with restriction on length (ChrL)) ChrW with restriction on length (ChrL) is the same problem as ChrW, except that the length of each chromosome c i is bounded by a parameter λ i (1 ≤ iN L ), where N L is the maximum possible number of chromosomes.

Theorem 3 The problem ChrL is NP-complete.

See the Methods section for proof that problem ChrL is NP-complete.

Discussion

Handling practical situations

Solutions to the chromosome problems are affected by errors in given SV data. However, some errors can be mitigated as follows. First, a false positive aberrant adjacency may be correctly ignored in the optimal solution because a set of chromosomes that uses such an adjacency is expected to have a larger cost than those ignoring the adjacency. Second, the effects of a missing aberrant adjacency may be limited to segments including its ends because a chromosome that contains the missing adjacency may be recognized as two split chromosomes. Finally, there is a chance that incorrect copy numbers will be corrected if they are inconsistent with other SVs.

In addition to segments in the reference genome, our method can handle newly inserted fragments not in the reference genome. Such a fragment is incorporated Yasuda and Miyano Page 6 of 11 into a chromosome graph as a new chromosome. In particular, an edge e, where |e| is equal to the length of the fragment, is added to E S , and edges that connect vertices in a chromosome graph to e are added to E L . If any breakpoints are contained within the new fragment, vertices and edges are added to V M and E R , respectively. If a breakpoint corresponds to any aberrant adjacency, edges are also added to E L .

If a gene duplication has occurred in the target genome, it causes an increased copy number and aberrant adjacencies flanking the gene. If it is a tandem duplication, an aberrant adjacency connecting the upstream and downstream regions of the gene should exist. If these SVs exist in given SV data, any solution to our problem has to take into account gene duplication.

Limitations

A mixture of many cells cannot be handled because it is difficult to correctly estimate copy numbers. However, our method may generate meaningful results for data obtained from multiple cells if the sum of copy numbers is correctly estimated. In this case, the solution is a mixture of chromosomes of all cells in the sample, although some of the chromosomes might be fused.

Note that many optimal solutions may exist depending on how an optimal circulation is converted into chromosomes. (Figure 5). Choosing the right solution requires additional information such as the mate-pairs of long genomic fragments, or the result of experiments involving such techniques as fluorescence in situ hybridization (FISH) that indicate whether or not distant genomic regions are in the same chromosome.

Figure 5
figure 5

An example of a chromosome graph that has more than one optimal solution. Bold digits represent an optimal circulation on this graph. The chromosome graph in this figure has two optimal solutions {e1, 0eL1e2, 1eL2e1,2, e2,0ê2,1e2,1ê2, 2e2,2} and {e1,0eL1e2, 1ê2,2e2,2, e2,0ê2,1e2,1eL2e1,2}. Edges in E N E D are omitted, and the flow on each edge in E D has been subtracted from the flow of a corresponding edge in E S .

Toward implementation

For implementation, we require an algorithm that can calculate an optimal circulation on the bidirected graph. It would be difficult to implement Gabow's algorithm because no efficient implementation is currently known. Another option would be to use Medvedev's algorithm [19]. Any solver for general integer programming could also be used, as demonstrated by Oesper et al. [18], although the computational time bound is not guaranteed.

Conclusions

Continuing technological innovations in DNA sequencing will, in future, allow the prediction of an enormous number of SVs. However, detecting only individual SVs cannot reveal the global structure of chromosomes. Here, we formulated the problem of inferring chromosomes from the aberrant adjacencies of genomic regions, copy number variations (CNVs), and the number and length of chromosomes. The problem, which we term as the chromosome problem (ChrP), was proved to be NP-complete. However, if an instance of ChrP satisfies a constraint, which we call a weakly connected constraint (WCC), and if the length of chromosomes is ignored, the problem can be solved in O(|E|2 log |V | log |E|) time.

This work provides a theoretical basis for the development of practical computational tools that are emerging for use in analysis of the global structure of chromosomes based on SVs.

Methods

In this section, we show how we proved the theorems stated in the Results section.

Proof of Theorem 1

We first present an upper bound on the size of an optimal solution of ChrP to show that ChrP is in NP. Then, we prove that ChrP is NP-hard.

Lemma 1 Let G = (V, E) be a chromosome graph. Also, let C be a multi-set of chromosomes on G that minimizes W(C) such that |c i | ≤ λ i for c i C. Then, C has at most U(4|V| + 1)(|E| + 1) edges.

Proof Let cC be a chromosome in C. We define an edge e in c as non-excessive if eE S and m(C, e) ≤ n(e), and excessive otherwise. Let t c be the number of non-excessive edges visited by c. If t c >0, c can be written as c = p1e1p2e2 ... e t cp t c+1, where e k (1 ≤ kt c ) is a non-excessive edge and p k (1 ≤ kt c +1) is a possibly empty path that contains only excessive edges (Figure 6). If p k contains a cycle as its subpath, the cycle can be removed to decrease W(C), a contradiction. Accordingly, p k does not contain a cycle. This implies that p k visits at most 2|V| vertices and, thus, 2|V| edges. Therefore, at most, 4|V | excessive edges are visited for each non-excessive edge. Note that a non-excessive edge e can be visited, at most, n(e)-times. Therefore, c C t c e E s n ( e ) .

Figure 6
figure 6

An example of a chromosome that consists of non-excessive and excessive edges. Straight arrows represent non-excessive edges, while jagged lines represent sequences of excessive edges.

Chromosomes such that t c = 0 can exist only if they contribute to the decrease of the first or the second term of W(C) defined by (1). Accordingly, the number of such chromosomes is, at most, n N +n T . In addition, a chromosome c, such that t c = 0, does not contain any cycles because such a cycle can be removed to decrease W(C). Therefore, at most, c visits 2|V| vertices and, thus, 2|V| edges.

Consequently, C contains, at most, 2|V|(n N +n T ) + (4|V| +1) P e *** E S n(e) ≤ U(4|V |+1)(|E|+1) edges.

Lemma 2 The problem ChrP is in NP.

Proof Once an optimal solution C is given, whether or not W(C) is greater than a given constant can be determined in O(|V ||E|) time by Lemma 1.   □

Lemma 3 The problem ChrP is NP-hard.

Proof The Hamiltonian Cycle problem (HC) is a problem of finding a cycle that visits each vertex of a graph exactly once, and is a well-known NP-complete problem [34]. Here, we reduce HC to ChrP. Consider HC on a directed graph H = (V', E'), where V = { v 1 , v 2 , , v | V | } is a set of vertices and E' is a set of edges. We construct a chromosome graph G = (V, E) from H (Figure 7), where

Figure 7
figure 7

An instance of ChrP for solving the Hamiltonian Cycle problem (HC). In this graph, solid edges are constructed for each vertex in a graph H of HC, whereas dashed edges correspond to edges in H.

V = 1 i | V | { v i , 0 - , v i , 1 + , v i , 1 - , v i , 2 + , v i , 2 - , v i , 3 + }

is a set of vertices, and E = E S E L E R is a set of edges. Here, E S consists of

e 1 , 0 = - v 1 , 0 - , + v 1 , 1 + , 1 , 1 , e 1 , 1 = - v 1 , 1 - , + v 1 , 2 + , 2 , 1 , e 1 , 2 = - v 1 , 2 , + v 1 , 3 + , 1 , 1 , e i , 0 = - v i , 0 , + v i 1 + , 0 , 1 ( 2 i | V | ) , e i , 1 = - v i , 1 - , + v i 2 , 1 , 1 ( 2 i | V | ) , e i , 2 = - v i , 2 - , + v i , 3 , 0 , 1 ( 2 i | V | ) .

E R consists of

e ^ i , 1 = - v i , 1 + , + v i , 1 - , 0 , 0 ( 1 i | V | ) , e ^ i , 2 = - v i , 2 + , + v i , 2 - , 0 , 0 ( 1 i | V | ) .

E L consists of

e i : i = - v i , 2 + , + v i , 1 - , 0 , 0 ( ( v i , v i ) E ) .

In addition, we set n N = 1, n T = 0, and λ i = |V'| + 3 for any i. Then, we prove that H has a Hamiltonian cycle if, and only if, ChrP on G has a solution C such that W(C) = 0. Suppose that h is a Hamiltonian cycle on H. Let c be a chromosome that begins with e 1 , 0 e ^ 1 , 1 e 1 , 1 and then visits e i : i e i , 1 in the order that edges ( v i , v i ) appear in h from i' = 1, and finally ends with e 1 , 1 e ^ 1 , 2 e 1 , 2 . Then, a set of a single chromosome C = {c} satisfies W(C) = 0 and |c|=| V |+3 λ 1 .

Conversely, let C be a solution of ChrP that satisfies W(C) = 0. Because (2) holds, |C| = 1, Tr(C) = 0, and m(C, e) = n(e). Let c be the only chromosome in C. Because n(e1,1) = 2 and n(ei,1) = 1 for 2 ≤ i ≤ |V'|, a path that visits vertices v i V in the order that ei,1 appears in c is a Hamiltonian cycle on H.   □

Theorem 1 directly follows Lemma 2 and 3.

Proof of Theorem 2

Circulation on a bidirected graph

Let G = (V, E) be a bidirected graph, and a v,e for vV and eE be an integer such that

a v , e = 2 if  e  has two + -ends at  v , 1 if  e  has only one + -end at  v , - 1 if  e  has only one - -end at  v , - 2 if  e  has two - -ends at  v , 0 if  e  is not connected to  v .

Also let b v be an integer defined for each vV, Z be the set of non-negative integers, and l(e) and u(e) be two non-negative integers assigned to each edge eE called a lower bound and an upper bound, respectively. Unless otherwise specified, in this study l(e) = 0 and u(e) = ∞.

Definition 5 A bidirected flow (biflow) [19, 20] is a mapping f : EZ such that

l ( e ) f ( e ) u ( e ) f o r e a c h e E ,
(4)
e E a v , e f ( e ) = b v f o r e a c h v V .
(5)

The cost of f is defined as W(f) = ∑eEw(f, e), where w(f, e) is a cost of f on eE. A circulation is a biflow such that b v = 0 for any vV.

Circular chromosome graph

Definition 6 (Circular chromosome graph) Let G = (V,E) be a chromosome graph, and let v N and v T be new vertices. In addition, let E N be a set of the following edges: for 1 ≤ iN C ,

e t ( v i , 0 - ) = - v N , + v i , 0 - , 0 , 0 , e t ( v i , n i + ) = - v N , - v i , n i + , 0 , 0 , e t ( v i , j + ) = - v T , - v i , j + , 0 , 0 ( 1 j n i ) , e t ( v i , j - ) = - v T , + v i , j - , 0 , 0 ( 1 j n i ) ,

and

e T = - v N , + v T , n T , Q T , e N = + v N , + v N , n N , Q N .

Also, let E D be a set of the following edges for eE S ∪ {e N , e T }:

e ¯ = - d ( e , v i 1 , j 1 ) v i 1 , j 1 , - d ( e , v i 2 , j 2 ) v i 2 , j 2 , 0 , | e | ,

where v i 1 , j 1 and v i 2 , j 2 are vertices at the ends of e. The graph G ̃ = ( V { v N , v T } , E E N E D ) is called a circular chromosome graph.

See Figure 8 for an example. Let n(e N ) = n N and n(e T ) = n T . For eE S ∪{e N , e T }, we set l(e) = n(e), l ( ē ) =0, and u ( ē ) =n ( e ) . For eE L E R , we set l(e) = 1. We also set l(e t (v)) to 1 for vV W because these edges have to be visited in the solution.

Figure 8
figure 8

An example of a circular chromosome graph. The problem of optimizing multiple chromosomes is converted to the problem of finding a cycle on this graph. For simplicity, we omitted e t (·), except for the leftmost chromosome in the reference genome.

Lemma 4 Let w(f, e) = |e|f(e) and W0 = Q N n N + Q T n T + ∑eE|e|n(e). For any multi-set C of chromosomes on G, there is a circulation f on G ̃ such that

W ( f ) = W ( C ) + W 0 .
(6)

Conversely, for any circulation f on G ̃ that minimizes W ( f ), there is a multi-set C of chromosomes on G that satisfies (6). In addition, C can be calculated in O ( e E E N E D f ( e ) ) time.

Let E+ = {eEE N E D |l(e) ≥ 1 or n(e) ≥ 1}. Note that CC ( G ̃ , E + ) has only one weakly connected component because of WCC.

Proof First, we show that for any multi-set C of chromosomes on G, there exists a circulation f on G ̃ that satisfies (6). Let End(v) be the number of chromosomes that begin or end with v. Consider the following f:

f ( e ) = max { n ( e ) , m ( C , e ) } ( e E S ) , f ( e ¯ ) = max { 0 , n ( e ) m ( C , e ) } ( e E S ) , f ( e ) = m ( C , e ) ( e E L E R ) , f ( e t ( v ) ) = End ( v )   ( v V ) , f ( e N ) = max { n N , | C | } , f ( e ¯ N ) = max { 0 , n N | C | } , f ( e T ) = max { n T , Tr ( C ) } , f ( e ¯ T ) = max { 0 , n T  Tr ( C ) } .

Then, f is a circulation on G ̃ because f satisfies (4) and (5). Thus, we observe that

w ( e , m ( C , e ) ) = | e | f ( e ) + | e | f ( ē ) - | e | n ( e ) ,

for eE S , and

w N ( C ) = | e N | f ( e N ) + | e N | f ( ē N ) - Q N n N , w T ( C ) = | e T | f ( e T ) + | e T | f ( ē T ) - Q T n T .

Therefore, because |e| = 0 for eE L E R ∪{e t (v)|vV} and w(f, e) = |e|f(e), f satisfies (6).

Conversely, let f be a circulation on G ̃ that minimizes W(f). We show how to construct a multi-set C of chromosomes on G that satisfies (6).

First, for eE S ∪ {e N , e T }, we subtract f ( ē ) from f(e), and also set f ( ē ) to 0.

Second, we construct a set R of cycles such that m(R, e) = f(e) for any edge e in G ̃ . For directed graphs, the flow decomposition theorem [35] ensures that such R can be obtained in O ( e E E N E D f ( e ) ) time. This is also true for bidirected graphs.

Third, we merge cycles in R. Whenever a vertex is shared by two cycles in R, they are merged into a single cycle. Because of WCC, CC ( G ̃ , E + ) consists of only one weakly connected component. This implies that all cycles that contain edges in E+ can be merged into a single cycle. Note that any rR contains at least one edge in E+, because otherwise r can be removed to decrease W(f). Therefore, all cycles in R can be merged into a single cycle r ̃ .

Finally, let C be a multi-set of paths generated by removal of v N , v T , and edges in E N from r ̃ . Because cC is connected to edges in E N in r ̃ , the first and last edge of c is in E S due to the directions of these edges. Accordingly, c is a chromosome. Therefore, C is a multi-set of chromosomes on G.

All of these steps can be completed in O ( e E E N E D f ( e ) ) time. In addition, we observe that the following equations hold:

| C | = f ( e N ) - f ( e ¯ N ) , Tr ( C ) = f ( e T ) - f ( e ¯ T ) , m ( C , e ) = f ( e ) + f ( e ¯ ) ( e E S ) .

Accordingly, w ( e , m ( C , e ) ) = w ( f , e ) + w ( f , ē ) + | e | n ( e ) for eE S , and

w N ( C ) = w ( f , e N ) + w ( f , e ¯ N ) + Q N n N , w T ( C ) = w ( f , e T ) + w ( f , e ¯ T ) + Q T n T , w ( e , m ( C , e ) ) = 0 ( e E L E R ) .

Therefore, C satisfies (6).

By Lemma 4, the solution of ChrW can be obtained by calculating a circulation f on G ̃ that minimizes W(f). By Lemma 1, setting u(e) = U(4|V| + 1)(|E| + 1) does not affect the solution. In addition, |E N | = O(|E|) and |E D | = O(|E|). Accordingly, the circulation f can be calculated in O(|E|2 log |V| log |E|) time by using Gabow's algorithm [20]. Therefore, the optimal solution can be calculated in O(|E|2 log |V| log |E|) time.

Proof of Theorem 3

ChrL is in NP because of Lemma 1.

Here, we show that the well-known PARTITION problem [34] can be reduced to ChrL. Let n be a positive integer and S = {iZ|1 ≤ in}. Also, let s(i) be an integer function defined for iS such that Yasuda and Miyano Page 9 of 11 s(i) > 0, and SΣ = ∑iSs(i). The problem of finding a subset S'S such that

i S s ( i ) = i S - S s ( i ) = S Σ / 2

is called the partition problem (hereafter referred to as PARTITION) [34]. It is well known that PARTITION is NP-complete. We reduce PARTITION to ChrL by constructing a chromosome graph whose solution for ChrL contains two chromosomes that correspond to two subsets of a solution of PARTITION.

Let G = (V, E) be a chromosome graph, where

V = 1 i n + 1 { v i , 0 - , v i , 1 + , v i , 1 - , v i , 2 + , v i , 2 - , v i , 3 + }

is a set of vertices, and E = E S E L E R be a set of edges. Here, E S consists of

e i , 0 = - v i , 0 - , + v i , 1 + , 1 , 9 S Σ ( 1 i n ) , e i , 1 = - v i , 1 - , + v i , 2 + , 2 , s ( i ) ( 1 i n ) e i , 2 = - v i , 2 - , + v i , 3 + , 1 , S Σ - s ( i ) ( 1 i n ) e n + 1 , 0 = - v n + 1 , 0 - , + v n + 1 , 1 + , 2 , 9 S Σ / 2 , e n + 1 , 1 = - v n + 1 , 1 - , + v n + 1 , 2 + , n + 2 , 0 , e n + 1 , 2 = - v n + 1 , 2 - , + v n + 1 , 3 + , 2 , 5 S Σ .

In addition, E R consists of

e ^ i , 1 = - v i , 1 + , + v i , 1 - , 0 , 0 ( 1 i n + 1 ) , e ^ i , 2 = - v i , 2 + , + v i , 2 - , 0 , 0 ( 1 i n + 1 ) ,

and E L consists of

e L i = + v i , 1 - , - v n + 1 , 2 + , 0 , 0 ( 1 i n ) , e L i = - v i , 2 + , + v n + 1 , 1 - , 0 , 0 ( 1 i n ) .

We set λ i = 10SΣ for any i ≥ 1, Q N = Q T = 100SΣ, n N = n+2, and n T = 0. See Figure 9 for an example. In addition, we set V W to V5V3, and E W to E by making all edges in E L E R required so that G satisfies WCC.

Figure 9
figure 9

An example of a chromosome graph for solving the partition problem (PARTITION). In this example, n = 4.

We show that PARTITION for S has a solution S'S if, and only if, there exists a solution C of ChrL such that W(C) = 0. First, suppose that PARTITION has a solution S'. Let r S' be a cycle generated by merging cycles e n + 1 , 1 e L i e i , 1 e L i for iS'. We define rS-S'in the same way. Consider a multi-set C = {c1,..., cn+2}, where c i C is a chromosome on G such that

c i = e i , 0 e ^ i , 1 e i , 1 e ^ i , 2 e i , 2 ( 1 i n ) , c n + 1 = e n + 1 , 0 e ^ n + 1 , 1 r S e n + 1 , 1 e ^ n + 1 , 2 e n + 1 , 2 , c n + 2 = e n + 1 , 0 e ^ n + 1 , 1 r S - S e n + 1 , 1 e ^ n + 1 , 2 e n + 1 , 2 .

Then, W(C) = 0 because |C| = n + 2, Tr(C) = 0, and m(C, e) = n(e) for eE S . In addition, C visits all required edges. Furthermore, |c i | = 10Σ ≤ λ i for 1 ≤ in + 2.

Conversely, suppose that ChrL for G has an optimal solution C that satisfies W(C) = 0. Because W(C) = 0, we obtain |C| = n + 2, Tr(C) = 0, and m(C, e) = n(e) for eE. Because ∑eE|e|n(e) = 10(n + 2)SΣ, |c| = 10Σ for each cC. Let c i be a chromosome that begins with ei,0 for 1 ≤ in. The other two chromosomes are denoted by cn+1 and cn+2. Then, c1 begins with e 1 , 0 e ^ 1 , 1 e 1 , 1 . Suppose that c1 does not visit e ^ 1 , 2 e 1 , 2 . Then, there is a chromosome c i that visits e ^ 1 , 2 e 1 , 2 , whose previous edge has to be e1,1 in c i . Therefore, for some paths p1 and p2,

c 1 = e 1 , 0 e ^ 1 , 1 e 1 , 1 p 1 c i = p 2 e 1 , 1 e ^ 1 , 2 e 1 , 2 .
(7)

Because of (7), | c 1 | = | e 1 , 0 | + | e ^ 1 , 1 | + | e 1 , 1 | + | p 1 | = 10 S Σ = | e 1 , 0 | + | e ^ 1 , 1 | + | e 1 , 1 | + | e ^ 1 , 2 | + | e 1 , 2 | . Therefore, | p 1 | = | e ^ 1 , 2 | + | e 1 , 2 | . We modify C so that

c 1 = e 1 , 0 e ^ 1 , 1 e ^ 1 , 2 e 1 , 2 , c i = p 2 e 1 , 1 p 1 .

The modified C still satisfies the required conditions. After this modification is repeated for 2 ≤ in until no more modifications can be applied, C satisfies c i = e i , 0 e ^ 1 , 1 e i , 1 e ^ i , 2 e i , 2 for 1 ≤ in. Another chromosome exists that visits ei,1 for each 1 ≤ in, which is one of cn+1 and cn+2. Let S' = {i|m(cn+1, ei,1) >0}. Then, ∑iS's(i) = 10SΣ − (9/2+5)SΣ = 1/2SΣ. Therefore, S' is a solution of PARTITION.