Assembling contigs in draft genomes using reversals and block-interchanges

The techniques of next generation sequencing allow an increasing number of draft genomes to be produced rapidly in a decreasing cost. However, these draft genomes usually are just partially sequenced as collections of unassembled contigs, which cannot be used directly by currently existing algorithms for studying their genome rearrangements and phylogeny reconstruction. In this work, we study the one-sided block (or contig) ordering problem with weighted reversal and block-interchange distance. Given a partially assembled genome π and a completely assembled genome σ, the problem is to find an optimal ordering to assemble (i.e., order and orient) the contigs of π such that the rearrangement distance measured by reversals and block-interchanges (also called generalized transpositions) with the weight ratio 1:2 between the assembled contigs of π and σ is minimized. In addition to genome rearrangements and phylogeny reconstruction, the one-sided block ordering problem particularly has a useful application in genome resequencing, because its algorithms can be used to assemble the contigs of a draft genome π based on a reference genome σ. By using permutation groups, we design an efficient algorithm to solve this one-sided block ordering problem in Oδn time, where n is the number of genes or markers and δ is the number of used reversals and block-interchanges. We also show that the assembly of the partially assembled genome can be done in On time and its weighted rearrangement distance from the completely assembled genome can be calculated in advance in On time. Finally, we have implemented our algorithm into a program and used some simulated datasets to compare its accuracy performance to a currently existing similar tool, called SIS that was implemented by a heuristic algorithm that considers only reversals, on assembling the contigs in draft genomes based on their reference genomes. Our experimental results have shown that the accuracy performance of our program is better than that of SIS, when the number of reversals and transpositions involved in the rearrangement events between the complete genomes of π and σ is increased. In particular, if there are more transpositions involved in the rearrangement events, then the gap of accuracy performance between our program and SIS is increasing.


