fixed a minor issue in trimming

This commit is contained in:
Heng Li 2011-11-24 10:39:41 -05:00
parent eeedda105d
commit 717959e819
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ int bwa_trim_read(int trim_qual, bwa_seq_t *p)
{
int s = 0, l, max = 0, max_l = p->len;
if (trim_qual < 1 || p->qual == 0) return 0;
for (l = p->len - 1; l >= BWA_MIN_RDLEN - 1; --l) {
for (l = p->len - 1; l >= BWA_MIN_RDLEN; --l) {
s += trim_qual - (p->qual[l] - 33);
if (s < 0) break;
if (s > max) max = s, max_l = l;