-
Notifications
You must be signed in to change notification settings - Fork 3
/
rle_bwt.h
40 lines (30 loc) · 822 Bytes
/
rle_bwt.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
#ifndef RLE_BWT_H
#define RLE_BWT_H
//C headers
#include <stdint.h>
//C++ headers
#include <string>
#include <vector>
//Custom headers
#include "base_bwt.h"
using namespace std;
class RLE_BWT : public BaseBWT {
private:
//loaded from disk
uint8_t bitPower;
uint64_t binSize;
//constructFMIndex() - IMPORTANT: THIS IS TRANSPOSED COMPARED TO PYTHON IMPL
//aka row = symbol; column = index
uint64_t** fmIndex;
vector<uint64_t> refFM;
uint64_t offsetSum;
//these functions build all auxiliary structures required for the FM-index lookups
void constructFMIndex();
public:
//constructor and destructor
RLE_BWT(string inFN, uint8_t bitPower=8);
~RLE_BWT();
//query sub-routines
bwtRange constrainRange(uint8_t sym, bwtRange inRange);
};
#endif