ksahlin / strobealign

Aligns short reads using dynamic seed size with strobemers
MIT License
128 stars 16 forks source link

Fix off-by-one error in statistics #311

Closed marcelm closed 1 year ago

marcelm commented 1 year ago

On the first loop iteration, count is 0, so we would end up in the ++tot_mid_ab case.

Before:

Index statistics
  Total strobemers:              1022
  Distinct strobemers:           1022 (100.00%)
    1 occurrence:                1022 (100.00%)
    2..100 occurrences:             1 (  0.10%)
    >100 occurrences:               0 (  0.00%)

After:

Index statistics
  Total strobemers:              1022
  Distinct strobemers:           1022 (100.00%)
    1 occurrence:                1022 (100.00%)
    2..100 occurrences:             0 (  0.00%)
    >100 occurrences:               0 (  0.00%)