]> git.donarmstrong.com Git - samtools.git/commitdiff
* samtools-0.1.9-15 (r821)
authorHeng Li <lh3@live.co.uk>
Sat, 13 Nov 2010 06:18:31 +0000 (06:18 +0000)
committerHeng Li <lh3@live.co.uk>
Sat, 13 Nov 2010 06:18:31 +0000 (06:18 +0000)
 * calmd: write BQ
 * skip realignment if BQ is present

bam_md.c
bamtk.c

index a8ddd1baf8aa78d6911ca7a804a549a1d27eb06b..47ec97c124b3fae015bb126b3d99c936308daa00 100644 (file)
--- 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 f0175763764b6c3cdca2ce462e367c60fdaaf305..23711e3aec8408a4e37276921dce85b366d299cb 100644 (file)
--- 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[]);