From b0b199f5039e8da5e8d1a9a7ae130580fd33fe1f Mon Sep 17 00:00:00 2001 From: Heng Li Date: Fri, 21 Oct 2022 21:00:22 -0400 Subject: [PATCH] r1150: the prev impl counted one less submer --- main.c | 2 +- sketch.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index af5ffa5..ea95664 100644 --- a/main.c +++ b/main.c @@ -7,7 +7,7 @@ #include "mmpriv.h" #include "ketopt.h" -#define MM_VERSION "2.24-r1149-dirty" +#define MM_VERSION "2.24-r1150-dirty" #ifdef __linux__ #include diff --git a/sketch.c b/sketch.c index 42ab4f7..1f6b7da 100644 --- a/sketch.c +++ b/sketch.c @@ -176,7 +176,7 @@ void mm_sketch_syncmer(void *km, const char *str, int len, int smer, int k, uint if (l >= k && kmer_span < 256) { uint64_t x, min = UINT64_MAX; x = hash64(kmer[z], mask); - for (j = 0; j < k - smer; ++j) { + for (j = 0; j <= k - smer; ++j) { uint64_t y = x >> (j + j) & smask; min = min < y? min : y; }