rna_copy.h
1.52 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#ifndef DEF_RNA
#define DEF_RNA
#include <vector>
#include <string>
#include "fa.h"
#include "coord.h"
typedef std::vector<int> VI;
typedef std::vector<VI> VVI;
typedef std::vector<std::pair<int,int> > VII;
typedef std::vector<float> VF;
typedef std::vector<VF> VVF;
class Rna{
public:
Rna();
Rna(std::string name, std::string seq, int id);
Rna (const char * file);
Rna (Fasta * fasta);
Fasta get_fasta();
int get_n_();
std::string get_name_();
std::string get_nameFasta();
std::string get_path();
std::string get_seq_();
VVI get_type_();
int get_type(int i, int j);
int get_type(int i);
Coord get_coord_();
std::pair< int,int > get_coord(int i);
int get_coordF(int i);
int get_coordS(int i);
int find_coord(std::pair< int,int >);
VVF get_pij_();
float get_pij(int i, int j);
float get_pij(int i);
int get_err_();
int get_nBP_();
int get_id_();
void set_name_(const std::string name);
void set_id_(const int id);
void init(int id);
static bool check_seq(const std::string seq);
private:
Fasta *fasta_;
std::string name_; /*name of the rna given by the user*/
std::string seq_;
int n_; /*length of the rna*/
VVI type_; /*vector of base pair types*/
Coord coord_; /*vector of base pair coordinates*/
VVF pij_; /*vector of probabilities*/
int err_; /*if any error in sequence, != 0*/
int nBP_; /*number of possible base pair*/
int id_;
void format();
};
#endif