RNAlib-2.2.7
model.h
Go to the documentation of this file.
1 #ifndef VIENNA_RNA_PACKAGE_MODEL_H
2 #define VIENNA_RNA_PACKAGE_MODEL_H
3 
4 #ifdef DEPRECATION_WARNINGS
5 # ifdef __GNUC__
6 # define DEPRECATED(func) func __attribute__ ((deprecated))
7 # else
8 # define DEPRECATED(func) func
9 # endif
10 #else
11 # define DEPRECATED(func) func
12 #endif
13 
14 
15 /* make this interface backward compatible with RNAlib < 2.2.0 */
16 #define VRNA_BACKWARD_COMPAT
17 
26 #ifndef NBASES
27 #define NBASES 8
28 #endif
29 
31 typedef struct vrna_md_s vrna_md_t;
32 
39 #define VRNA_MODEL_DEFAULT_TEMPERATURE 37.0
40 
45 #define VRNA_MODEL_DEFAULT_PF_SCALE -1
46 
51 #define VRNA_MODEL_DEFAULT_BETA_SCALE 1.
52 
56 #define VRNA_MODEL_DEFAULT_DANGLES 2
57 
62 #define VRNA_MODEL_DEFAULT_SPECIAL_HP 1
63 
68 #define VRNA_MODEL_DEFAULT_NO_LP 0
69 
74 #define VRNA_MODEL_DEFAULT_NO_GU 0
75 
80 #define VRNA_MODEL_DEFAULT_NO_GU_CLOSURE 0
81 
86 #define VRNA_MODEL_DEFAULT_CIRC 0
87 
92 #define VRNA_MODEL_DEFAULT_GQUAD 0
93 
94 #define VRNA_MODEL_DEFAULT_CANONICAL_BP 0
95 
100 #define VRNA_MODEL_DEFAULT_UNIQ_ML 0
101 
106 #define VRNA_MODEL_DEFAULT_ENERGY_SET 0
107 
112 #define VRNA_MODEL_DEFAULT_BACKTRACK 1
113 
118 #define VRNA_MODEL_DEFAULT_BACKTRACK_TYPE 'F'
119 
124 #define VRNA_MODEL_DEFAULT_COMPUTE_BPP 1
125 
130 #define VRNA_MODEL_DEFAULT_MAX_BP_SPAN -1
131 
136 #define VRNA_MODEL_DEFAULT_WINDOW_SIZE -1
137 
142 #define VRNA_MODEL_DEFAULT_LOG_ML 0
143 
148 #define VRNA_MODEL_DEFAULT_ALI_OLD_EN 0
149 
154 #define VRNA_MODEL_DEFAULT_ALI_RIBO 0
155 
160 #define VRNA_MODEL_DEFAULT_ALI_CV_FACT 1.
161 
165 #define VRNA_MODEL_DEFAULT_ALI_NC_FACT 1.
166 
167 
168 #ifdef VRNA_BACKWARD_COMPAT
169 
170 #ifndef MAXALPHA
171 
174 #define MAXALPHA 20
175 #endif
176 
177 #endif
178 
187 struct vrna_md_s {
188  double temperature;
189  double betaScale;
190  int dangles;
215  int noLP;
216  int noGU;
218  int logML;
219  int circ;
220  int gquad;
222  int uniq_ML;
224  int backtrack;
227  char nonstandards[33];
235  int oldAliEn;
236  int ribo;
237  double cv_fact;
238  double nc_fact;
239  double sfact;
240  int rtype[8];
241  short alias[MAXALPHA+1];
242  int pair[MAXALPHA+1][MAXALPHA+1];
243 };
244 
245 
254 void
256 
269 void
271 
277 char *
279 
280 void
281 vrna_md_set_nonstandards(vrna_md_t *md, const char *ns);
282 
300 void
302 
308 void
310 
316 double
318 
326 void
328 
335 double
337 
343 void
345 
351 int
353 
359 void
361 
367 int
369 
375 void
376 vrna_md_defaults_noLP(int flag);
377 
383 int
385 
391 void
392 vrna_md_defaults_noGU(int flag);
393 
399 int
401 
407 void
409 
415 int
417 
423 void
424 vrna_md_defaults_logML(int flag);
425 
431 int
433 
439 void
440 vrna_md_defaults_circ(int flag);
441 
447 int
449 
455 void
456 vrna_md_defaults_gquad(int flag);
457 
463 int
465 
472 void
473 vrna_md_defaults_uniq_ML(int flag);
474 
480 int
482 
488 void
490 
496 int
498 
504 void
506 
512 int
514 
520 void
522 
528 char
530 
536 void
538 
544 int
546 
552 void
554 
560 int
562 
568 void
570 
576 int
578 
584 void
586 
592 int
594 
602 void
603 vrna_md_defaults_oldAliEn(int flag);
604 
610 int
612 
618 void
619 vrna_md_defaults_ribo(int flag);
620 
626 int
628 
634 void
635 vrna_md_defaults_cv_fact(double factor);
636 
642 double
644 
650 void
651 vrna_md_defaults_nc_fact(double factor);
652 
658 double
660 
666 void
667 vrna_md_defaults_sfact(double factor);
668 
674 double
676 
677 #ifdef VRNA_BACKWARD_COMPAT
678 
679 #define model_detailsT vrna_md_t /* restore compatibility of struct rename */
680 
681 /* BEGIN deprecated global variables: */
682 
692 extern double temperature;
693 
705 extern double pf_scale;
706 
728 extern int dangles;
729 
735 extern int tetra_loop;
736 
744 extern int noLonelyPairs;
745 
749 extern int noGU;
750 
754 extern int no_closingGU;
755 
759 extern int circ;
760 
764 extern int gquad;
765 
769 extern int canonicalBPonly;
770 
774 extern int uniq_ML;
775 
783 extern int energy_set;
784 
791 extern int do_backtrack;
792 
800 extern char backtrack_type;
801 
809 extern char *nonstandards;
810 
816 extern int max_bp_span;
817 
821 extern int oldAliEn;
822 
826 extern int ribo;
827 
828 extern double cv_fact;
829 
830 extern double nc_fact;
831 
833 extern int logML;
834 
835 /* END deprecated global variables: */
836 
850 void
852 
853 char *
854 option_string(void);
855 
856 #endif
857 
861 #endif
int energy_set
0 = BP; 1=any mit GC; 2=any mit AU-parameter
void vrna_md_defaults_sfact(double factor)
Set the default scaling factor used to avoid under-/overflows in partition function computation...
int backtrack
Specifies whether or not secondary structures should be backtraced.
Definition: model.h:224
void vrna_md_update(vrna_md_t *md)
Update the model details data structure.
int vrna_md_defaults_noLP_get(void)
Get default behavior for prediction of canonical secondary structures.
int vrna_md_defaults_min_loop_size_get(void)
Get default minimal loop size.
void vrna_md_set_default(vrna_md_t *md)
Apply default model details to a provided vrna_md_t data structure.
double vrna_md_defaults_sfact_get(void)
Get the default scaling factor used to avoid under-/overflows in partition function computation...
int vrna_md_defaults_max_bp_span_get(void)
Get default maximal base pair span.
char nonstandards[33]
contains allowed non standard bases
Definition: model.h:227
char vrna_md_defaults_backtrack_type_get(void)
Get default backtrack type, i.e. which DP matrix is used.
int tetra_loop
Include special stabilizing energies for some tri-, tetra- and hexa-loops;.
double cv_fact
This variable controls the weight of the covariance term in the energy function of alignment folding ...
short alias[MAXALPHA+1]
alias of an integer nucleotide representation
Definition: model.h:241
int vrna_md_defaults_backtrack_get(void)
Get default behavior for whether to backtrack secondary structures.
char backtrack_type
A backtrack array marker for inverse_fold()
int special_hp
Include special hairpin contributions for tri, tetra and hexaloops.
Definition: model.h:214
int compute_bpp
Specifies whether or not backward recursions for base pair probability (bpp) computation will be perf...
Definition: model.h:226
void vrna_md_defaults_circ(int flag)
Set default behavior whether input sequences are circularized.
double vrna_md_defaults_temperature_get(void)
Get default temperature for energy evaluation of loops.
int logML
if nonzero use logarithmic ML energy in energy_of_struct
int vrna_md_defaults_window_size_get(void)
Get default window size for sliding window structure prediction approaches.
void vrna_md_defaults_noGU(int flag)
Set default behavior for treatment of G-U wobble pairs.
void vrna_md_defaults_betaScale(double b)
Set default scaling factor of thermodynamic temperature in Boltzmann factors.
int noGU
Global switch to forbid/allow GU base pairs at all.
double temperature
Rescale energy parameters to a temperature in degC.
char * nonstandards
contains allowed non standard base pairs
int ribo
use ribosum matrices
int do_backtrack
do backtracking, i.e. compute secondary structures or base pair probabilities
int noLP
Only consider canonical structures, i.e. no 'lonely' base pairs.
Definition: model.h:215
void vrna_md_defaults_max_bp_span(int span)
Set default maximal base pair span.
void vrna_md_defaults_dangles(int d)
Set default dangle model for structure prediction.
int uniq_ML
Flag to ensure unique multibranch loop decomposition during folding.
Definition: model.h:222
int vrna_md_defaults_oldAliEn_get(void)
Get default behavior for whether to use old energy model for comparative structure prediction...
int noGU
Do not allow GU pairs.
Definition: model.h:216
void vrna_md_defaults_temperature(double T)
Set default temperature for energy evaluation of loops.
double vrna_md_defaults_nc_fact_get(void)
void vrna_md_defaults_special_hp(int flag)
Set default behavior for lookup of tabulated free energies for special hairpin loops, such as Tri-, Tetra-, or Hexa-loops.
double cv_fact
Covariance scaling factor for consensus structure prediction.
Definition: model.h:237
double nc_fact
This variable controls the magnitude of the penalty for non-compatible sequences in the covariance te...
int vrna_md_defaults_energy_set_get(void)
Get default energy set.
int oldAliEn
Use old alifold energy model.
Definition: model.h:235
int window_size
Size of the sliding window for locally optimal structure predition.
Definition: model.h:234
int vrna_md_defaults_ribo_get(void)
Get default behavior for whether to use Ribosum Scoring in comparative structure prediction.
int logML
Use logarithmic scaling for multi loops.
Definition: model.h:218
void vrna_md_defaults_uniq_ML(int flag)
Set default behavior for creating additional matrix for unique multibranch loop prediction.
int max_bp_span
maximum allowed base pair span
Definition: model.h:228
char * vrna_md_option_string(vrna_md_t *md)
Get a corresponding commandline parameter string of the options in a vrna_md_t.
int vrna_md_defaults_special_hp_get(void)
Get default behavior for lookup of tabulated free energies for special hairpin loops, such as Tri-, Tetra-, or Hexa-loops.
int uniq_ML
do ML decomposition uniquely (for subopt)
int rtype[8]
Reverse base pair type array.
Definition: model.h:240
int vrna_md_defaults_circ_get(void)
Get default behavior whether input sequences are circularized.
void vrna_md_defaults_reset(vrna_md_t *md_p)
Reset the global default model details to a specific set of parameters, or their initial values...
void set_model_details(vrna_md_t *md)
Set default model details.
void vrna_md_defaults_min_loop_size(int size)
Set default minimal loop size.
The data structure that contains the complete model details used throughout the calculations.
Definition: model.h:187
void vrna_md_defaults_energy_set(int e)
Set default energy set.
double sfact
Scaling factor for partition function scaling.
Definition: model.h:239
void vrna_md_defaults_cv_fact(double factor)
Set the default covariance scaling factor used in comparative structure prediction.
double pf_scale
A scaling factor used by pf_fold() to avoid overflows.
void vrna_md_defaults_logML(int flag)
Set default behavior recomputing free energies of multibranch loops using a logarithmic model...
int gquad
Include G-quadruplexes in structure prediction.
Definition: model.h:220
void vrna_md_defaults_noLP(int flag)
Set default behavior for prediction of canonical secondary structures.
#define MAXALPHA
Maximal length of alphabet.
Definition: model.h:174
void vrna_md_defaults_window_size(int size)
Set default window size for sliding window structure prediction approaches.
void vrna_md_defaults_gquad(int flag)
Set default behavior for treatment of G-Quadruplexes.
void vrna_md_defaults_backtrack_type(char t)
Set default backtrack type, i.e. which DP matrix is used.
int oldAliEn
use old alifold energies (with gaps)
void vrna_md_defaults_backtrack(int flag)
Set default behavior for whether to backtrack secondary structures.
int vrna_md_defaults_noGU_get(void)
Get default behavior for treatment of G-U wobble pairs.
int canonicalBPonly
char backtrack_type
Specifies in which matrix to backtrack.
Definition: model.h:225
void vrna_md_defaults_oldAliEn(int flag)
Set default behavior for whether to use old energy model for comparative structure prediction...
int vrna_md_defaults_uniq_ML_get(void)
Get default behavior for creating additional matrix for unique multibranch loop prediction.
int gquad
Allow G-quadruplex formation.
void vrna_md_defaults_ribo(int flag)
Set default behavior for whether to use Ribosum Scoring in comparative structure prediction.
int ribo
Use ribosum scoring table in alifold energy model.
Definition: model.h:236
int vrna_md_defaults_compute_bpp_get(void)
Get the default behavior for whether to compute base pair probabilities after partition function comp...
int pair[MAXALPHA+1][MAXALPHA+1]
Integer representation of a base pair.
Definition: model.h:242
double vrna_md_defaults_cv_fact_get(void)
Get the default covariance scaling factor used in comparative structure prediction.
double temperature
The temperature used to scale the thermodynamic parameters.
Definition: model.h:188
int dangles
Specifies the dangle model used in any energy evaluation (0,1,2 or 3)
Definition: model.h:190
int noLonelyPairs
Global switch to avoid/allow helices of length 1.
double vrna_md_defaults_betaScale_get(void)
Get default scaling factor of thermodynamic temperature in Boltzmann factors.
int circ
Assume RNA to be circular instead of linear.
Definition: model.h:219
int vrna_md_defaults_gquad_get(void)
Get default behavior for treatment of G-Quadruplexes.
int canonicalBPonly
remove non-canonical bp's from constraint structures
Definition: model.h:221
int max_bp_span
Maximum allowed base pair span.
void vrna_md_defaults_compute_bpp(int flag)
Set the default behavior for whether to compute base pair probabilities after partition function comp...
void vrna_md_defaults_nc_fact(double factor)
void vrna_md_defaults_noGUclosure(int flag)
Set default behavior for G-U pairs as closing pair for loops.
int no_closingGU
GU allowed only inside stacks if set to 1.
int vrna_md_defaults_logML_get(void)
Get default behavior recomputing free energies of multibranch loops using a logarithmic model...
int noGUclosure
Do not allow loops to be closed by GU pair.
Definition: model.h:217
int circ
backward compatibility variable.. this does not effect anything
int energy_set
Specifies the energy set that defines set of compatible base pairs.
Definition: model.h:223
int dangles
Switch the energy model for dangling end contributions (0, 1, 2, 3)
int min_loop_size
Minimum size of hairpin loops.
Definition: model.h:230
int vrna_md_defaults_dangles_get(void)
Get default dangle model for structure prediction.
int vrna_md_defaults_noGUclosure_get(void)
Get default behavior for G-U pairs as closing pair for loops.
double betaScale
A scaling factor for the thermodynamic temperature of the Boltzmann factors.
Definition: model.h:189