-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsr-index.hpp
33 lines (29 loc) · 981 Bytes
/
sr-index.hpp
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
#ifndef SR_INDEX__
#define SR_INDEX__
#include <algorithm>
#include "common.h"
#include "graph.h"
#include <sdsl/suffix_arrays.hpp>
#include <boost/filesystem.hpp>
#include <fstream>
#include <sys/resource.h>
class SR_index {
private:
long long k, max_read_length;
sdsl::csa_wt<> fm_index;
sdsl::vlc_vector<> counts;
sdsl::rrr_vector<> valid_end;
sdsl::vlc_vector<> start_indices;
sdsl::vlc_vector<> start_indices_permutation;
sdsl::sd_vector<> new_read_start;
sdsl::sd_vector<>::rank_1_type read_start_rank;
sdsl::sd_vector<> valid_in_read;
sdsl::sd_vector<>::rank_1_type valid_in_read_rank;
public:
void construct(const string&);
void construct_superstring(const string&);
SR_index(long long kk, long long max_read): k(kk), max_read_length(max_read){}
vector <int> find_reads(const string&, bool);
void print_superstring();
};
#endif //SR_INDEX__