]> git.donarmstrong.com Git - samtools.git/commitdiff
* samtools-0.1.9-10 (r816)
authorHeng Li <lh3@live.co.uk>
Thu, 11 Nov 2010 06:22:59 +0000 (06:22 +0000)
committerHeng Li <lh3@live.co.uk>
Thu, 11 Nov 2010 06:22:59 +0000 (06:22 +0000)
 * 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...

bam2bcf_indel.c
bamtk.c

index 2e0b04dfee68f01032665345ac7961ea7ba1a059..7713b51bdb8b174510c309262f29bac6c83ce976 100644 (file)
@@ -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 922dee3d4d9d619008a80d404cc2779766864cb6..09d64adcfff113856a3fe8a23bde71aa66adc798 100644 (file)
--- 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[]);