From: Heng Li Date: Thu, 11 Nov 2010 06:22:59 +0000 (+0000) Subject: * samtools-0.1.9-10 (r816) X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b79e085714e6c1dfdcbc3c15fd70ffb2b6c9c70f;p=samtools.git * samtools-0.1.9-10 (r816) * I know why the forward method fails. it is because of zero base qualities. when that is fixed, the forward method seems to give better results than Viterbi, as it should be. I am tired... --- diff --git a/bam2bcf_indel.c b/bam2bcf_indel.c index 2e0b04d..7713b51 100644 --- a/bam2bcf_indel.c +++ b/bam2bcf_indel.c @@ -277,7 +277,7 @@ int bcf_call_gap_prep(int n, int *n_plp, bam_pileup1_t **plp, int pos, bcf_calla 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); @@ -286,12 +286,13 @@ int bcf_call_gap_prep(int n, int *n_plp, bam_pileup1_t **plp, int pos, bcf_calla 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; diff --git a/bamtk.c b/bamtk.c index 922dee3..09d64ad 100644 --- a/bamtk.c +++ b/bamtk.c @@ -9,7 +9,7 @@ #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[]);