Joining Gaps into Unmatched Regions and Extracting Long Ones from a Sequence Alignment (Step 3 of the Preprocessing Phase)
Gaps ℓ1 and ℓ3 in org1 are joined if the (intragapped) hit ℓ2 is short enough. Assume that ℓ2 and other intra-gapped regions are short enough so that the proximal gaps in org1 are joined to form the unmatched region ℓ. Assume that gaps in org2 are joined similarly to form the unmatched region k, and that the unmatched regions ℓ and k are long enough. If the regions ℓ and k intersect (as in this example), they are joined and the resulting segments in both organisms are extracted to be handled in the next step.