RNAlib-2.2.9

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

2Dfold.h
Go to the documentation of this file.
1 /*
2 minimum free energy
3 RNA secondary structure with
4 basepair distance d to reference structure prediction
5
6 */
7 #ifndef VIENNA_RNA_PACKAGE_TWO_D_FOLD_H
8 #define VIENNA_RNA_PACKAGE_TWO_D_FOLD_H
9
10 /* make this interface backward compatible with RNAlib < 2.2.0 */
11 #define VRNA_BACKWARD_COMPAT
12
13 #ifdef DEPRECATION_WARNINGS
14 # ifdef __GNUC__
15 # define DEPRECATED(func) func __attribute__ ((deprecated))
16 # else
17 # define DEPRECATED(func) func
18 # endif
19 #else
20 # define DEPRECATED(func) func
21 #endif
22
45 #include <ViennaRNA/data_structures.h>
46 #include <ViennaRNA/params.h>
47
62 typedef struct vrna_sol_TwoD_t{
63 int k;
64 int l;
65 float en;
66 char *s;
67 } vrna_sol_TwoD_t;
68
69
70
98 vrna_sol_TwoD_t *
99 vrna_mfe_TwoD(vrna_fold_compound_t *vc,
100 int distance1,
101 int distance2);
102
121 char *
122 vrna_backtrack5_TwoD( vrna_fold_compound_t *vc,
123 int k,
124 int l,
125 unsigned int j);
126
127 #ifdef VRNA_BACKWARD_COMPAT
128
129 #define TwoDfold_solution vrna_sol_TwoD_t /* restore compatibility of struct rename */
130
138 typedef struct TwoDfold_vars{
139 vrna_param_t *P;
140 int do_backtrack;
141 char *ptype;
142 char *sequence;
143 short *S, *S1;
144 unsigned int maxD1;
145 unsigned int maxD2;
148 unsigned int *mm1;
149 unsigned int *mm2;
151 int *my_iindx;
153 double temperature;
154
155 unsigned int *referenceBPs1;
156 unsigned int *referenceBPs2;
157 unsigned int *bpdist;
159 short *reference_pt1;
160 short *reference_pt2;
161 int circ;
162 int dangles;
163 unsigned int seq_length;
164
165 int ***E_F5;
166 int ***E_F3;
167 int ***E_C;
168 int ***E_M;
169 int ***E_M1;
170 int ***E_M2;
171
172 int **E_Fc;
173 int **E_FcH;
174 int **E_FcI;
175 int **E_FcM;
176
177 int **l_min_values;
178 int **l_max_values;
179 int *k_min_values;
180 int *k_max_values;
181
182 int **l_min_values_m;
183 int **l_max_values_m;
184 int *k_min_values_m;
185 int *k_max_values_m;
186
187 int **l_min_values_m1;
188 int **l_max_values_m1;
189 int *k_min_values_m1;
190 int *k_max_values_m1;
191
192 int **l_min_values_f;
193 int **l_max_values_f;
194 int *k_min_values_f;
195 int *k_max_values_f;
196
197 int **l_min_values_f3;
198 int **l_max_values_f3;
199 int *k_min_values_f3;
200 int *k_max_values_f3;
201
202 int **l_min_values_m2;
203 int **l_max_values_m2;
204 int *k_min_values_m2;
205 int *k_max_values_m2;
206
207 int *l_min_values_fc;
208 int *l_max_values_fc;
209 int k_min_values_fc;
210 int k_max_values_fc;
211
212 int *l_min_values_fcH;
213 int *l_max_values_fcH;
214 int k_min_values_fcH;
215 int k_max_values_fcH;
216
217 int *l_min_values_fcI;
218 int *l_max_values_fcI;
219 int k_min_values_fcI;
220 int k_max_values_fcI;
221
222 int *l_min_values_fcM;
223 int *l_max_values_fcM;
224 int k_min_values_fcM;
225 int k_max_values_fcM;
226
227 /* auxilary arrays for remaining set of coarse graining (k,l) > (k_max, l_max) */
228 int *E_F5_rem;
229 int *E_F3_rem;
230 int *E_C_rem;
231 int *E_M_rem;
232 int *E_M1_rem;
233 int *E_M2_rem;
234
235 int E_Fc_rem;
236 int E_FcH_rem;
237 int E_FcI_rem;
238 int E_FcM_rem;
239
240 #ifdef COUNT_STATES
241 unsigned long ***N_F5;
242 unsigned long ***N_C;
243 unsigned long ***N_M;
244 unsigned long ***N_M1;
245 #endif
246
247 vrna_fold_compound_t *compatibility;
248 } TwoDfold_vars;
249
268 DEPRECATED(TwoDfold_vars *
269 get_TwoDfold_variables( const char *seq,
270 const char *structure1,
271 const char *structure2,
272 int circ));
273
284 DEPRECATED(void
285 destroy_TwoDfold_variables(TwoDfold_vars *our_variables));
286
312 DEPRECATED(TwoDfold_solution *
313 TwoDfoldList( TwoDfold_vars *vars,
314 int distance1,
315 int distance2));
316
337 DEPRECATED(char *TwoDfold_backtrack_f5(unsigned int j,
338 int k,
339 int l,
340 TwoDfold_vars *vars));
341
345 DEPRECATED(TwoDfold_solution **TwoDfold(TwoDfold_vars *our_variables,
346 int distance1,
347 int distance2));
348
349
350 #endif
351
356 #endif
vrna_sol_TwoD_t
Solution element returned from vrna_mfe_TwoD()
Definition: 2Dfold.h:62
TwoDfold_vars
struct TwoDfold_vars TwoDfold_vars
Variables compound for 2Dfold MFE folding.
TwoDfold_vars::mm2
unsigned int * mm2
Maximum matching matrix, reference struct 2 disallowed.
Definition: 2Dfold.h:149
TwoDfold_vars
Variables compound for 2Dfold MFE folding.
Definition: 2Dfold.h:138
vrna_fc_s
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:424
temperature
double temperature
Rescale energy parameters to a temperature in degC.
TwoDfold_backtrack_f5
char * TwoDfold_backtrack_f5(unsigned int j, int k, int l, TwoDfold_vars *vars)
Backtrack a minimum free energy structure from a 5&#39; section of specified length.
vrna_param_s
The datastructure that contains temperature scaled energy parameters.
Definition: params.h:50
TwoDfold_vars::mm1
unsigned int * mm1
Maximum matching matrix, reference struct 1 disallowed.
Definition: 2Dfold.h:148
destroy_TwoDfold_variables
void destroy_TwoDfold_variables(TwoDfold_vars *our_variables)
Destroy a TwoDfold_vars datastructure without memory loss.
vrna_sol_TwoD_t::l
int l
Distance to second reference.
Definition: 2Dfold.h:64
vrna_sol_TwoD_t::s
char * s
MFE representative structure in dot-bracket notation.
Definition: 2Dfold.h:66
vrna_backtrack5_TwoD
char * vrna_backtrack5_TwoD(vrna_fold_compound_t *vc, int k, int l, unsigned int j)
Backtrack a minimum free energy structure from a 5&#39; section of specified length.
TwoDfold_vars::do_backtrack
int do_backtrack
Flag whether to do backtracing of the structure(s) or not.
Definition: 2Dfold.h:140
data_structures.h
TwoDfold_vars::referenceBPs2
unsigned int * referenceBPs2
Matrix containing number of basepairs of reference structure2 in interval [i,j].
Definition: 2Dfold.h:156
TwoDfold_vars::referenceBPs1
unsigned int * referenceBPs1
Matrix containing number of basepairs of reference structure1 in interval [i,j].
Definition: 2Dfold.h:155
params.h
TwoDfold_vars::my_iindx
int * my_iindx
Index for moving in quadratic distancy dimensions.
Definition: 2Dfold.h:151
TwoDfold_vars::maxD1
unsigned int maxD1
Maximum allowed base pair distance to first reference.
Definition: 2Dfold.h:144
TwoDfoldList
vrna_sol_TwoD_t * TwoDfoldList(TwoDfold_vars *vars, int distance1, int distance2)
Compute MFE&#39;s and representative for distance partitioning.
vrna_sol_TwoD_t
struct vrna_sol_TwoD_t vrna_sol_TwoD_t
Solution element returned from vrna_mfe_TwoD()
vrna_sol_TwoD_t::k
int k
Distance to first reference.
Definition: 2Dfold.h:63
vrna_mfe_TwoD
vrna_sol_TwoD_t * vrna_mfe_TwoD(vrna_fold_compound_t *vc, int distance1, int distance2)
Compute MFE&#39;s and representative for distance partitioning.
TwoDfold_vars::ptype
char * ptype
Precomputed array of pair types.
Definition: 2Dfold.h:141
TwoDfold_vars::P
vrna_param_t * P
Precomputed energy parameters and model details.
Definition: 2Dfold.h:139
TwoDfold_vars::S1
short * S1
The input sequences in numeric form.
Definition: 2Dfold.h:143
TwoDfold_vars::sequence
char * sequence
The input sequence.
Definition: 2Dfold.h:142
get_TwoDfold_variables
TwoDfold_vars * get_TwoDfold_variables(const char *seq, const char *structure1, const char *structure2, int circ)
Get a structure of type TwoDfold_vars prefilled with current global settings.
vrna_sol_TwoD_t::en
float en
Free energy in kcal/mol.
Definition: 2Dfold.h:65
TwoDfold_vars::maxD2
unsigned int maxD2
Maximum allowed base pair distance to second reference.
Definition: 2Dfold.h:145
circ
int circ
backward compatibility variable.. this does not effect anything
dangles
int dangles
Switch the energy model for dangling end contributions (0, 1, 2, 3)
TwoDfold_vars::bpdist
unsigned int * bpdist
Matrix containing base pair distance of reference structure 1 and 2 on interval [i,j].
Definition: 2Dfold.h:157