From 647b0e828a1297c2559c25c12cb948ca0a2481bb Mon Sep 17 00:00:00 2001 From: Heng Li Date: Tue, 14 Oct 2014 16:57:57 -0400 Subject: [PATCH] wrong flag in the SAM output --- bwa-postalt.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bwa-postalt.js b/bwa-postalt.js index d4d959e..411cfdd 100644 --- a/bwa-postalt.js +++ b/bwa-postalt.js @@ -541,10 +541,10 @@ function bwa_postalt(args) // print sequence/quality and set the rev flag if (hits[i].rev == hits[reported_i].rev) { s.push(t[9], t[10]); - s[1] = (flag & 0x10) | 0x800; + s[1] = flag | 0x800; } else { s.push(rs, rq); - s[1] = ((flag & 0x10) ^ 0x10) | 0x800; + s[1] = (flag ^ 0x10) | 0x800; } s.push("NM:i:" + hits[i].NM); if (hits[i].lifted_str) s.push("lt:Z:" + hits[i].lifted_str);