Background
The techniques of next generation sequencing have greatly advanced in the past decade [1][2][3], which allows an increasing number of draft genomes to be produced rapidly in a decreasing cost. Usually, these draft genomes are partially sequenced, leading to their published genomes as collections of unassembled contigs (short for contiguous fragments). These draft genomes in contig form, however, can not be used immediately in some bioinformatics applications, such as the study of genome rearrangements, which requires the completely assembled genomes to calculate their rearrangement distances [4]. To adequately address this issue, Gaul and Blanchette [5] introduced and studied the so-called block ordering problem defined as follows. Given two partially assembled genomes, with each representing as an unordered set of blocks, the block ordering problem is to assemble (i.e., order and orient) the blocks of the two genomes such that the distance of genome rearrangements between the two assembled genomes is minimized. The blocks mentioned above are the contigs, each of which can be represented by an ordered list of genes or markers. In their work [5], Gaul and Blanchette proposed a linear-time algorithm to solve the block ordering problem if the problem is further simplified to maximize the number of cycles in the breakpoint graph corresponding to the assembled genomes. The rationale behind this modification is totally based on a result obtained by Bourque and Pevzner [6], showing that the reversal distance between two assembled genomes can be approximated well by maximizing the number of cycles in their corresponding breakpoint graph. Actually, in addition to the number of cycles, the number of hurdles, as well as the presence of a fortress or not, is also important and needed for determining the actual reversal distance [7]. Therefore, it is still a challenge to efficiently solve the block ordering problem by optimizing the true rearrangement distance.
In the literature, many different kinds of genome rearrangements have been extensively studied [4], such as reversal (also called inversion), transposition and blockinterchange (also called generalized transposition), translocation, fusion and fission. Reversal affects a segment on a chromosome by reversing this segment as well as exchanging its strands. Transposition rearranges a chromosome by interchanging its two adjacent and nonoverlapping segments. Block-interchange is a generalized transposition that exchanges two nonoverlapping but not necessarily adjacent segments on a chromosome. Translocation acts on two chromosomes by exchanging their the end fragments. Fusion is a special translocation that joins two chromosomes into one and fission is also a special translocation that splits a chromosome into two. In this study, we consider a variant of the block ordering problem, in which one of the two input genomes is still partially assembled but the other is completely assembled, with optimizing the genome rearrangement distance measured by weighted reversals and block-interchanges, whose weights are 1 and 2, respectively. For distinguishing this special block ordering problem from the original one, we call it as one-sided block (or contig) ordering problem. In fact, an efficient algorithm to solve the one-sided block ordering problem has a useful application in genome resequencing [8,9], because the reference genome for resequencing organisms can serve as the completely assembled genome in the onesided block ordering problem and the contigs of partially assembled resequencing genome can then be assembled together into one or several scaffolds based on the reference genome. From this respect, the one-sided block ordering problem can be considered as a kind of contig scaffolding (or assembly) problem that aims to use genome rearrangements to create contig scaffolds for a draft genome based on a reference genome.
Currently, several contig scaffolding tools based on the reference genomes have been developed, such as Projector 2 [10], OSLay [11], ABACAS [12], Mauve Aligner [13], fillScaffolds [14], r2cat [15] and SIS [16]. Among these contig scaffolding tools, both SIS and fillScaffolds use the concept of genome rearrangements to generate contig scaffolds for a draft genome. SIS deals with only reversals, while in addition to reversals, fillScaffolds considers other rearrangements, such as transpositions and translocations (including fissions and fusions). Basically, SIS was dedicated to creating the contig scaffolds for prokaryotic draft genomes by heuristically searching for their inversion signatures, where an inversion signature is a pair of adjacent genes or markers appearing along a contig such that they form a breakpoint and are also located in different transcriptional strands. As for fillScaffolds, it used the traditional technique of breakpoint graphs to assemble the contigs of draft genomes. In the study by Dias and colleagues [16], they have used real prokaryotic draft genomes to demonstrate that SIS had the best overall accuracy performance when compared to the other tools we mentioned above.
In this study, we utilize permutation groups in algebra, instead of the breakpoint graphs used by Gaul and Blanchette [5], to design an efficient algorithm, whose time complexity is O (δn) , for solving the one-sided block ordering problem with weighted reversal and block-interchange distance, where n is the number of genes or markers and δ is the number of reversals and block-interchanges used to transform the assembly of the partially assembled genome (i.e., draft genome) into the completely assembled genome (i.e., reference genome). In particular, we also show that the assembly of the partially assembled genome can be done in O (n) time and its weighted reversal and block-interchange distance from the completely assembled genome can be calculated in advance in O (n) time. In addition, we have implemented our algorithm into a program and used some simulated datasets to compare its accuracy performance to SIS on assembling the contigs in the draft genomes based on their reference genomes. Our experimental results have shown that the averaged normalized contig mis-join errors of our program are lower than those of SIS, when the number of reversals and transpositions involved in the rearrangement events between the complete genomes of the partially and completely assembled organisms is increased. In particular, if there are more transpositions involved in the rearrangement events, then the gap of accuracy performance between our program and SIS is increasing.

