modified: myjupyterlab.sh
[GalaxyCodeBases.git] / c_cpp / libgFileIO / _dist / libgFileIO.h
blobf2b1974e3a4cc56f0bde14c6958518036d50359a
1 // by Hu Xuesong
2 #ifndef _G_FILEIO_H
3 #define _G_FILEIO_H
5 #include <stdint.h>
7 #define GFIOCHRBASE 1
8 #define GFIODIBBASE 2
10 #define G_HEADER_LENGTH 4
11 #define G_TYPE_FAQC "FAQC"
12 #define G_TYPE_GZ "0x1f0x8b0x08"
15 struct __SeqFileObj;
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;
25 G_p_oneIN *closefh;
26 void *fobj;
27 long datePos[1]; // [1] for item id, [0] for offset. For Text file, item id == 0.
28 uint_fast8_t type;
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 */