IntaRNA 3.4.1
RNA-RNA interaction prediction | C++ API
Loading...
Searching...
No Matches
PredictionTrackerSpotProb.h
Go to the documentation of this file.
1
2#ifndef INTARNA_PREDICTIONTRACKERSPOTPROB_H_
3#define INTARNA_PREDICTIONTRACKERSPOTPROB_H_
4
7
8#include <iostream>
9
10#include <boost/algorithm/string.hpp>
11
12namespace IntaRNA {
13
22{
23
24public:
25
27 static const std::string str_spot;
29 static const boost::regex regexSpotString;
30
31public:
32
47 , const std::string & spots
48 , const std::string & outStreamName
49 , const std::string & sep = ";"
50 );
51
65 , const std::string & spots
66 , std::ostream & outStream
67 , const std::string & sep = ";"
68 );
69
70
75
76
86 virtual
87 void
88 updateOptimumCalled( const size_t i1, const size_t j1
89 , const size_t i2, const size_t j2
90 , const E_type energy
91 );
92
93protected:
94
95 class Spot {
96 public:
98 size_t idx1;
100 size_t idx2;
103
104 /* default construction
105 */
107 : idx1(std::string::npos), idx2(std::string::npos), Z(0.0)
108 {}
109
110 /* construction from data
111 * @param idx1 index in seq1
112 * @param idx2 index in seq2
113 */
114 Spot(size_t idx1, size_t idx2)
115 : idx1(idx1), idx2(idx2), Z(0.0)
116 {}
117
118 };
119
120
121protected:
122
125
127 std::ostream * outStream;
128
130 const bool deleteOutStream;
131
133 std::vector<Spot> spots;
134
136 const std::string sep;
137
140
143
144protected:
145
146
152 Spot fromString( std::string && spotString );
153
154};
155
157
158} // namespace
159
160#endif /* PREDICTIONTRACKERSPOTPROB_H_ */
Definition InteractionEnergy.h:20
Definition PredictionTrackerSpotProb.h:95
Z_type Z
partition function of all interactions covering the spot
Definition PredictionTrackerSpotProb.h:102
Spot()
Definition PredictionTrackerSpotProb.h:106
size_t idx1
index in seq1
Definition PredictionTrackerSpotProb.h:98
size_t idx2
index in seq2
Definition PredictionTrackerSpotProb.h:100
Spot(size_t idx1, size_t idx2)
Definition PredictionTrackerSpotProb.h:114
Definition PredictionTrackerSpotProb.h:22
Z_type noSpotZ
partition function of all interaction not covering a tracked spot
Definition PredictionTrackerSpotProb.h:139
Z_type overallZ
overall partition function of all reported interactions
Definition PredictionTrackerSpotProb.h:142
virtual void updateOptimumCalled(const size_t i1, const size_t j1, const size_t i2, const size_t j2, const E_type energy)
static const boost::regex regexSpotString
regex to match a valid list of spot encodings
Definition PredictionTrackerSpotProb.h:29
PredictionTrackerSpotProb(const InteractionEnergy &energy, const std::string &spots, const std::string &outStreamName, const std::string &sep=";")
static const std::string str_spot
regex string encoding of a single spot string encoding
Definition PredictionTrackerSpotProb.h:27
const std::string sep
the output column separator to be used
Definition PredictionTrackerSpotProb.h:136
PredictionTrackerSpotProb(const InteractionEnergy &energy, const std::string &spots, std::ostream &outStream, const std::string &sep=";")
std::ostream * outStream
the stream to write the probabilities to
Definition PredictionTrackerSpotProb.h:127
std::vector< Spot > spots
tracking information for each spot
Definition PredictionTrackerSpotProb.h:133
Spot fromString(std::string &&spotString)
const bool deleteOutStream
whether or not outStream is to be deleted on destruction
Definition PredictionTrackerSpotProb.h:130
const InteractionEnergy & energy
energy handler used for predictions
Definition PredictionTrackerSpotProb.h:124
Definition PredictionTracker.h:15
Definition Accessibility.h:13
int E_type
type for energy values (energy + accessibility [ED]) (internally)
Definition general.h:78
double Z_type
type for probabilities, RT and Boltzmann values
Definition general.h:88