https://github.com/algbio/tsalign/pull/165#discussion_r3199779776 The cost is computed for offset 0, but the offsets produced are actually -1 and 1.
#165 (comment)
The cost is computed for offset 0, but the offsets produced are actually -1 and 1.