RNAlib-2.2.9

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

- File List
- Globals

2Dpfold.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_PF_FOLD_H
8 #define VIENNA_RNA_PACKAGE_TWO_D_PF_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
33 #include <ViennaRNA/data_structures.h>
34
47 typedef struct vrna_sol_TwoD_pf_t{
48 int k;
49 int l;
50 FLT_OR_DBL q;
51 } vrna_sol_TwoD_pf_t;
52
75 vrna_sol_TwoD_pf_t *
76 vrna_pf_TwoD(vrna_fold_compound_t *vc,
77 int maxDistance1,
78 int maxDistance2);
79 /* End of group kl_neighborhood_pf */
81
105 char *
106 vrna_pbacktrack_TwoD( vrna_fold_compound_t *vc,
107 int d1,
108 int d2);
109
129 char *
130 vrna_pbacktrack5_TwoD(vrna_fold_compound_t *vc,
131 int d1,
132 int d2,
133 unsigned int length);
134 /* End of group kl_neighborhood_stochbt */
138
139
140 #ifdef VRNA_BACKWARD_COMPAT
141
142 #define TwoDpfold_solution vrna_sol_TwoD_pf_t /* restore compatibility of struct rename */
143
151 typedef struct{
152
153 unsigned int alloc;
154 char *ptype;
155 char *sequence;
156 short *S, *S1;
157 unsigned int maxD1;
158 unsigned int maxD2;
160 double temperature; /* temperature in last call to scale_pf_params */
161 double init_temp; /* temperature in last call to scale_pf_params */
162 FLT_OR_DBL *scale;
163 FLT_OR_DBL pf_scale;
164 vrna_exp_param_t *pf_params; /* holds all [unscaled] pf parameters */
165
166 int *my_iindx;
167 int *jindx;
169 short *reference_pt1;
170 short *reference_pt2;
171
172 unsigned int *referenceBPs1;
173 unsigned int *referenceBPs2;
174 unsigned int *bpdist;
176 unsigned int *mm1;
177 unsigned int *mm2;
179 int circ;
180 int dangles;
181 unsigned int seq_length;
182
183 FLT_OR_DBL ***Q;
184 FLT_OR_DBL ***Q_B;
185 FLT_OR_DBL ***Q_M;
186 FLT_OR_DBL ***Q_M1;
187 FLT_OR_DBL ***Q_M2;
188
189 FLT_OR_DBL **Q_c;
190 FLT_OR_DBL **Q_cH;
191 FLT_OR_DBL **Q_cI;
192 FLT_OR_DBL **Q_cM;
193
194 int **l_min_values;
195 int **l_max_values;
196 int *k_min_values;
197 int *k_max_values;
198
199 int **l_min_values_b;
200 int **l_max_values_b;
201 int *k_min_values_b;
202 int *k_max_values_b;
203
204 int **l_min_values_m;
205 int **l_max_values_m;
206 int *k_min_values_m;
207 int *k_max_values_m;
208
209 int **l_min_values_m1;
210 int **l_max_values_m1;
211 int *k_min_values_m1;
212 int *k_max_values_m1;
213
214 int **l_min_values_m2;
215 int **l_max_values_m2;
216 int *k_min_values_m2;
217 int *k_max_values_m2;
218
219 int *l_min_values_qc;
220 int *l_max_values_qc;
221 int k_min_values_qc;
222 int k_max_values_qc;
223
224 int *l_min_values_qcH;
225 int *l_max_values_qcH;
226 int k_min_values_qcH;
227 int k_max_values_qcH;
228
229 int *l_min_values_qcI;
230 int *l_max_values_qcI;
231 int k_min_values_qcI;
232 int k_max_values_qcI;
233
234 int *l_min_values_qcM;
235 int *l_max_values_qcM;
236 int k_min_values_qcM;
237 int k_max_values_qcM;
238
239 /* auxilary arrays for remaining set of coarse graining (k,l) > (k_max, l_max) */
240 FLT_OR_DBL *Q_rem;
241 FLT_OR_DBL *Q_B_rem;
242 FLT_OR_DBL *Q_M_rem;
243 FLT_OR_DBL *Q_M1_rem;
244 FLT_OR_DBL *Q_M2_rem;
245
246 FLT_OR_DBL Q_c_rem;
247 FLT_OR_DBL Q_cH_rem;
248 FLT_OR_DBL Q_cI_rem;
249 FLT_OR_DBL Q_cM_rem;
250
251 vrna_fold_compound_t *compatibility;
252 } TwoDpfold_vars;
253
272 DEPRECATED(TwoDpfold_vars *
273 get_TwoDpfold_variables(const char *seq,
274 const char *structure1,
275 char *structure2,
276 int circ));
277
291 DEPRECATED(void
292 destroy_TwoDpfold_variables(TwoDpfold_vars *vars));
293
318 DEPRECATED(TwoDpfold_solution *
319 TwoDpfoldList(TwoDpfold_vars *vars,
320 int maxDistance1,
321 int maxDistance2));
322
344 DEPRECATED(char *
345 TwoDpfold_pbacktrack( TwoDpfold_vars *vars,
346 int d1,
347 int d2));
348
372 DEPRECATED(char *
373 TwoDpfold_pbacktrack5(TwoDpfold_vars *vars,
374 int d1,
375 int d2,
376 unsigned int length));
377
383 DEPRECATED(FLT_OR_DBL **TwoDpfold(TwoDpfold_vars *our_variables,
384 int maxDistance1,
385 int maxDistance2));
386
392 DEPRECATED(FLT_OR_DBL **TwoDpfold_circ(
393 TwoDpfold_vars *our_variables,
394 int maxDistance1,
395 int maxDistance2));
396
397 #endif
398
399 #endif
FLT_OR_DBL
double FLT_OR_DBL
Typename for floating point number in partition function computations.
Definition: data_structures.h:39
vrna_fc_s
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:424
TwoDpfold_vars::ptype
char * ptype
Precomputed array of pair types.
Definition: 2Dpfold.h:154
vrna_sol_TwoD_pf_t
Solution element returned from vrna_pf_TwoD()
Definition: 2Dpfold.h:47
temperature
double temperature
Rescale energy parameters to a temperature in degC.
TwoDpfold_vars::referenceBPs1
unsigned int * referenceBPs1
Matrix containing number of basepairs of reference structure1 in interval [i,j].
Definition: 2Dpfold.h:172
TwoDpfold_vars::maxD2
unsigned int maxD2
Maximum allowed base pair distance to second reference.
Definition: 2Dpfold.h:158
TwoDpfold_vars::my_iindx
int * my_iindx
Index for moving in quadratic distancy dimensions.
Definition: 2Dpfold.h:166
vrna_sol_TwoD_pf_t::q
FLT_OR_DBL q
partition function
Definition: 2Dpfold.h:50
get_TwoDpfold_variables
TwoDpfold_vars * get_TwoDpfold_variables(const char *seq, const char *structure1, char *structure2, int circ)
Get a datastructure containing all necessary attributes and global folding switches.
data_structures.h
TwoDpfold_pbacktrack5
char * TwoDpfold_pbacktrack5(TwoDpfold_vars *vars, int d1, int d2, unsigned int length)
Sample secondary structure representatives with a specified length from a set of distance classes acc...
vrna_exp_param_s
The datastructure that contains temperature scaled Boltzmann weights of the energy parameters...
Definition: params.h:94
pf_scale
double pf_scale
A scaling factor used by pf_fold() to avoid overflows.
TwoDpfold_vars::bpdist
unsigned int * bpdist
Matrix containing base pair distance of reference structure 1 and 2 on interval [i,j].
Definition: 2Dpfold.h:174
destroy_TwoDpfold_variables
void destroy_TwoDpfold_variables(TwoDpfold_vars *vars)
Free all memory occupied by a TwoDpfold_vars datastructure.
TwoDpfold_vars::maxD1
unsigned int maxD1
Maximum allowed base pair distance to first reference.
Definition: 2Dpfold.h:157
TwoDpfold_pbacktrack
char * TwoDpfold_pbacktrack(TwoDpfold_vars *vars, int d1, int d2)
Sample secondary structure representatives from a set of distance classes according to their Boltzman...
vrna_sol_TwoD_pf_t
struct vrna_sol_TwoD_pf_t vrna_sol_TwoD_pf_t
Solution element returned from vrna_pf_TwoD()
vrna_sol_TwoD_pf_t::l
int l
Distance to second reference.
Definition: 2Dpfold.h:49
TwoDpfold_vars::mm1
unsigned int * mm1
Maximum matching matrix, reference struct 1 disallowed.
Definition: 2Dpfold.h:176
vrna_pbacktrack5_TwoD
char * vrna_pbacktrack5_TwoD(vrna_fold_compound_t *vc, int d1, int d2, unsigned int length)
Sample secondary structure representatives with a specified length from a set of distance classes acc...
TwoDpfoldList
vrna_sol_TwoD_pf_t * TwoDpfoldList(TwoDpfold_vars *vars, int maxDistance1, int maxDistance2)
Compute the partition function for all distance classes.
TwoDpfold_vars::jindx
int * jindx
Index for moving in the triangular matrix qm1.
Definition: 2Dpfold.h:167
vrna_pbacktrack_TwoD
char * vrna_pbacktrack_TwoD(vrna_fold_compound_t *vc, int d1, int d2)
Sample secondary structure representatives from a set of distance classes according to their Boltzman...
TwoDpfold_vars::S1
short * S1
The input sequences in numeric form.
Definition: 2Dpfold.h:156
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)
TwoDpfold_vars::sequence
char * sequence
The input sequence.
Definition: 2Dpfold.h:155
vrna_pf_TwoD
vrna_sol_TwoD_pf_t * vrna_pf_TwoD(vrna_fold_compound_t *vc, int maxDistance1, int maxDistance2)
Compute the partition function for all distance classes.
TwoDpfold_vars::mm2
unsigned int * mm2
Maximum matching matrix, reference struct 2 disallowed.
Definition: 2Dpfold.h:177
TwoDpfold_vars::referenceBPs2
unsigned int * referenceBPs2
Matrix containing number of basepairs of reference structure2 in interval [i,j].
Definition: 2Dpfold.h:173
vrna_sol_TwoD_pf_t::k
int k
Distance to first reference.
Definition: 2Dpfold.h:48
TwoDpfold_vars
Variables compound for 2Dfold partition function folding.
Definition: 2Dpfold.h:151