From dea3b609185199ef19551767b4b93fde3b00162c Mon Sep 17 00:00:00 2001 From: Heng Li Date: Thu, 12 Oct 2017 17:31:13 -0400 Subject: [PATCH] r510: fixed an off-by-1 bug for unmapped mate --- format.c | 2 +- main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/format.c b/format.c index c3d2b7e..061103b 100644 --- a/format.c +++ b/format.c @@ -300,7 +300,7 @@ void mm_write_sam2(kstring_t *s, const mm_idx_t *mi, const mm_bseq1_t *t, int se if (r == 0) { if (r_prev) { this_rid = r_prev->rid, this_pos = r_prev->rs; - mm_sprintf_lite(s, "\t%s\t%d\t0\t*", mi->seq[this_rid].name, this_pos); + mm_sprintf_lite(s, "\t%s\t%d\t0\t*", mi->seq[this_rid].name, this_pos+1); } else mm_sprintf_lite(s, "\t*\t0\t0\t*"); } else { this_rid = r->rid, this_pos = r->rs, this_rev = r->rev; diff --git a/main.c b/main.c index 3ffe6e8..d1619b7 100644 --- a/main.c +++ b/main.c @@ -6,7 +6,7 @@ #include "mmpriv.h" #include "getopt.h" -#define MM_VERSION "2.2-r508-dirty" +#define MM_VERSION "2.2-r510-dirty" #ifdef __linux__ #include