]> git.donarmstrong.com Git - samtools.git/blobdiff - bcftools/bcf.h
* convert BCF to QCALL input
[samtools.git] / bcftools / bcf.h
index 3c0ab2cf8a71853a51361eca248bd0df342b423e..d0f9b02bb5b554df977c2202902605c0642cf223 100644 (file)
@@ -14,8 +14,8 @@ typedef struct {
 
 typedef struct {
        int32_t tid, pos;
-       uint32_t qual:8, l_str:24;
-       int m_str;
+       int32_t l_str, m_str;
+       float qual;
        char *str, *ref, *alt, *flt, *info, *fmt; // fmt, ref, alt and info point to str
        int n_gi, m_gi;
        bcf_ginfo_t *gi;
@@ -58,11 +58,21 @@ extern "C" {
        int bcf_destroy(bcf1_t *b);
        char *bcf_fmt(const bcf_hdr_t *h, bcf1_t *b);
 
+       bcf_t *vcf_open(const char *fn, const char *mode);
        int vcf_close(bcf_t *bp);
+       bcf_hdr_t *vcf_hdr_read(bcf_t *bp);
+       int vcf_hdr_write(bcf_t *bp, const bcf_hdr_t *h);
+       int vcf_write(bcf_t *bp, bcf_hdr_t *h, bcf1_t *b);
+       int vcf_read(bcf_t *bp, bcf_hdr_t *h, bcf1_t *b);
+
+       int bcf_shrink_alt(int n_smpl, bcf1_t *b, int n);
+       int bcf_gl2pl(int n_smpl, bcf1_t *b);
 
        void *bcf_build_refhash(bcf_hdr_t *h);
        void bcf_str2id_destroy(void *_hash);
+       int bcf_str2id_add(void *_hash, const char *str);
        int bcf_str2id(void *_hash, const char *str);
+       void *bcf_str2id_init();
 
        int bcf_idx_build(const char *fn);
        uint64_t bcf_idx_query(const bcf_idx_t *idx, int tid, int beg, int end);