X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=glf.h;h=af72a48f95385635a09ee692138969acb1c8cfde;hb=635998cfe030da5f3dbec42a6daa3ca82fa5c871;hp=d9d23c624bb0aded1b4309b68311fdc94106f115;hpb=f93dae0d03856955f9424e8b2aaf261304ca647e;p=samtools.git diff --git a/glf.h b/glf.h index d9d23c6..af72a48 100644 --- a/glf.h +++ b/glf.h @@ -8,4 +8,40 @@ typedef struct { unsigned min_lk:8, depth:24; /** minimum lk capped at 255, and the number of mapped reads */ } glf1_t; +#include +#include "bgzf.h" +typedef BGZF *glfFile; + +#define GLF_TYPE_NORMAL 0 +#define GLF_TYPE_INDEL 1 +#define GLF_TYPE_END 15 + +typedef struct { + unsigned char ref_base:4, type:4; /** "XACMGRSVTWYHKDBN"[ref_base] gives the reference base */ + unsigned char max_mapQ; /** maximum mapping quality */ + unsigned char lk[10]; /** log likelihood ratio, capped at 255 */ + unsigned min_lk:8, depth:24; /** minimum lk capped at 255, and the number of mapped reads */ + unsigned pos; /** this is ***ZERO-BASED*** coordinate */ +} glf2_t; + +typedef struct { + int32_t l_text; + uint8_t *text; +} glf_header_t; + +#ifdef __cplusplus +extern "C" { +#endif + + glf_header_t *glf_header_init(); + glf_header_t *glf_header_read(glfFile fp); + void glf_header_write(glfFile fp, const glf_header_t *h); + void glf_header_destroy(glf_header_t *h); + char *glf_ref_read(glfFile fp); + void glf_ref_write(glfFile fp, const char *str); + +#ifdef __cplusplus +} +#endif + #endif