Preliminaries
One-sided block ordering problem In the following, we dedicate ourselves to linear, unichromosomal genomes. With a slight modification, however, our algorithmic result can still apply to circular, uni-chromosomal genomes, or to multi-chromosomal genomes with linear or circular chromosomes in a chromosome-by-chromosome manner. Once completely assembled, a uni-chromosomal genome can be represented by a signed permutation of n integers between 1 and n, with each integer representing a gene or marker and its associated sign indicating the strandedness of the corresponding gene or marker. If the genome is partially assembled, then it will be represented by an unordered set of blocks, where a block B of size k, denoted by Given an unordered set of m blocks, say B = {B 1 , B 2 , . . . , B m } , corresponding to a partially assembled genome, an ordering (or assembly) of B is an ordered list of m blocks in which each block B i or its reverse B i appears exactly once, [3,2] , [−5, 6]}. Then (B 1 , B 3 , B 2 ) = ( [1,4], [-5, 6], [3,2]) and (B 1 , -B 3 , B 2 ) = ( [1,4], [-6, 5], [3,2]) are two orderings of B . Basically, each ordering of B induces (or defines) a signed permutation of size n, which is obtained by concatenating the blocks in this ordered list. For instance, the ordering (B 1 , B 3 , B 2 ) in the above exemplified B induces the signed permutation (1, 4, -5, 6, 3, 2), which simply is denoted by Clearly, the permutation induced by an ordering of B corresponds to an assembly of the blocks in B . Now, the one-sided block ordering problem we study in this paper is formally defined as follows: One-sided block ordering problem with reversal and block-interchange distance Input: A partially assembled genome π and a completely assembled genome s.
Output: Find an ordering of π such that the rearrangement distance measured by reversals and blockinterchanges with the weight ratio 1:2 between the permutation induced by the ordering of π and s is minimized.
As discussed in our previous study [17], it is biologically meaningful to assign twice the weight to blockinterchanges than to reversals, due to the observation from the biological data that transpositions occur with about half the frequency of reversals [18].

Permutation groups
Permutation groups have been proven to be a very useful tool in the studies of genome rearrangements [17]. Below, we recall some useful definitions, notations and properties borrowed form our previous work [17]. Basically, given a set E = {1, 2, ..., n}, a permutation is defined to be a one-to-one function from E into itself and usually expressed as a product of cycles in the study of genome rearrangements. For instance, π = (1)(3, 2) is a product of two cycles to represent a permutation of E = {1, 2, 3} and means that π(1) = 1, π(2) = 3 and π(3) = 2. The elements in a cycle can be arranged in any cyclic order and hence the cycle (3,2) in the permutation π exemplified above can be rewritten as (2,3). Moreover, if the cycles in a permutation are all disjoint (i.e., no common element in any two cycles), then the product of these cycles is called the cycle decomposition of the permutation. In fact, a permutation in the cycle decomposition can be used to model a genome containing several circular chromosomes, with each disjoint cycle representing a circular chromosome. Notice that in the rest of this article, we say "cycle in a permutation" to mean "cycle in the cycle decomposition of this permutation" for simplicity, unless otherwise specified. A cycle with k elements is further called a k-cycle. In convention, the 1-cycles in a permutation are not written explicitly since their elements are fixed in the permutation. For instance, the above exemplified permutation π can be written as π = (2, 3). If the cycles in a permutation are all 1-cycles, then this permutation is called an identify permutation and denoted by 1. Suppose that a and b are two permutations of E. Then their product ab, also called their composition, defines a permutation of E satisfying ab(x) = a(b(x)) for all x ∈ E . If both α and b are disjoint, then ab = ba. If ab = 1, then a is called the inverse of b, denoted by b -1 , and vice versa. Moreover, the conjugation of b by a, denoted by a · b, is defined to be the permutation αβα − 1 . It can be verified that if y = b(x), then a(y) = ab(x) = aba -1 a(x) = a · b(a (x)). Hence, a · b can be obtained from b by just changing its element x with a(x). In other words, if b = (b 1 , b 2 , ..., b k ), then a · b = (a(b 1 ), a(b 2 ), ..., a(b k )).
It is a fact that every permutation can be expressed into a product of 2-cycles, in which 1-cycles are still written implicitly. Given a permutation a of E, its norm, denoted by ||a||, is defined to be the minimum number, say k, such that a can be expressed as a product of k 2cycles. In the cycle decomposition of a, let n c (a) denote the number of its disjoint cycles, notably including the 1-cycles not written explicitly. Given two permutations a and b of E, a is said to divide b, denoted by a|b, if and only if ||ba -1 || = ||b|| -||a||. In our previous work [17], it has been shown that ||a|| = |E| -n c (a) and for any k elements in E, say a 1 , a 2 , ..., a k , they all appear in a cycle of a in the ordering of a 1 , a 2 , ..., a k if and only if (a 1 , a 2 , ..., a k ) | a.

