X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=cut_target.c;h=26f434fa8d8bf340fc0adbf13cfcb3be36019115;hb=0ccd9d36ebf35ce620a8248ecf4336c84065e6c0;hp=ee687fb7f9e041c1cd9ce90bbbdd10020a9cba6c;hpb=7251efa37992752a8cf62ff363da0ad5099937bd;p=samtools.git diff --git a/cut_target.c b/cut_target.c index ee687fb..26f434f 100644 --- a/cut_target.c +++ b/cut_target.c @@ -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;