From 21981f77249600eaf1ba655a8dd6fdbb61e90e2e Mon Sep 17 00:00:00 2001 From: Heng Li Date: Sat, 13 Nov 2010 06:18:31 +0000 Subject: [PATCH] * samtools-0.1.9-15 (r821) * calmd: write BQ * skip realignment if BQ is present --- bam_md.c | 5 +++-- bamtk.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bam_md.c b/bam_md.c index a8ddd1b..47ec97c 100644 --- a/bam_md.c +++ b/bam_md.c @@ -168,8 +168,9 @@ int bam_prob_realn_core(bam1_t *b, const char *ref, int write_bq) uint32_t *cigar = bam1_cigar(b); bam1_core_t *c = &b->core; kpa_par_t conf = kpa_par_def; - // find the start and end of the alignment if (c->flag & BAM_FUNMAP) return -1; + if (bam_aux_get(b, "BQ")) return -2; + // find the start and end of the alignment x = c->pos, y = 0, yb = ye = xb = xe = -1; for (k = 0; k < c->n_cigar; ++k) { int op, l; @@ -290,7 +291,7 @@ int bam_fillmd(int argc, char *argv[]) fprintf(stderr, "[bam_fillmd] fail to find sequence '%s' in the reference.\n", fp->header->target_name[tid]); } - if (is_realn) bam_prob_realn_core(b, ref, 0); + if (is_realn) bam_prob_realn_core(b, ref, 1); if (capQ > 10) { int q = bam_cap_mapQ(b, ref, capQ); if (b->core.qual > q) b->core.qual = q; diff --git a/bamtk.c b/bamtk.c index f017576..23711e3 100644 --- a/bamtk.c +++ b/bamtk.c @@ -9,7 +9,7 @@ #endif #ifndef PACKAGE_VERSION -#define PACKAGE_VERSION "0.1.9-14 (r820)" +#define PACKAGE_VERSION "0.1.9-15 (r821)" #endif int bam_taf2baf(int argc, char *argv[]); -- 2.39.2