]> git.donarmstrong.com Git - samtools.git/blobdiff - cut_target.c
Merge branch 'vsbuffalo-master' into develop
[samtools.git] / cut_target.c
index ee687fb7f9e041c1cd9ce90bbbdd10020a9cba6c..26f434fa8d8bf340fc0adbf13cfcb3be36019115 100644 (file)
@@ -46,6 +46,8 @@ static uint16_t gencns(ct_t *g, int n, const bam_pileup1_t *plp)
                b = bam_nt16_nt4_table[bam1_seqi(seq, p->qpos)];
                if (b > 3) continue;
                q = baseQ < p->b->core.qual? baseQ : p->b->core.qual;
+               if (q < 4) q = 4;
+               if (q > 63) q = 63;
                g->bases[k++] = q<<5 | bam1_strand(p->b)<<4 | b;
        }
        if (k == 0) return 0;