-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpolya.hpp
53 lines (45 loc) · 1.76 KB
/
polya.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
#ifndef _flipper_polya_h
#define _flipper_polya_h
#include <string>
#include <vector>
#include <unordered_map>
struct polya_res_t {
int signal_pos;
int tail_pos;
int tail_length;
};
const std::unordered_map<char, int> alphabet = {
{'A', 0},
{'C', 1},
{'T', 2},
{'G', 3}
};
const std::vector<std::string> states {"seq", "pAs1", "pAs2", "pAs3", "pAs4", "pAs5", "pAs6", "seq2", "polyA", "seq3", "ins"};
const std::vector<std::vector<double>> emissions {
{0.25, 0.25, 0.25, 0.25},
{0.95, 0.05 / 3, 0.05 / 3, 0.05 / 3},
{0.95, 0.05 / 3, 0.05 / 3, 0.05 / 3},
{0.05 / 3, 0.05 / 3, 0.95, 0.05 / 3},
{0.95, 0.05 / 3, 0.05 / 3, 0.05 / 3},
{0.95, 0.05 / 3, 0.05 / 3, 0.05 / 3},
{0.95, 0.05 / 3, 0.05 / 3, 0.05 / 3},
{0.25, 0.25, 0.25, 0.25},
{0.95, 0.05 / 3, 0.05 / 3, 0.05 / 3},
{0.25, 0.25, 0.25, 0.25},
{0.25, 0.25, 0.25, 0.25}
};
const std::vector<std::vector<double>> transitions {
{0.99, 0.01, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00},
{0.00, 0.00, 1.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00},
{0.00, 0.00, 0.00, 1.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00},
{0.00, 0.00, 0.00, 0.00, 1.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00},
{0.00, 0.00, 0.00, 0.00, 0.00, 1.00, 0.00, 0.00, 0.00, 0.00, 0.00},
{0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 1.00, 0.00, 0.00, 0.00, 0.00},
{0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 1.00, 0.00, 0.00, 0.00},
{0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.93, 0.07, 0.00, 0.00},
{0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.95, 0.05, 0.00},
{0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.70, 0.00},
{0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00}
};
polya_res_t get_polya(std::string seq);
#endif