7 unsigned char ref_base
: 4, dummy
: 4; /** "XACMGRSVTWYHKDBN"[ref_base] gives the reference base */
8 unsigned char max_mapQ
; /** maximum mapping quality */
9 unsigned char lk
[10]; /** log likelihood ratio, capped at 255 */
10 unsigned min_lk
: 8, depth
: 24; /** minimum lk capped at 255, and the number of mapped reads */
15 typedef BGZF
* glfFile
;
17 #define GLF3_RTYPE_END 0
18 #define GLF3_RTYPE_SUB 1
19 #define GLF3_RTYPE_INDEL 2
23 uint8_t ref_base
: 4, rtype
: 4; /** "XACMGRSVTWYHKDBN"[ref_base] gives the reference base */
24 uint8_t rms_mapQ
; /** RMS mapping quality */
25 uint8_t lk
[10]; /** log likelihood ratio, capped at 255 */
26 uint32_t min_lk
: 8, depth
: 24; /** minimum lk capped at 255, and the number of mapped reads */
27 int32_t offset
; /** the first base in a chromosome has offset zero. */
28 // for indel (lkHom1, lkHom2 and lkHet are the first three elements in lk[10])
30 int32_t max_len
; // maximum indel len; will be modified by glf3_read1()
44 #define glf3_init1() ((glf3_t*)calloc(1, sizeof(glf3_t)))
45 #define glf3_destroy1(g3) do { free((g3)->indel_seq[0]); free((g3)->indel_seq[1]); free(g3); } while (0)
47 glf3_header_t
* glf3_header_init();
48 glf3_header_t
* glf3_header_read ( glfFile fp
);
49 void glf3_header_write ( glfFile fp
, const glf3_header_t
* h
);
50 void glf3_header_destroy ( glf3_header_t
* h
);
51 char * glf3_ref_read ( glfFile fp
, int * len
);
52 void glf3_ref_write ( glfFile fp
, const char * name
, int len
);
53 int glf3_write1 ( glfFile fp
, const glf3_t
* g3
);
54 int glf3_read1 ( glfFile fp
, glf3_t
* g3
);