]> git.donarmstrong.com Git - samtools.git/commitdiff
* samtools-0.1.3-24 (r296)
authorHeng Li <lh3@live.co.uk>
Thu, 21 May 2009 11:53:14 +0000 (11:53 +0000)
committerHeng Li <lh3@live.co.uk>
Thu, 21 May 2009 11:53:14 +0000 (11:53 +0000)
 * another similar bug in the indel caller

bam_maqcns.c
bamtk.c

index 230f891c9020c2b744d32f33050993baae2908be..c6c9af7dee454ed91cd75363470473405d7c97ea 100644 (file)
@@ -408,7 +408,7 @@ bam_maqindel_ret_t *bam_maqindel(int n, int pos, const bam_maqindel_opt_t *mi, c
                                if (types[i] != 0) { // then try the other way to calculate the score
                                        for (ps = s = 0, l = seg.qbeg; c->pos + l + types[i] < right && l < seg.qend; ++l) {
                                                int cq = bam1_seqi(bam1_seq(p->b), l), ct;
-                                               ct = c->pos + l + types[i] >= left? ref2[c->pos + l + types[i] - left] : 15;
+                                               ct = c->pos + l - seg.qbeg + types[i] >= left? ref2[c->pos + l - seg.qbeg + types[i] - left] : 15;
                                                if (cq < 15 && ct < 15) {
                                                        s += cq == ct? 1 : -mi->mm_penalty;
                                                        if (cq != ct) ps += bam1_qual(p->b)[l];
diff --git a/bamtk.c b/bamtk.c
index 5280c1f71b707c988a8ca755968ef23fbd8f4734..b38b0d49559073f9e607bb7469dc9399f2d800b6 100644 (file)
--- a/bamtk.c
+++ b/bamtk.c
@@ -3,7 +3,7 @@
 #include "bam.h"
 
 #ifndef PACKAGE_VERSION
-#define PACKAGE_VERSION "0.1.3-23 (r295)"
+#define PACKAGE_VERSION "0.1.3-24 (r296)"
 #endif
 
 int bam_taf2baf(int argc, char *argv[]);