An illustrative example of insert-size guided pairwise alignment for overlap detection in a gap containing a triple tandem repeat ‘GAACCCT’. First, on the axis corresponding to the DNA sequence in the gap, the collected reads are placed at their prior positions, which are inferred from their mate position and the insert size. The prior positions of reads and are 11 and 16. Notably, two pseudo reads, and , generated from the contig ends flanking the gap are added. Then, a pair of reads are aligned only when their prior positions are close, taking into account the variation of insert sizes. If an alignment is statistically significant, it is marked by yellow parallel lines between bases as well as by double-headed arrows between reads. The tandem repeat causes a false overlap between reads and , as indicated by the red double-headed arrow, resulting in an outlier in the latter regression model. The repeat also leads to two different significant alignments between reads and , respectively marked by the yellow solid and dotted lines. In this case, RegCloser will select the alignment more compatible with the prior positions (solid line), rather than the highest-scoring one (dotted line).