A model for representing DNA molecules
As mentioned before, a permutation in the form of the cycle decomposition can be used to model a genome containing multiple chromosomes (or a chromosome with multiple contigs), with each cycle representing a chromosome (or contig). To facilitate modelling the rearrangement of reversals using the permutation groups, however, we need to use two cycles to represent a chromosome, with one cycle representing a strand of the chromosome and the other representing the complementary strand. For this purpose, we first let E = {-1, 1, -2, 2, ..., -n, -n} and Γ = (1, -1)(2, -2) ... (n, -n). We then use an admissible cycle, which is a cycle containing no i and its opposite -i simultaneously for some i ∈ E , to represent a chromosomal strand, say π + , and use π -= Γ · (π + ) -1 , which is the reverse complement of π + , to represent the opposite strand of π + . As demonstrated in our previous work [17], it is useful to represent a double stranded chromosome π by the product of its two strands π + and π -, that is, π = π + π − = π − π + , because a reversal (respectively, block-interchange) acting on this DNA molecule can be mimicked by multiplying two (respectively, four) 2-cycles with π, as described in the following lemmas.
Lemma 1 ( [17]) Let π = π + πdenote a double stranded DNA and let x and y be two elements in E. If (x, y) π , that is, x and y are in the different strands of π, then the effect of (πΓ(y), πΓ(x))(x, y)π is a reversal acting on π.
Lemma 2 ( [17]) Let π = π + πdenote a double stranded DNA and let u, v, x and y be four elements in E. If (x, u, y, v)|π, that is, x, u, y and v appear in the same strand of π in this order, then the effect of (πΓ(v), πΓ(u)) (πΓ(y), πΓ(x)) (u, v)(x, y)π is a block-interchange acting on π.
Moreover, as described in the following lemma, we have shown in [17] that given two different DNA molecules π and s, every cycle a in (the cycle decomposition of) sπ -1 always has a mate cycle (πΓ) · a -1 that also appears in sπ -1 . In fact, a and (πΓ) · a -1 in sπ -1 are each other's mate cycle.

