]> git.donarmstrong.com Git - samtools.git/blobdiff - bam_lpileup.c
works
[samtools.git] / bam_lpileup.c
index 1562170e9159e8b53f2d65d7c87e4a59e8acecac..d4dd63b99b85dd4c5811758153a56757c908a52c 100644 (file)
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <assert.h>
 #include "bam.h"
 #include "ksort.h"
 
@@ -195,19 +196,3 @@ int bam_lplbuf_push(const bam1_t *b, bam_lplbuf_t *tv)
 {
        return bam_plbuf_push(b, tv->plbuf);
 }
-
-int bam_lpileup_file(bamFile fp, int mask, bam_pileup_f func, void *func_data)
-{
-       bam_lplbuf_t *buf;
-       int ret;
-       bam1_t *b;
-       b = (bam1_t*)calloc(1, sizeof(bam1_t));
-       buf = bam_lplbuf_init(func, func_data);
-       bam_plbuf_set_mask(buf->plbuf, mask);
-       while ((ret = bam_read1(fp, b)) >= 0)
-               bam_lplbuf_push(b, buf);
-       bam_lplbuf_push(0, buf);
-       bam_lplbuf_destroy(buf);
-       free(b->data); free(b);
-       return 0;
-}