mirror of
https://github.com/lh3/minimap2.git
synced 2026-09-23 03:28:11 +08:00
r513: merged pre- and post-cigar blen and mlen
This saves a bit memory and is cleaner.
This commit is contained in:
@@ -198,7 +198,7 @@ static inline void write_tags(kstring_t *s, const mm_reg1_t *r)
|
||||
int type = r->inv? 'I' : r->id == r->parent? 'P' : 'S';
|
||||
if (r->iden_flt) mm_sprintf_lite(s, "\tom:i:%d", r->mapq);
|
||||
if (r->p) {
|
||||
mm_sprintf_lite(s, "\tNM:i:%d\tms:i:%d\tAS:i:%d\tnn:i:%d", r->p->n_diff, r->p->dp_max, r->p->dp_score, r->p->n_ambi);
|
||||
mm_sprintf_lite(s, "\tNM:i:%d\tms:i:%d\tAS:i:%d\tnn:i:%d", r->blen - r->mlen + r->p->n_ambi, r->p->dp_max, r->p->dp_score, r->p->n_ambi);
|
||||
if (r->p->trans_strand == 1 || r->p->trans_strand == 2)
|
||||
mm_sprintf_lite(s, "\tts:A:%c", "?+-?"[r->p->trans_strand]);
|
||||
}
|
||||
@@ -214,8 +214,7 @@ void mm_write_paf(kstring_t *s, const mm_idx_t *mi, const mm_bseq1_t *t, const m
|
||||
if (mi->seq[r->rid].name) mm_sprintf_lite(s, "%s", mi->seq[r->rid].name);
|
||||
else mm_sprintf_lite(s, "%d", r->rid);
|
||||
mm_sprintf_lite(s, "\t%d\t%d\t%d", mi->seq[r->rid].len, r->rs, r->re);
|
||||
if (r->p) mm_sprintf_lite(s, "\t%d\t%d", r->p->blen - r->p->n_ambi - r->p->n_diff, r->p->blen);
|
||||
else mm_sprintf_lite(s, "\t%d\t%d", r->fuzzy_mlen, r->fuzzy_blen);
|
||||
mm_sprintf_lite(s, "\t%d\t%d", r->mlen, r->blen);
|
||||
mm_sprintf_lite(s, "\t%d", r->mapq);
|
||||
write_tags(s, r);
|
||||
if (r->p && (opt_flag & MM_F_OUT_CG)) {
|
||||
@@ -389,7 +388,7 @@ void mm_write_sam2(kstring_t *s, const mm_idx_t *mi, const mm_bseq1_t *t, int se
|
||||
if (l_I) mm_sprintf_lite(s, "%dI", l_I);
|
||||
if (l_D) mm_sprintf_lite(s, "%dD", l_D);
|
||||
if (clip3) mm_sprintf_lite(s, "%dS", clip3);
|
||||
mm_sprintf_lite(s, ",%d,%d;", q->mapq, q->p->n_diff);
|
||||
mm_sprintf_lite(s, ",%d,%d;", q->mapq, q->blen - q->mlen + q->p->n_ambi);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user