From: Heng Li <lh3@live.co.uk>
Date: Wed, 29 Jul 2009 08:18:55 +0000 (+0000)
Subject: do not set "read 1" if reads are not mapped in the PE mode of maq
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d89ec29105e36257fe27067d350ebbe879378c8d;p=samtools.git

do not set "read 1" if reads are not mapped in the PE mode of maq
---

diff --git a/misc/maq2sam.c b/misc/maq2sam.c
index 758a698..53a3ef3 100644
--- a/misc/maq2sam.c
+++ b/misc/maq2sam.c
@@ -113,7 +113,7 @@ void maq2tam_core(gzFile fp, const char *rg)
 			}
 			flag |= c;
 		}
-		if (flag) {
+		if (m1->flag) {
 			int l = strlen(m1->name);
 			if (m1->name[l-2] == '/') {
 				flag |= (m1->name[l-1] == '1')? 0x40 : 0x80;