RNAlib-2.2.0-RC2
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 __GNUC__
14 #define DEPRECATED(func) func __attribute__ ((deprecated))
15 #else
16 #define DEPRECATED(func) func
17 #endif
18 
42 #include <ViennaRNA/params.h>
43 
58 typedef struct vrna_sol_TwoD_t{
59  int k;
60  int l;
61  float en;
62  char *s;
64 
65 
66 
96  int distance1,
97  int distance2);
98 
117 char *
119  unsigned int j,
120  int k,
121  int l);
122 
123 #ifdef VRNA_BACKWARD_COMPAT
124 
125 #define TwoDfold_solution vrna_sol_TwoD_t /* restore compatibility of struct rename */
126 
134 typedef struct TwoDfold_vars{
135  struct vrna_param_t *P;
137  char *ptype;
138  char *sequence;
139  short *S, *S1;
140  unsigned int maxD1;
141  unsigned int maxD2;
144  unsigned int *mm1;
145  unsigned int *mm2;
147  int *my_iindx;
149  double temperature;
150 
151  unsigned int *referenceBPs1;
152  unsigned int *referenceBPs2;
153  unsigned int *bpdist;
155  short *reference_pt1;
156  short *reference_pt2;
157  int circ;
158  int dangles;
159  unsigned int seq_length;
160 
161  int ***E_F5;
162  int ***E_F3;
163  int ***E_C;
164  int ***E_M;
165  int ***E_M1;
166  int ***E_M2;
167 
168  int **E_Fc;
169  int **E_FcH;
170  int **E_FcI;
171  int **E_FcM;
172 
173  int **l_min_values;
174  int **l_max_values;
175  int *k_min_values;
176  int *k_max_values;
177 
178  int **l_min_values_m;
179  int **l_max_values_m;
180  int *k_min_values_m;
181  int *k_max_values_m;
182 
183  int **l_min_values_m1;
184  int **l_max_values_m1;
185  int *k_min_values_m1;
186  int *k_max_values_m1;
187 
188  int **l_min_values_f;
189  int **l_max_values_f;
190  int *k_min_values_f;
191  int *k_max_values_f;
192 
193  int **l_min_values_f3;
194  int **l_max_values_f3;
195  int *k_min_values_f3;
196  int *k_max_values_f3;
197 
198  int **l_min_values_m2;
199  int **l_max_values_m2;
200  int *k_min_values_m2;
201  int *k_max_values_m2;
202 
203  int *l_min_values_fc;
204  int *l_max_values_fc;
205  int k_min_values_fc;
206  int k_max_values_fc;
207 
208  int *l_min_values_fcH;
209  int *l_max_values_fcH;
210  int k_min_values_fcH;
211  int k_max_values_fcH;
212 
213  int *l_min_values_fcI;
214  int *l_max_values_fcI;
215  int k_min_values_fcI;
216  int k_max_values_fcI;
217 
218  int *l_min_values_fcM;
219  int *l_max_values_fcM;
220  int k_min_values_fcM;
221  int k_max_values_fcM;
222 
223  /* auxilary arrays for remaining set of coarse graining (k,l) > (k_max, l_max) */
224  int *E_F5_rem;
225  int *E_F3_rem;
226  int *E_C_rem;
227  int *E_M_rem;
228  int *E_M1_rem;
229  int *E_M2_rem;
230 
231  int E_Fc_rem;
232  int E_FcH_rem;
233  int E_FcI_rem;
234  int E_FcM_rem;
235 
236 #ifdef COUNT_STATES
237  unsigned long ***N_F5;
238  unsigned long ***N_C;
239  unsigned long ***N_M;
240  unsigned long ***N_M1;
241 #endif
242 
243  vrna_fold_compound *compatibility;
244 } TwoDfold_vars;
245 
264 DEPRECATED(TwoDfold_vars *
265 get_TwoDfold_variables( const char *seq,
266  const char *structure1,
267  const char *structure2,
268  int circ));
269 
280 DEPRECATED(void
282 
308 DEPRECATED(TwoDfold_solution *
310  int distance1,
311  int distance2));
312 
333 DEPRECATED(char *TwoDfold_backtrack_f5(unsigned int j,
334  int k,
335  int l,
336  TwoDfold_vars *vars));
337 
341 DEPRECATED(TwoDfold_solution **TwoDfold(TwoDfold_vars *our_variables,
342  int distance1,
343  int distance2));
344 
345 
346 #endif
347 
352 #endif
char * s
MFE representative structure in dot-bracket notation.
Definition: 2Dfold.h:62
int l
Distance to second reference.
Definition: 2Dfold.h:60
unsigned int * mm1
Maximum matching matrix, reference struct 1 disallowed.
Definition: 2Dfold.h:144
unsigned int maxD2
Maximum allowed base pair distance to second reference.
Definition: 2Dfold.h:141
unsigned int * referenceBPs1
Matrix containing number of basepairs of reference structure1 in interval [i,j].
Definition: 2Dfold.h:151
int circ
backward compatibility variable.. this does not effect anything
short * S1
The input sequences in numeric form.
Definition: 2Dfold.h:139
int * my_iindx
Index for moving in quadratic distancy dimensions.
Definition: 2Dfold.h:147
char * TwoDfold_backtrack_f5(unsigned int j, int k, int l, TwoDfold_vars *vars)
Backtrack a minimum free energy structure from a 5' section of specified length.
int dangles
Switch the energy model for dangling end contributions (0, 1, 2, 3)
void destroy_TwoDfold_variables(TwoDfold_vars *our_variables)
Destroy a TwoDfold_vars datastructure without memory loss.
int k
Distance to first reference.
Definition: 2Dfold.h:59
float en
Free energy in kcal/mol.
Definition: 2Dfold.h:61
char * ptype
Precomputed array of pair types.
Definition: 2Dfold.h:137
struct vrna_param_t * P
Precomputed energy parameters and model details.
Definition: 2Dfold.h:135
vrna_sol_TwoD_t * vrna_TwoD_fold(vrna_fold_compound *vc, int distance1, int distance2)
Compute MFE's and representative for distance partitioning.
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:689
Solution element returned from vrna_TwoD_fold()
Definition: 2Dfold.h:58
vrna_sol_TwoD_t * TwoDfoldList(TwoDfold_vars *vars, int distance1, int distance2)
Compute MFE's and representative for distance partitioning.
Variables compound for 2Dfold MFE folding.
Definition: 2Dfold.h:134
char * sequence
The input sequence.
Definition: 2Dfold.h:138
double temperature
Temperature used for loop contribution scaling.
Definition: params.h:77
The datastructure that contains temperature scaled energy parameters.
Definition: params.h:41
unsigned int * mm2
Maximum matching matrix, reference struct 2 disallowed.
Definition: 2Dfold.h:145
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.
unsigned int * bpdist
Matrix containing base pair distance of reference structure 1 and 2 on interval [i,j].
Definition: 2Dfold.h:153
unsigned int * referenceBPs2
Matrix containing number of basepairs of reference structure2 in interval [i,j].
Definition: 2Dfold.h:152
int do_backtrack
Flag whether to do backtracing of the structure(s) or not.
Definition: 2Dfold.h:136
char * vrna_TwoD_backtrack5(vrna_fold_compound *vc, unsigned int j, int k, int l)
Backtrack a minimum free energy structure from a 5' section of specified length.
unsigned int maxD1
Maximum allowed base pair distance to first reference.
Definition: 2Dfold.h:140