]> git.donarmstrong.com Git - samtools.git/commitdiff
* samtools-0.1.3-9 (r256)
authorHeng Li <lh3@live.co.uk>
Mon, 4 May 2009 18:16:50 +0000 (18:16 +0000)
committerHeng Li <lh3@live.co.uk>
Mon, 4 May 2009 18:16:50 +0000 (18:16 +0000)
 * fixed a bug in bam_lpileup.c
 * I do not know if this also fixes the bug causing assertion failure in the tview

bam_lpileup.c
bamtk.c

index 21b477211e38ea8d0fbac8334150c84b52fcff4b..1562170e9159e8b53f2d65d7c87e4a59e8acecac 100644 (file)
@@ -102,7 +102,7 @@ static int tview_func(uint32_t tid, uint32_t pos, int n, const bam_pileup1_t *pl
                        } else tv->cur_level[i] = ++tv->max_level;
                } else {
                        tv->cur_level[i] = tv->pre_level[l++];
-                       if (p->qpos == p->b->core.l_qseq - 1) { // then return a free slot
+                       if (p->is_tail) { // then return a free slot
                                tv->tail->level = tv->cur_level[i];
                                tv->tail->next = mp_alloc(tv->mp);
                                tv->tail = tv->tail->next;
@@ -150,6 +150,16 @@ static int tview_func(uint32_t tid, uint32_t pos, int n, const bam_pileup1_t *pl
                        tv->pre_level[l++] = tv->pre_level[i];
        }
        tv->n_pre = l;
+/*
+       fprintf(stderr, "%d\t", pos+1);
+       for (i = 0; i < n; ++i) {
+               const bam_pileup1_t *p = pl + i;
+               if (p->is_head) fprintf(stderr, "^");
+               if (p->is_tail) fprintf(stderr, "$");
+               fprintf(stderr, "%d,", p->level);
+       }
+       fprintf(stderr, "\n");
+*/
        return 0;
 }
 
diff --git a/bamtk.c b/bamtk.c
index b0a21dd87f9f062f716a2994d6bec6e496682203..ff82825c29abc4f578561a1e0032a60f23e00f65 100644 (file)
--- a/bamtk.c
+++ b/bamtk.c
@@ -3,7 +3,7 @@
 #include "bam.h"
 
 #ifndef PACKAGE_VERSION
-#define PACKAGE_VERSION "0.1.3-8 (r251)"
+#define PACKAGE_VERSION "0.1.3-9 (r256)"
 #endif
 
 int bam_taf2baf(int argc, char *argv[]);