]> git.donarmstrong.com Git - samtools.git/blobdiff - bam_plcmd.c
* samtools-0.1.7-6
[samtools.git] / bam_plcmd.c
index cbb55cc3a5a7d1643b729c63bd1c36ad206e6387..ccc5eb95a8c397b76729f0d2ff3ce3ea4da77fdc 100644 (file)
@@ -174,7 +174,7 @@ static int pileup_func(uint32_t tid, uint32_t pos, int n, const bam_pileup1_t *p
        // update d->ref if necessary
        if (d->fai && (int)tid != d->tid) {
                free(d->ref);
-               d->ref = fai_fetch(d->fai, d->h->target_name[tid], &d->len);
+               d->ref = faidx_fetch_seq(d->fai, d->h->target_name[tid], 0, 0x7fffffff, &d->len);
                d->tid = tid;
        }
        rb = (d->ref && (int)pos < d->len)? d->ref[pos] : 'N';