smarco / WFA2-lib

WFA-lib: Wavefront alignment algorithm library v2
Other
162 stars 36 forks source link

Score is `-INF` when aligning two empty sequences #23

Closed RagnarGrootKoerkamp closed 2 years ago

RagnarGrootKoerkamp commented 2 years ago

When using BiWFA/ultralow memory mode and indel costs, aligning two empty sequences seems to return -2147483648 as the cost. This only happens when calling the library directly (via rust), and not when running align_benchmark as

align_benchmark -a indel-wfa --input input  -o output --wfa-memory-mode ultralow

where input simply contains

>
<

I.e., this could very well be a bug on my side in the rust-c interface.

smarco commented 2 years ago

Hi, Ragnar.

First, thanks for all your bug reports. I deeply appreciate your effort and contribution to the project. This helps me a lot!

WRT this problem. Can you double-check with the current development branch? I have made some tests, and the current HEAD is returning 0. But, an older version/commit might perfectly behave as you indicate.

Let me know. Thanks,

RagnarGrootKoerkamp commented 2 years ago

This turned out to be because we forgot to set the alignment scope to only compute the score, which is initialized to some (negative) infinity when by default the path is returned.