-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsfsutils.hpp
47 lines (38 loc) · 1.22 KB
/
sfsutils.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
#ifndef SFSUTILS_HPP
#define SFSUTILS_HPP
#include <fstream>
#include <iostream>
#include <map>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
static const char RCN[128] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 10
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 30
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 50
0, 0, 0, 0, 0, 'T', 0, 'G', 0, 0, // 60
0, 'C', 0, 0, 0, 0, 0, 0, 'N', 0, // 70
0, 0, 0, 0, 'A', 0, 0, 0, 0, 0, // 80
0, 0, 0, 0, 0, 0, 0, 'T', 0, 'G', // 90
0, 0, 0, 'G', 0, 0, 0, 0, 0, 0, // 100
'N', 0, 0, 0, 0, 0, 'A', 0, 0, 0, // 110
0, 0, 0, 0, 0, 0, 0, 0 // 120
};
struct SFS {
uint s;
uint l;
uint c;
SFS(uint s_, uint l_, uint c_) {
s = s_;
l = l_;
c = c_;
}
void reverse(uint p) { s = p - s - l; }
};
bool operator<(const SFS &, const SFS &);
map<string, vector<SFS>> parse_sfsfile(const string &, int);
#endif