From 740d2c131494fcc57a8084c2f6e5f51ad846d284 Mon Sep 17 00:00:00 2001 From: Heng Li Date: Sat, 9 Mar 2013 18:03:57 -0500 Subject: [PATCH] Match to 'N' costs -1, instead of 0. This is to prevent alignment through 'N'. --- bwa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bwa.c b/bwa.c index 991b23a..08d96b8 100644 --- a/bwa.c +++ b/bwa.c @@ -75,9 +75,9 @@ void bwa_fill_scmat(int a, int b, int8_t mat[25]) for (i = k = 0; i < 4; ++i) { for (j = 0; j < 4; ++j) 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