-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreference_data.h
65 lines (54 loc) · 1.46 KB
/
reference_data.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef _REFERENCE_DATA_H_
#define _REFERENCE_DATA_H_
#include "load_data.h"
#include "util.h"
/**
* @struct MaskedRegionType
* linked list of masked regions on the ref sequence.
*/
typedef struct MaskedRegionType {
/** first pos masked */
int start;
/** last pos masked */
int end;
/** next one */
struct MaskedRegionType* next;
} MaskedRegionType;
/**
* @struct ReferenceDBType
* Reference sequence descriptor (single sequence)
*/
typedef struct ReferenceDBType {
/** fasta name */
char* name;
/** size (nucleotides or color) */
int size;
#ifndef NUCLEOTIDES
/** first base for color encoded sequence */
CODE_TYPE first_base;
#endif
/** "allocated" sequence pointer (larger than sequence to avoid SIMD checks)
* this one only must be freed
*/
CODE_TYPE* sequence_alloc;
/** "true" sequence pointer */
CODE_TYPE* sequence;
/** "allocated" sequence_masked pointer (larger than sequence_masked to avoid SIMD checks)
* this one only must be freed
*/
CODE_TYPE* sequence_masked_alloc;
/** "true" sequence of list of masked regions in flat "code" format
*/
CODE_TYPE* sequence_masked;
/** list of masked regions along the genome */
MaskedRegionType* masked_regions;
} ReferenceDBType;
/**
* Load reference sequence
*/
int load_reference_db(const char* reference_filename, int readlen, ReferenceDBType** db);
/**
* Destroys a read database
*/
void clear_reference_db(ReferenceDBType* db);
#endif /* _REFERENCE_DATA_H_ */