r472: fixed a bug when printing MAPQ/CIGAR

This commit is contained in:
Heng Li 2017-10-05 12:46:11 -04:00
parent abf2a90363
commit 1a90bc8603
2 changed files with 3 additions and 3 deletions

View File

@ -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_prev) {
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);
} else mm_sprintf_lite(s, "\t0\t*");
mm_sprintf_lite(s, "\t%s\t%d\t0\t*", mi->seq[this_rid].name, this_pos);
} else mm_sprintf_lite(s, "\t0\t*\t0\t*");
} else {
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);

2
main.c
View File

@ -6,7 +6,7 @@
#include "mmpriv.h"
#include "getopt.h"
#define MM_VERSION "2.2-r471-dirty"
#define MM_VERSION "2.2-r472-dirty"
#ifdef __linux__
#include <sys/resource.h>