X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bcftools%2Fbcf.h;h=dff439df5d7f2d74a09e8d4b3b327a57f58ccc62;hb=80658e4d152b53bd55927c432ceece7702ab49d7;hp=84f0c2d941eb24db6a8c3b0cbc015e2402d80a1e;hpb=f0b7a686f0f6581bc524353d7e783abbe9a94316;p=samtools.git diff --git a/bcftools/bcf.h b/bcftools/bcf.h index 84f0c2d..dff439d 100644 --- a/bcftools/bcf.h +++ b/bcftools/bcf.h @@ -28,6 +28,8 @@ #ifndef BCF_H #define BCF_H +#define BCF_VERSION "0.1.16-dev (r963:240)" + #include #include @@ -129,6 +131,8 @@ extern "C" { int vcf_close(bcf_t *bp); // read the VCF/BCF header bcf_hdr_t *vcf_hdr_read(bcf_t *bp); + // read the sequence dictionary from a separate file; required for VCF->BCF conversion + int vcf_dictread(bcf_t *bp, bcf_hdr_t *h, const char *fn); // read a VCF/BCF record; return -1 on end-of-file and <-1 for errors int vcf_read(bcf_t *bp, bcf_hdr_t *h, bcf1_t *b); // write the VCF header @@ -144,10 +148,15 @@ extern "C" { int bcf_is_indel(const bcf1_t *b); bcf_hdr_t *bcf_hdr_subsam(const bcf_hdr_t *h0, int n, char *const* samples, int *list); int bcf_subsam(int n_smpl, int *list, bcf1_t *b); + // move GT to the first FORMAT field + int bcf_fix_gt(bcf1_t *b); + // update PL generated by old samtools + int bcf_fix_pl(bcf1_t *b); // string hash table void *bcf_build_refhash(bcf_hdr_t *h); void bcf_str2id_destroy(void *_hash); + void bcf_str2id_thorough_destroy(void *_hash); int bcf_str2id_add(void *_hash, const char *str); int bcf_str2id(void *_hash, const char *str); void *bcf_str2id_init();