]> git.donarmstrong.com Git - samtools.git/commitdiff
* samtools-0.1.9-13 (r819)
authorHeng Li <lh3@live.co.uk>
Sat, 13 Nov 2010 02:36:27 +0000 (02:36 +0000)
committerHeng Li <lh3@live.co.uk>
Sat, 13 Nov 2010 02:36:27 +0000 (02:36 +0000)
 * fixed a bug in pileup given refskip

bam_maqcns.c
bamtk.c

index 2f3fc082be79aa0fa3feae9c1d9a03ad44592877..4fbc6c6d0cd14f54ac7d75f07f789cbdb73e4362 100644 (file)
@@ -154,7 +154,7 @@ glf1_t *bam_maqcns_glfgen(int _n, const bam_pileup1_t *pl, uint8_t ref_base, bam
                const bam_pileup1_t *p = pl + i;
                uint32_t q, x = 0, qq;
                uint16_t y = 0;
-               if (p->is_del || (p->b->core.flag&BAM_FUNMAP)) continue;
+               if (p->is_del || p->is_refskip || (p->b->core.flag&BAM_FUNMAP)) continue;
                q = (uint32_t)bam1_qual(p->b)[p->qpos];
                if (q < bm->min_baseQ) continue;
                x |= (uint32_t)bam1_strand(p->b) << 18 | q << 8 | p->b->core.qual;
@@ -166,7 +166,7 @@ glf1_t *bam_maqcns_glfgen(int _n, const bam_pileup1_t *pl, uint8_t ref_base, bam
                y |= q << 5;
                qq = bam1_seqi(bam1_seq(p->b), p->qpos);
                q = bam_nt16_nt4_table[qq? qq : ref_base];
-               if (!p->is_del && q < 4) x |= 1 << 21 | q << 16, y |= q;
+               if (!p->is_del && !p->is_refskip && q < 4) x |= 1 << 21 | q << 16, y |= q;
                bm->aux->info16[n] = y;
                bm->aux->info[n++] = x;
        }
diff --git a/bamtk.c b/bamtk.c
index 428e9ed94e491199205e231e74d290f9e941ec3e..1bbc4c0a917acdd7ab29d5743c34efa2369f8405 100644 (file)
--- a/bamtk.c
+++ b/bamtk.c
@@ -9,7 +9,7 @@
 #endif
 
 #ifndef PACKAGE_VERSION
-#define PACKAGE_VERSION "0.1.9-12 (r818)"
+#define PACKAGE_VERSION "0.1.9-13 (r819)"
 #endif
 
 int bam_taf2baf(int argc, char *argv[]);