r472: fixed a bug when printing MAPQ/CIGAR
This commit is contained in:
parent
abf2a90363
commit
1a90bc8603
4
format.c
4
format.c
|
|
@ -299,8 +299,8 @@ void mm_write_sam2(kstring_t *s, const mm_idx_t *mi, const mm_bseq1_t *t, int se
|
||||||
if (r == 0) {
|
if (r == 0) {
|
||||||
if (r_prev) {
|
if (r_prev) {
|
||||||
this_rid = r_prev->rid, this_pos = r_prev->rs;
|
this_rid = r_prev->rid, this_pos = r_prev->rs;
|
||||||
mm_sprintf_lite(s, "\t%s\t%d", mi->seq[this_rid].name, this_pos);
|
mm_sprintf_lite(s, "\t%s\t%d\t0\t*", mi->seq[this_rid].name, this_pos);
|
||||||
} else mm_sprintf_lite(s, "\t0\t*");
|
} else mm_sprintf_lite(s, "\t0\t*\t0\t*");
|
||||||
} else {
|
} else {
|
||||||
this_rid = r->rid, this_pos = r->rs, this_rev = r->rev;
|
this_rid = r->rid, this_pos = r->rs, this_rev = r->rev;
|
||||||
mm_sprintf_lite(s, "\t%s\t%d\t%d\t", mi->seq[r->rid].name, r->rs+1, r->mapq);
|
mm_sprintf_lite(s, "\t%s\t%d\t%d\t", mi->seq[r->rid].name, r->rs+1, r->mapq);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue