exact gap-affine algorithm (shared library)
The wavefront alignment (WFA) algorithm is an exact gap-affine algorithm
that takes advantage of homologous regions between the sequences to
accelerate the alignment process. Unlike to traditional dynamic
programming algorithms that run in quadratic time, the WFA runs in time
O(ns+s^2), proportional to the sequence length n and the alignment score
s, using O(s^2) memory (or O(s) using the ultralow/BiWFA mode).
Moreover, the WFA algorithm exhibits simple computational patterns that
the modern compilers can automatically vectorize for different
architectures without adapting the code. To intuitively illustrate why
the WFA algorithm is so interesting, look at the following figure. The
left panel shows the cells computed by a classical dynamic programming
based algorithm (like Smith-Waterman or Needleman Wunsch). In contrast,
the right panel shows the cells computed by the WFA algorithm to obtain
the same result (i.e., the optimal alignment).