8 int fmt, len; // len is the unit length
10 // derived info: fmt, len
15 uint32_t qual:8, l_str:24;
17 char *str, *ref, *alt, *flt, *info, *fmt; // fmt, ref, alt and info point to str
21 // derived info: ref, alt, flt, info, fmt, n_gi, n_alleles
25 int32_t n_ref, n_smpl;
29 char *name, *sname, *txt;
31 // derived info: n_ref, n_smpl, ns, sns
40 typedef struct __bcf_idx_t bcf_idx_t;
46 bcf_t *bcf_open(const char *fn, const char *mode);
47 int bcf_close(bcf_t *b);
48 int bcf_read(bcf_t *bp, bcf1_t *b);
49 int bcf_sync(int n_smpl, bcf1_t *b);
50 int bcf_write(bcf_t *bp, const bcf1_t *b);
51 int bcf_hdr_write(bcf_t *b);
52 int bcf_hdr_sync(bcf_hdr_t *b);
53 int bcf_hdr_cpy(bcf_hdr_t *h, const bcf_hdr_t *h0);
54 int bcf_destroy(bcf1_t *b);
55 char *bcf_fmt(bcf_t *bp, bcf1_t *b);
57 void *bcf_build_refhash(bcf_hdr_t *h);
58 void bcf_str2id_destroy(void *_hash);
59 int bcf_str2id(void *_hash, const char *str);
61 int bcf_idx_build(const char *fn);
62 uint64_t bcf_idx_query(const bcf_idx_t *idx, int tid, int beg, int end);
63 int bcf_parse_region(void *str2id, const char *str, int *tid, int *begin, int *end);
64 bcf_idx_t *bcf_idx_load(const char *fn);
65 void bcf_idx_destroy(bcf_idx_t *idx);