An efficient algorithm for the one-sided block ordering problem
To clarify our algorithm, we start with defining some notations. Let a denote an arbitrary linear DNA molecule (or contig). As mentioned previously, it is represented by the product of its two strands a + and a -, that is, a = a + a -. If a contains k genes (or markers), we also denote its a + by (a + [1], a + [2], ..., a + [k]), where a + [i] is the i-th gene in a, and its aby (a - [1], a - [2], ..., a -[k]). By convention, a + [1] and a - [1] are called as tails of a. Let π = π 1 π 2 ... π m be a linear, uni-chromosomal genome that is partially assembled into m contigs π 1 , π 2 , ..., π m , each with n i genes, and σ = (1, 2, ..., n) be a linear, uni-chromosomal genome that is assembled com- For the purpose of designing our algorithm later, we add four caps c 2(i−1) , c 2(i−1)+1 , −c 2(i−1) and -c 2(i-1)+1 to the ends of each contig π i , where 1 ≤ i ≤ m, leading to a cap- ) . Moreover, we insert m-1 dummy contigs without any genes (i.e., null contigs) s 2 , s 3 , ..., s m into s, where the original contig in s becomes s 1 now, and add four caps c 2(i-1) , c 2(i-1)+1 , -c 2(i-1) and -c 2(i-1)+1 to the ends of each contig s i to obtain a cap- ). Notice that the purpose of adding caps to the ends of the contigs is to serve as delimiters when we use permutation groups to model translocations of multiple contigs later. We denote the capping π and s by π and σ , respectively. To distinguish the four caps in a capping contig, say π i , we call the left capsπ + i [1] andπ − i [1] as 5' caps and the right capŝ as 3' caps. Given an integer x in E that is contained in a contig a = a + awith k genes (or markers), we define a function char(x,α ) below to represent the character of x in the capping contigα =α +α− that is obtained by adding four caps from C to the ends of a.
(that is, α is null and x is the 3 cap inα). T, if k = 0 and (x =α + [2] (that is, α is not null and x is a tail in α). O, otherwise.
In addition, we define 5cap (x,α) to be the 5' cap in the strand ofα that contains x. For convenience, we extend the definitions above from the capping contig to the capping genome. For instance, given a capping genome, sayπ , char(x,π ) denotes the character of x in a capping contigπ i ofπ that contains x, and 5cap(x,π ) denotes the 5' cap of the strand inπ i containing x, that is, char(x,π ) = char(x,π i ) and 5cap (x,π ) = 5cap (x,π i ). In our previous work [17], we have shown the following lemma.
It is not hard to see that the permutation induced by an ordering of the uncapped genome π can be considered as the result of applying consecutive m -1 fusions to the m contigs in π. Based on the above discussion, it can be realized that our purpose is to find m -1 translocations to act onπ such that their rearrangement effects on the original π are m -1 fusions and the genome rearrangement distance measured by weighted reversals and block-interchanges between the resulting assembly of the contigs in π and s is minimum. In Algorithm 1 below, we describe our algorithm for efficiently solving the one-sided block ordering problem, where reversals are weighted one and blockinterchanges are weighted two. Basically, we try to derive m -1 fusions fromσπ −1 to act on π in Algorithm 1.
Find two adjacent elements x and y in a cycle of σπ −1 such that (x, (y))|π .
In the following, we prove the correctness of Algorithm 1. Initially, it is not hard to see that all the 5' caps are fixed inσπ −1 and char(x,π ) = N3 for all x ∈ E . For any element x ∈ E with char(x,π i ) = T, where , that is, the 5' cap ofπ i is not equal to that ofσ 1 , then the character ofσπ −1 (x) inπ must be C3. If any cycle in σπ −1 contains any two elements x and y with the same character (either T or C3) inπ , then we can extract two 2-cycles c 1 = (x, y) and c 1 = (π (y),π (x)) from two mate cycles inσπ −1 and multiply c 2 c 1 c 2 c 1 withπ to exchange the caps of the contigs containing x and y, respectively, inπ , where c 2 = (5cap(x,π ), 5cap(y,π )) and c 2 = (π (5cap(y,π )),π (5cap(x,π ))) . This is the job to be performed in the step 3 in Algorithm 1. Moreover, after finishing the cap exchanges in the step 3, each cycle in the remainingσπ −1 has at most one element with T character and at most one element with C3 character. In other words, after running the step 3, there are at least 2(m-1) cycles in the resultingσπ −1 such that each such a cycle contains exactly one element, say x, with (x,π ) = T and exactly one element, say y, with char(y,π) = C3, andσπ −1 (x) = y . In this case, we can further derive 2(m -1) 2-cycles from these cycles inσπ −1 with each 2-cycle having a character pair of (T, C3). Intriguingly, we shall show below that these 2(m-1) 2-cycles with character pair (T, C3), denoted by f 1 , f 1 , . . . , f m−1 , f m−1 , can be used to obtain an optimal ordering of π such that the weighted reversal and block-interchange distance between the permutation induced by this ordering of π and s is minimum.
In fact, f k and f k , where 1 ≤ k ≤ m -1, are derived from two mate cycles inσπ −1 and hence we call them as mate 2-cycles below. Moreover, if f k = (x, y), then f k = (π (y),π (x)) .
For 1 ≤ k ≤ m -1, we simply let f k = (x k , y k ) , where char(x k ,π ) = T and char(y k ,π ) = C3. Then f k = (π (y k ),π (x k )). As mentioned previously, the permutation induced by an ordering of π can be mimicked by performing m -1 consecutive fusions on π that has m contigs initially. According to Lemma 5 and our previous discussion, if f k π , where 1 ≤ k ≤ m -1, then g k f k g k f k can be applied toπ to function as a fusion of two contigs in π, where gk = (5cap(xk,π), 5cap(yk,π )) and g k = (π (5cap(y,π )),π (5cap(x,π))). Notice that g k and g k are mate 2-cycles. However, not all f 1 , f 2 , . . . , f m−1 cannot divideπ . Suppose that only the first l 2-cycles f 1 , f 2 , . . . , f λ cannot divideπ , where 0 ≤ λ ≤ m -1, that is, f k π for 1 ≤ k ≤ l, but f k |π for λ + 1 ≤ k ≤ m -1. In this situation, we shall show below that we still can use f 1 , f 2 , . . . , f m−1 , as well as their mate 2-cycles, to derive an optimal ordering of π, as we did in the step 4 in Algorithm 1.
Recall that the 5' caps are all fixed in the beginninĝ σπ −1 (before the step 3 in Algorithm 1). As mentioned before, for any translocation used to perform onπ , it can be expressed as four 2-cycles, two with (non-C5, non-C5) character pair and the others with (C5, C5). It can be verified that during the process of the step 3, no two elements x and y with char (x,π ) = C5 but char (y,π ) = C5 can be found in a cycle of theσπ −1 [17], that is, C5 and non-C5 elements are not mixed together in the same cycle ofσπ −1 . Actually, this property still continues to be asserted when we later perform any translocation onπ to function as a fusion of π. Let us now pay attention on those cycles inσπ −1 with only non-C5 elements and temporarily denote the composition of these cycles by φ(σπ −1 ) . If we still can find any two elements x and y from a cycle in φ(σπ −1 ) such that (π (5cap(y,π )),π (5cap(x,π)))(π (y),π (x))(5cap(x,π ), 5cap(y,π))(x, y) is an exchange of caps when applying it toπ , then we apply this cap exchange toπ until we cannot find any one from φ(σπ −1 ) . Finally, we denote such a φ(σπ −1 ) without any cap exchange by ψ(σπ −1 ). Basically, ψ(σπ −1 ) can be considered as a permutation of E = E ∪ {−c 2i , c 2i+1 : 0 ≤ i ≤ m − 1} and hence its norm ||ψ(σπ −1 )|| is equal to |E | − n c (ψ(σπ −1 )) according to the formula we mentioned before.
Proof. For simplicity, it is assumed that we cannot find any cap exchange fromσπ −1 to perform onπ . We then consider the following two cases.
According to Corollary 1, it can be realized that f k , as well as its mate 2-cycle f k , can derive a good fusion to act on π, where 1 ≤ k ≤ l. If l = m -1, then performing the m -1 fusions on π, as we did in Algorithm 1, corresponds to an optimal ordering of π such that the weighted reversal and block-interchange distance between the assembly of π and s is minimum. If λ <m -1, then we show below that the fusions of m -1 contigs in π performed by our algorithm utilizing f 1 , f 2 , ..., f m-1 is still optimal.
Case 2: Suppose that there is no f j = (x j , y j ) such that x j = x, where 1 ≤ j ≤ m − 1, char (x j ,ω i−1 ) = T and char (y j ,ω i−1 ) = C3. Let a 1 denote the cycle containing x and a 2 denote the cycle containing y inσω −1 i−1 . Also let α 1 and α 2 be the mate cycles of a 1 and a 2 , respectively, inσω −1 i−1 . Note that after applying τ i toω i−1 , the cycles a 1 and a 2 will be merged into a single cycle, say a, inσω −1 i−1 τ −1 i and α 1 and α 2 will be merged into a single cycle, say α . Moreover, the characters of x and y since there are totally δ iterations to find the reversals and block-interchanges and the time complexity of each iteration is dominated by the cost of finding a reversal or block-interchange that is O(n) time. Notice that although Algorithm 1 we described above is dedicated to linear, uni-chromosomal genomes, it can still be applied to circular, uni-chromosomal genomes, or to multi-chromosomal genomes with linear or circular chromosomes in a way of chromosome by chromosome.
Theorem 1 Given a partially assembled genome π and a completely assembled genome s, the one-sided block ordering problem can be solved in O(δn) time and the weighted rearrangement distance between the permutation assembly(π) induced by the optimal ordering of π and s is ||σπ −1 || 2 that can be computed in O(n) time, whereπ is the capping genome of π with the cap exchanges and m -1 fusions being done,σ is the capping genome of s, n is the number of genes or markers, and δ is the number of reversals and block-interchanges used to transform assembly(π) into s.
As mentioned in the introduction, any algorithm to solve the one-sided block ordering problem can be used to assemble (i.e., order and orient) the contigs in a draft genome based on a reference genome, if we denote this draft genome as π and use the reference genome as s. For this application, our Algorithm 1 can finish its job just in O(n) time, because it does not need to do the steps 5 and 6 in this situation.

Experimental results
We have implemented Algorithm 1 as mentioned in the previous section into a program and also compared its accuracy performance to SIS on assembling the contigs of partially assembled genomes using some simulated datasets of linear, uni-chromosomal genomes. For this purpose, we compared the permutation induced by an assembly algorithm for a partially assembled genome Figure 1 Comparison of accuracy performance between our program and SIS on simulated datasets with different ratios of the involved reversals and transpositions. with its actual permutation by counting the number of breakpoints between them, where each breakpoint corresponds to an error of incorrectly joining two contigs (i.e., a mis-join error) caused by the assembly algorithm. This breakpoint number is then normalized by the number of contigs minus r to represent a fraction of incorrect contig joins, where r = 1 if the chromosome is linear; otherwise, r = 0. Each of partially assembled genomes with single linear chromosome in our simulated datasets was prepared and tested as follows. First, we generated the reference genome s = (1, 2, ..., n) with a linear chromosome of n genes, where n varies from 50 to 1000 with in the step of 50, and performed δ random rearrangement events (reversals and/or transpositions) on s to obtain a permutation of a linear, uni-chromosomal genome π', where δ varies from zero to 100 in the step of 1. Among the δ rearrangement events in our simulations, we used four different occurrence ratios to randomly generate reversals and transpositions: (1) 1:0, (2) 2:1, (3) 1:1 and (4) 0:1. Next, the genome π is randomly fragmented into m contigs of various sizes to simulate the partially assembled genome π, where m varies from 50 to 500 with step 50. Finally, for each choice of n, m, δ and reversal/transposition ratio, we repeated the experiments 10 times and compared our program with SIS using their averaged normalized misjoin errors. As shown in Figure 1, the averaged normalized contig mis-join errors of our program are lower than those of SIS for all simulated datasets when the number of the involved reversals and transpositions is increased. In particular, if there are more transpositions involved in the rearrangement events, then the gap of accuracy performance between our program and SIS is increasing. The main reason may be due to the fact that our program can deal with both reversals and blockinterchanges (including transpositions as a special case), while SIS considers only reversals without taking into account transpositions.

Conclusions
In this study, we introduced and studied the one-sided block/contig problem with optimizing the weighted reversal and block-interchange distance, which particularly has a useful application in genome resequencing. We finally designed an efficient algorithm to solve this problem in O(δn) time, where n is the number of genes or markers and d is the number of used reversals and block-interchanges. In addition, we showed that the assembly of the partially assembled genome can be done in O(n) time and its weighted rearrangement distance from the completely assembled genome can be calculated in advance in O(n) time. Finally, our simulation results showed that the accuracy performance of our program is better than that of the currently existing tool SIS when the number of the involved reversals and transpositions is increased. Moreover, the gap of this accuracy performance between our program and SIS is increasing, if there are more transpositions involved in the rearrangement events.