-
Notifications
You must be signed in to change notification settings - Fork 4
/
sv.hpp
64 lines (55 loc) · 1.22 KB
/
sv.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
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
#ifndef SV_HPP
#define SV_HPP
#include <iostream>
#include <map>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
class SV {
public:
string type;
string chrom;
string idx;
int s;
int e;
string refall;
string altall;
uint w;
int cov;
int cov0;
int cov1;
int cov2;
int l = 0;
int ngaps;
int score;
string gt;
int gtq;
bool imprecise;
string cigar;
string reads;
string rvec;
SV();
SV(const string type_, const string &chrom_, uint s_, const string &refall_,
const string &altall_, const uint w_, const uint cov_, const int ngaps_,
const int score_, bool imprecise_ = false, uint l_ = 0,
string cigar_ = ".");
void add_reads(const vector<string> &reads_);
void set_cov(int, int, int, int);
void set_rvec(const vector<tuple<int, int>> &);
void set_gt(const string &, int);
bool operator<(const SV &c) const {
if (chrom < c.chrom) {
return true;
} else if (chrom > c.chrom) {
return false;
} else {
return s < c.s;
}
}
bool operator==(const SV &c) const {
return chrom == c.chrom and s == c.s and e == c.e and type == c.type;
}
friend ostream &operator<<(ostream &os, const SV &sv);
};
#endif