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.