X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=samtools.git;a=blobdiff_plain;f=bcftools%2Fbcf.h;h=f87ac1e6fa3021964753f051a944fdc95a59549d;hp=36578956bbae06d4c216c121a2ddb3a94cad94d8;hb=e3b3a0177339fb8c099346986e965e3bd5b85999;hpb=8d2494d1fb7cd0fa7c63be5ffba8dd1a11457522 diff --git a/bcftools/bcf.h b/bcftools/bcf.h index 3657895..f87ac1e 100644 --- a/bcftools/bcf.h +++ b/bcftools/bcf.h @@ -30,7 +30,19 @@ #include #include + +#ifndef BCF_LITE #include "bgzf.h" +typedef BGZF *bcfFile; +#else +typedef gzFile bcfFile; +#define bgzf_open(fn, mode) gzopen(fn, mode) +#define bgzf_fdopen(fd, mode) gzdopen(fd, mode) +#define bgzf_close(fp) gzclose(fp) +#define bgzf_read(fp, buf, len) gzread(fp, buf, len) +#define bgzf_write(fp, buf, len) +#define bgzf_flush(fp) +#endif /* A member in the structs below is said to "primary" if its content @@ -74,7 +86,7 @@ typedef struct { typedef struct { int is_vcf; // if the file in operation is a VCF void *v; // auxillary data structure for VCF - BGZF *fp; // file handler for BCF + bcfFile fp; // file handler for BCF } bcf_t; struct __bcf_idx_t; @@ -128,6 +140,8 @@ extern "C" { int bcf_shrink_alt(bcf1_t *b, int n); // convert GL to PL int bcf_gl2pl(bcf1_t *b); + // if the site is an indel + int bcf_is_indel(const bcf1_t *b); // string hash table void *bcf_build_refhash(bcf_hdr_t *h);