for (l = qbeg; l < qend; ++l)
query[l - qbeg] = bam_nt16_nt4_table[bam1_seqi(seq, l)];
// do alignment; this is the bottleneck
- if (0) {
+ if (1) {
const uint8_t *qual = bam1_qual(p->b), *bq;
uint8_t *qq = 0;
qq = calloc(qend - qbeg, 1);
for (l = qbeg; l < qend; ++l) {
qq[l - qbeg] = bq? qual[l] + (bq[l] - 33) : qual[l];
if (qq[l - qbeg] > 30) qq[l - qbeg] = 30;
+ if (qq[l - qbeg] < 7) qq[l - qbeg] = 7;
}
sc = kpa_glocal((uint8_t*)ref2 + tbeg - left, tend - tbeg + abs(types[t]),
(uint8_t*)query, qend - qbeg, qq, &apf, 0, 0);
score[K*n_types + t] = sc;
free(qq);
- } else {
+ } else { // the following block is for testing only
sc = ka_global_score((uint8_t*)ref2 + tbeg - left, tend - tbeg + abs(types[t]),
(uint8_t*)query, qend - qbeg, &apv);
score[K*n_types + t] = -sc;
#endif
#ifndef PACKAGE_VERSION
-#define PACKAGE_VERSION "0.1.9-9 (r810)"
+#define PACKAGE_VERSION "0.1.9-10 (r816)"
#endif
int bam_taf2baf(int argc, char *argv[]);