10 #define G_HEADER_LENGTH 4
11 #define G_TYPE_FAQC "FAQC"
12 #define G_TYPE_GZ "0x1f0x8b0x08"
16 typedef ssize_t (G_ssize_t_oneIN
)(struct __SeqFileObj
* const);
17 typedef void (G_p_oneIN
)(struct __SeqFileObj
* const);
19 typedef struct __SeqFileObj
{
20 size_t readlength
,binNcount
,binMallocedQQWord
;
21 const char *name
, *comment
, *seq
, *qual
;
22 uint64_t *diBseq
; // 2bit, {A,C,G,T}={0,1,2,3}
23 unsigned char *hexBQ
; // 0~63 for Quality, 128 for N, 64 for Eamss-masked or smallcase-masked
24 G_ssize_t_oneIN
*getNextSeq
;
27 long datePos
[1]; // [1] for item id, [0] for offset. For Text file, item id == 0.
29 /* 1->hasBaseChr, 2->hasQchar, 4->hasBase2bit,
30 8->hashexBQ or just array of {0,128} for N,
31 16->Eamss bit set, 32->Q value not raw, after Eamss. */
32 } SeqFileObj
; // We may support both FA/FQ and binary formats. So, object is a good thing.
34 SeqFileObj
* inSeqFinit(const char * const, unsigned char);
36 void inSeqFdestroy(SeqFileObj
* const);
38 #endif /* libgFileIO.h */