forked from CMU-SAFARI/Shifted-Hamming-Distance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLV.h
71 lines (52 loc) · 977 Bytes
/
LV.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
66
67
68
69
70
#include <iostream>
#include <x86intrin.h>
#include <emmintrin.h>
#include <immintrin.h>
#include <cstring>
#include <string>
#include <cstdlib>
#define _MAX_LENGTH_ 128
using namespace std;
#ifndef __ED_INFO_H_
#define __ED_INFO_H_
enum ED_TYPE {MISMATCH, A_INS, B_INS};
struct ED_INFO {
ED_TYPE type;
int id_length;
};
#endif
#ifndef __LV_H_
#define __LV_H_
class LV {
public:
LV();
~LV();
void init(int ED_threshold);
void load_reads(char *read, char *ref, int length);
void reset();
void run();
bool check_pass();
void backtrack();
int get_ED();
string get_CIGAR();
private:
int count_ID_length_sse(int lane_idx, int start_pos);
int ED_t;
// information of each lane
int *cur_ED;
int **start;
int **end;
// backtracking data
bool ED_pass;
int final_lane_idx;
int final_ED;
ED_INFO *ED_info;
// serrogates
int mid_lane;
int total_lanes;
// buffers
int buffer_length;
char A[_MAX_LENGTH_];
char B[_MAX_LENGTH_];
};
#endif