smarco / WFA2-lib

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

ends-free match score not used #19

Closed wongs2 closed 2 years ago

wongs2 commented 2 years ago

I have problem understanding the "ends-free" span mode. The match penalty (value <= 0) has no impact on the alignment and it is not counted towards the returned score.

Here is an example: changing the match score has no impact. mismatch = 4, gap open = 6, gap extension = 2 pattern_begin_free=len(pattern)-1, pattern_end_free=0, text_begin_free=0, text_end_free=len(text)-1

9D1X8I      ALIGNMENT
9D1X8I      ALIGNMENT.COMPACT
      PATTERN    CCCCCCCCCC--------

      TEXT       ---------TCTTTTTTT
smarco commented 2 years ago

Hi,

The match penalty (value <= 0) has no impact on the alignment and it is not counted towards the returned score.

Not yet. In the current implementation, the match-score has to be zero (or is forced to be zero). I have to implement @jeizenga's brilliant penalties formula to allow for any match-score value. On my TODO.

I hope this helps.

smarco commented 2 years ago

Now, the current master branch has this feature implemented.