eval script works with /[12] in SAM

This commit is contained in:
Heng Li 2017-09-27 23:33:59 -04:00
parent 8301222174
commit a13691d00d
1 changed files with 3 additions and 1 deletions

View File

@ -142,7 +142,9 @@ while (file.readline(buf) >= 0) {
} else { // SAM
var flag = parseInt(t[1]);
var read_no = flag>>6&0x3;
var qname = read_no == 1 || read_no == 2? t[0] + '/' + read_no : t[0];
var qname = t[0];
if (!/\/[12]$/.test(qname))
qname = read_no == 1 || read_no == 2? t[0] + '/' + read_no : t[0];
if (last != qname) {
if (last != null) count_err(last, a, tot, err, mode);
a = [], last = qname;