Match to 'N' costs -1, instead of 0.

This is to prevent alignment through 'N'.
This commit is contained in:
Heng Li 2013-03-09 18:03:57 -05:00
parent 9ea7f83974
commit 740d2c1314
1 changed files with 2 additions and 2 deletions

4
bwa.c
View File

@ -75,9 +75,9 @@ void bwa_fill_scmat(int a, int b, int8_t mat[25])
for (i = k = 0; i < 4; ++i) { for (i = k = 0; i < 4; ++i) {
for (j = 0; j < 4; ++j) for (j = 0; j < 4; ++j)
mat[k++] = i == j? a : -b; mat[k++] = i == j? a : -b;
mat[k++] = 0; // ambiguous base mat[k++] = -1; // ambiguous base
} }
for (j = 0; j < 5; ++j) mat[k++] = 0; for (j = 0; j < 5; ++j) mat[k++] = -1;
} }
// Generate CIGAR when the alignment end points are known // Generate CIGAR when the alignment end points are known