Local realigment

Regions where the readmapping is likely to be improved through local realignment are identified and realigned. These are generally regions where reads do not align perfectly, and the imperfect read alignments are unlikely to be caused by sequencing errors. This is for example the case where long unaligned ends (potentially representing long insertions and deletions) are present in the readmapping relative to the reference.

During local realignment, the following steps are performed for each identified region:

  1. A path graph of k-mers is built. The graph contains paths corresponding to all reads as well as the reference.
  2. The graph undergoes refinement where paths that are unlikely to contain a deletion or an insertion relative to the reference path are removed, and additional deletions or insertion may be added.
  3. Any read that intersects the region of interest is realigned against the alignment graph.