complexe.h
3.3 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
98
99
100
101
102
103
104
105
106
107
108
109
110
#ifndef DEF_HCOMP
#define DEF_HCOMP
#include <vector>
#include <string>
#include <tuple>
#include "Motifs/helix.h"
#include "structure.h"
#include "solinteraction.h"
class Complexe
{
public:
Complexe(const std::vector< unsigned int > &rnaList, const std::vector< std::string > &rnaName,
const std::vector< std::string > &seqList,
const std::vector < std::pair < std::pair < unsigned int, unsigned int >, std::pair < unsigned int, unsigned int > > > &listBP,
std::vector < float > obj);
Complexe();
~Complexe();
void loadListsBP_();
std::vector< unsigned int > get_rnaList_() const;
std::vector< std::string > get_rnaName_() const;
std::vector< std::string > get_seqList_() const;
std::vector < float > get_obj_() const;
std::vector < std::pair < std::pair < unsigned int, unsigned int > , std::pair < unsigned int, unsigned int > > > get_listBP_() const;
std::vector < std::vector < std::pair < std::pair < unsigned int, unsigned int > , std::pair < unsigned int, unsigned int > > > > get_listsBP_() const;
void set_obj_(std::vector < float > obj);
void set_rnaList_(const std::vector< unsigned int > &rnaList);
void set_rnaName_(const std::vector< std::string > &rnaName);
void set_seqList_(const std::vector< std::string > &seqList);
std::vector< std::vector < std::vector < int > > > permutation(std::vector< std::vector < std::vector < int > > > oldLevel, std::vector< std::vector < std::vector < int > > > combi, int max) const;
void make_listBP2_();
std::string convToDP();
char get_closing_char(char openChar);
std::string to_string();
std::string to_Json();
std::string to_forna();
std::string to_graph(uint index);
bool operator<(const Complexe &c);
bool operator<(const Complexe &c) const;
bool operator>(const Complexe &c);
bool operator>(const Complexe &c) const;
bool operator<=(const Complexe &c);
bool operator<=(const Complexe &c) const;
bool operator>=(const Complexe &c);
bool operator>=(const Complexe &c) const;
bool operator==(const Complexe &c);
bool operator==(const Complexe &c) const;
bool operator!=(const Complexe &c);
bool operator!=(const Complexe &c) const;
std::pair < std::pair < int, int > , std::pair < int, int > > invert(std::pair < std::pair < int, int > , std::pair < int, int > > pair) const;
static bool isEquivalent(const Complexe &c1, const Complexe &c2);
private:
std::vector < unsigned int > rnaList_; //vector to store the rna
std::vector < std::string > rnaName_; //vector to store the name of the rna
std::vector < std::string > seqList_; //vector to store the sequences
std::vector < std::pair < std::pair < unsigned int, unsigned int > , std::pair < unsigned int, unsigned int > > > listBP_; //store the base pairs
std::vector < std::pair < std::tuple < unsigned int, unsigned int, unsigned int >, std::tuple < unsigned int, unsigned int, unsigned int > > > listBP2_; // base pairs with positions in rna and in complex
std::vector < std::vector < std::pair < std::pair < unsigned int, unsigned int > , std::pair < unsigned int, unsigned int > > > > listsBP_; //store id base pair if there are identical sequences of rna
std::vector < float > obj_;
};
#endif