Repeat detection and resolution. (A) P is a precontig covered by a set of full-length supporting reads Sw and two sets of partial-length supporting reads S1 and S2. Blue parts in S1 and S2 indicate the regions that can be aligned with the corresponding regions in P, and the parts in red indicate that they cannot be aligned with P. Two possible genomic arrangements, B and C, can explain the precontig P. (B) The precontig P is fully consistent with the genomic region (P1–P2–P3). (C) The precontig P is only partially consistent with two genomic regions (P1–P2–Q3 and Q1–P2–P3), although each of the two local regions is supported by a subset of full-length reads. (D) Because the true genomic arrangement is uncertain because of the repeat P2, JR-Assembler identifies the repeat boundaries (Xp1 and Xp2) by finding a unique read rb that satisfies the following conditions: (i) rb is extendable, (ii) over 90% of prefix or suffix bases match to P perfectly, and (iii) the remaining bases contain at least one mismatch to P. (E) JR-Assembler breaks P into three separated contigs: P1, P2, and P3.