solinteraction.h
3.97 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#ifndef DEF_HSOLINT
#define DEF_HSOLINT
#include <vector>
#include "rna.h"
#include "interaction.h"
#include "Motifs/pseudoknot.h"
#include "Motifs/helix.h"
typedef struct helixI{
std::pair<int,int> pos_start;
std::pair<int,int> pos_end;
std::vector< helixI * > crossingHelixs; //redundance in some other helixs DO NOT DELETE FROM HERE
}helixI;
class SolInteraction
{
public:
SolInteraction(const unsigned int rna1, const unsigned int rna2, const std::string &seq1, const std::string &seq2);
SolInteraction(const unsigned int rna1, const unsigned int rna2, const std::string &seq1, const std::string &seq2,
const std::vector < std::pair < unsigned int, unsigned int > > &listBp,
const int ct, const unsigned int nbCt, const unsigned int id, unsigned int energyModel, float energy,
const std::vector < float > &probingDataRna1, const std::vector < float > &probingDataRna2,
float lowerThresProbing, float upperThresProbing);
SolInteraction(const SolInteraction& that);
SolInteraction();
~SolInteraction();
unsigned int get_rna1_() const;
unsigned int get_rna2_() const;
std::string get_seq1_() const;
std::string get_seq2_() const;
std::vector < std::pair < unsigned int, unsigned int > > get_listBp_() const;
float get_score_() const;
unsigned int get_id_() const;
int get_ct_() const;
float get_ic_() const;
unsigned int get_nbCt_() const;
std::vector < Motif * > get_motifs_() const;
float get_probing_() const;
void set_id_(unsigned int id);
void set_score_(float score);
void set_listBp_(const std::vector < std::pair < unsigned int, unsigned int > > &listBp);
void set_nbCt_(unsigned int nbCt);
void set_ct_(int ct);
void set_ic_(float ic);
void set_probing_(float probing);
std::string convToDP() const;
std::string convToDPInvert() const;
std::string to_string() const;
std::string to_Json() const;
SolInteraction& operator=(const SolInteraction& that);
bool operator<(const SolInteraction& s);
bool operator<(const SolInteraction& s) const;
bool operator>(const SolInteraction& s);
bool operator>(const SolInteraction& s) const;
bool operator<=(const SolInteraction& s);
bool operator<=(const SolInteraction& s) const;
bool operator>=(const SolInteraction& s);
bool operator>=(const SolInteraction& s) const;
bool operator==(const SolInteraction& s);
bool operator==(const SolInteraction& s) const;
static std::vector < std::pair < unsigned int, unsigned int > > convToBP(std::string structure);
std::string convToDPRnaEval();
static bool checkStructure(std::string structure);
static bool checkListBp(std::string seq1, std::string seq2, std::vector < std::pair < unsigned int, unsigned int > > listBp);
private:
void computeEnergy();
static int type(std::string bp);
std::string convToNUPACK() const;
void computeEnergyNUPACK();
void computeEnergyVienna();
void computeProbing(const std::vector < float > &probingDataRna1, const std::vector < float > &probingDataRna2, float lowerThresProbing, float upperThresProbing);
std::vector < Motif * > readTree(helixI *tmp);
void motifDetection();
unsigned int rna1_;
unsigned int rna2_;
std::string seq1_;
std::string seq2_;
std::vector < std::pair < unsigned int, unsigned int > > listBp_; // ( id bp RNA 1, id bp RNA 2) paired
float score_; // energy
float probing_; // probing data score
int ct_; // confidence Index of the complete solInteraction given in the interaction file
float ic_; // confidence Index containing ct_ and the constraint from the constraint file, used for clique problem
unsigned int nbCt_; // Number of user constraint the solInteraction corresponds
unsigned int id_; // id amond the suboptimal solution SolInteraction vector
std::vector < Motif * > motifs_;
};
#endif