From 5498565157f3f8ca616713688aba3f4787143323 Mon Sep 17 00:00:00 2001 From: Shane McCarthy Date: Wed, 11 Oct 2017 08:46:24 +0100 Subject: [PATCH] fix sam output for some unmapped queries --- format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/format.c b/format.c index d72e2d1..c3d2b7e 100644 --- a/format.c +++ b/format.c @@ -301,7 +301,7 @@ void mm_write_sam2(kstring_t *s, const mm_idx_t *mi, const mm_bseq1_t *t, int se if (r_prev) { this_rid = r_prev->rid, this_pos = r_prev->rs; 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 mm_sprintf_lite(s, "\t*\t0\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);