keep RG
This commit is contained in:
parent
dbe74ca9b8
commit
5c87869d91
|
|
@ -577,6 +577,7 @@ function bwa_postalt(args)
|
||||||
|
|
||||||
// stage the hits generated from the XA tag
|
// stage the hits generated from the XA tag
|
||||||
var cnt = 0;
|
var cnt = 0;
|
||||||
|
var rg = (m = /\t(RG:Z:\S+)/.exec(line)) != null? m[1] : null;
|
||||||
for (var i = 0; i < hits.length; ++i) {
|
for (var i = 0; i < hits.length; ++i) {
|
||||||
if (opt.verbose >= 5) print(obj2str(hits[i]));
|
if (opt.verbose >= 5) print(obj2str(hits[i]));
|
||||||
if (hits[i].g != reported_g || i == reported_i) continue;
|
if (hits[i].g != reported_g || i == reported_i) continue;
|
||||||
|
|
@ -592,6 +593,7 @@ function bwa_postalt(args)
|
||||||
}
|
}
|
||||||
s.push("NM:i:" + hits[i].NM);
|
s.push("NM:i:" + hits[i].NM);
|
||||||
if (hits[i].lifted_str) s.push("lt:Z:" + hits[i].lifted_str);
|
if (hits[i].lifted_str) s.push("lt:Z:" + hits[i].lifted_str);
|
||||||
|
if (rg != null) s.push(rg);
|
||||||
buf2.push(s);
|
buf2.push(s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue