]> git.donarmstrong.com Git - samtools.git/blobdiff - bam_tview.c
Release samtools-0.1.5
[samtools.git] / bam_tview.c
index c26273c7152f4e678911eccddca9b4c5701c63cf..be2579ca0ee28f59792e863bd102b2f7937566d0 100644 (file)
@@ -8,6 +8,10 @@
 #include "faidx.h"
 #include "bam_maqcns.h"
 
+char bam_aux_getCEi(bam1_t *b, int i);
+char bam_aux_getCSi(bam1_t *b, int i);
+char bam_aux_getCQi(bam1_t *b, int i);
+
 #define TV_MIN_ALNROW 2
 #define TV_MAX_GOTO  40
 #define TV_LOW_MAPQ  10
@@ -157,7 +161,9 @@ tview_t *tv_init(const char *fn, const char *fn_fa)
        tview_t *tv = (tview_t*)calloc(1, sizeof(tview_t));
        tv->is_dot = 1;
        tv->idx = bam_index_load(fn);
+       if (tv->idx == 0) exit(1);
        tv->fp = bam_open(fn, "r");
+       bgzf_set_cache_size(tv->fp, 8 * 1024 *1024);
        assert(tv->fp);
        tv->header = bam_header_read(tv->fp);
        tv->lplbuf = bam_lplbuf_init(tv_pl_func, tv);