RNAlib-2.2.7
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 
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;
68 
69 
70 
100  int distance1,
101  int distance2);
102 
121 char *
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{
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
286 
312 DEPRECATED(TwoDfold_solution *
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
Solution element returned from vrna_mfe_TwoD()
Definition: 2Dfold.h:62
struct TwoDfold_vars TwoDfold_vars
Variables compound for 2Dfold MFE folding.
unsigned int * mm2
Maximum matching matrix, reference struct 2 disallowed.
Definition: 2Dfold.h:149
Variables compound for 2Dfold MFE folding.
Definition: 2Dfold.h:138
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:390
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.
The datastructure that contains temperature scaled energy parameters.
Definition: params.h:50
unsigned int * mm1
Maximum matching matrix, reference struct 1 disallowed.
Definition: 2Dfold.h:148
void destroy_TwoDfold_variables(TwoDfold_vars *our_variables)
Destroy a TwoDfold_vars datastructure without memory loss.
int l
Distance to second reference.
Definition: 2Dfold.h:64
char * s
MFE representative structure in dot-bracket notation.
Definition: 2Dfold.h:66
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' section of specified length.
int do_backtrack
Flag whether to do backtracing of the structure(s) or not.
Definition: 2Dfold.h:140
unsigned int * referenceBPs2
Matrix containing number of basepairs of reference structure2 in interval [i,j].
Definition: 2Dfold.h:156
unsigned int * referenceBPs1
Matrix containing number of basepairs of reference structure1 in interval [i,j].
Definition: 2Dfold.h:155
int * my_iindx
Index for moving in quadratic distancy dimensions.
Definition: 2Dfold.h:151
unsigned int maxD1
Maximum allowed base pair distance to first reference.
Definition: 2Dfold.h:144
vrna_sol_TwoD_t * TwoDfoldList(TwoDfold_vars *vars, int distance1, int distance2)
Compute MFE's and representative for distance partitioning.
struct vrna_sol_TwoD_t vrna_sol_TwoD_t
Solution element returned from vrna_mfe_TwoD()
int k
Distance to first reference.
Definition: 2Dfold.h:63
vrna_sol_TwoD_t * vrna_mfe_TwoD(vrna_fold_compound_t *vc, int distance1, int distance2)
Compute MFE's and representative for distance partitioning.
char * ptype
Precomputed array of pair types.
Definition: 2Dfold.h:141
vrna_param_t * P
Precomputed energy parameters and model details.
Definition: 2Dfold.h:139
short * S1
The input sequences in numeric form.
Definition: 2Dfold.h:143
char * sequence
The input sequence.
Definition: 2Dfold.h:142
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.
float en
Free energy in kcal/mol.
Definition: 2Dfold.h:65
unsigned int maxD2
Maximum allowed base pair distance to second reference.
Definition: 2Dfold.h:145
int circ
backward compatibility variable.. this does not effect anything
unsigned int * bpdist
Matrix containing base pair distance of reference structure 1 and 2 on interval [i,j].
Definition: 2Dfold.h:157