forked from aquaskyline/16GT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
readIndex.h
47 lines (37 loc) · 1.17 KB
/
readIndex.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef _READ_INDEX_H_
#define _READ_INDEX_H_
#define MAX_SEQ_NAME_LENGTH 256
#pragma pack(2)
typedef struct Translate
{
unsigned int startPos;
unsigned int correction;
unsigned short chrID;
} Translate;
#pragma pack()
#pragma pack(2)
typedef struct Annotation
{
int gi;
char text[MAX_SEQ_NAME_LENGTH + 1];
char decoratedText[MAX_SEQ_NAME_LENGTH + 1];
} Annotation;
#pragma pack()
#pragma pack(4)
typedef struct SeqOffset
{
unsigned int startPos;
unsigned int endPos;
int firstAmbiguityIndex;
int lastAmbiguityIndex;
} SeqOffset;
#pragma pack()
size_t loadTranslateWithTranslateSize(const char *inputFileName, unsigned int &dnaLength,
unsigned int **ambiguityMap, Translate **translate);
void loadTranslate(const char *inputFileName, unsigned int &dnaLength,
unsigned int **ambiguityMap, Translate **translate);
void freeTranslate(unsigned int *ambiguityMap, Translate *translate);
void loadSeqInfo(const char *inputFileName, unsigned int &dnaLength,
Annotation **annotation, SeqOffset **seqOffset, unsigned int &numOfSeq);
void freeSeqInfo(Annotation *annotation, SeqOffset *seqOffset);
#endif