Thus, rather than trying to overlap reads exactly, we will instead do so approximately.
The key to do this is to move toward methods that incorporate alignments. Yet neither
global nor local alignment is appropriate for this task.
Global alignment will attempt to align the entire reads, when we know that only the overlapping
parts of the reads are relevant. For that matter, we may identify an optimal local alignment
that does not correspond to an overlap.
As a result, we need a specific type of local alignment that aligns only the overlapping
parts of two strings.
Problem
An overlap alignment between two strings s and t is a local alignment
of a suffix of s with a prefix of t. An optimal overlap alignment will therefore
maximize an alignment score over all such substrings of s and t.
Return: The score of an optimal overlap alignment of s and t, followed by an alignment
of a suffix s′ of s and a prefix t′ of t achieving this optimal score.
Use an alignment score in which matching symbols count +1, substitutions count -2, and
there is a linear gap penalty of 2. If multiple optimal alignments exist, then you may return any one.