RNAlib-2.4.4
model.h
Go to the documentation of this file.
1 #ifndef VIENNA_RNA_PACKAGE_MODEL_H
2 #define VIENNA_RNA_PACKAGE_MODEL_H
3 
17 #ifndef NBASES
18 #define NBASES 8
19 #endif
20 
22 typedef struct vrna_md_s vrna_md_t;
23 
30 #define VRNA_MODEL_DEFAULT_TEMPERATURE 37.0
31 
36 #define VRNA_MODEL_DEFAULT_PF_SCALE -1
37 
42 #define VRNA_MODEL_DEFAULT_BETA_SCALE 1.
43 
47 #define VRNA_MODEL_DEFAULT_DANGLES 2
48 
53 #define VRNA_MODEL_DEFAULT_SPECIAL_HP 1
54 
59 #define VRNA_MODEL_DEFAULT_NO_LP 0
60 
65 #define VRNA_MODEL_DEFAULT_NO_GU 0
66 
71 #define VRNA_MODEL_DEFAULT_NO_GU_CLOSURE 0
72 
77 #define VRNA_MODEL_DEFAULT_CIRC 0
78 
83 #define VRNA_MODEL_DEFAULT_GQUAD 0
84 
89 #define VRNA_MODEL_DEFAULT_UNIQ_ML 0
90 
95 #define VRNA_MODEL_DEFAULT_ENERGY_SET 0
96 
101 #define VRNA_MODEL_DEFAULT_BACKTRACK 1
102 
107 #define VRNA_MODEL_DEFAULT_BACKTRACK_TYPE 'F'
108 
113 #define VRNA_MODEL_DEFAULT_COMPUTE_BPP 1
114 
119 #define VRNA_MODEL_DEFAULT_MAX_BP_SPAN -1
120 
125 #define VRNA_MODEL_DEFAULT_WINDOW_SIZE -1
126 
131 #define VRNA_MODEL_DEFAULT_LOG_ML 0
132 
137 #define VRNA_MODEL_DEFAULT_ALI_OLD_EN 0
138 
143 #define VRNA_MODEL_DEFAULT_ALI_RIBO 0
144 
149 #define VRNA_MODEL_DEFAULT_ALI_CV_FACT 1.
150 
154 #define VRNA_MODEL_DEFAULT_ALI_NC_FACT 1.
155 
156 
157 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
158 
159 #ifndef MAXALPHA
160 
163 #define MAXALPHA 20
164 #endif
165 
166 #endif
167 
177 struct vrna_md_s {
178  double temperature;
179  double betaScale;
180  int dangles;
205  int noLP;
206  int noGU;
208  int logML;
209  int circ;
210  int gquad;
211  int uniq_ML;
213  int backtrack;
216  char nonstandards[64];
224  int oldAliEn;
225  int ribo;
226  double cv_fact;
227  double nc_fact;
228  double sfact;
229  int rtype[8];
230  short alias[MAXALPHA + 1];
231  int pair[MAXALPHA + 1][MAXALPHA + 1];
232 };
233 
234 
243 void
245 
246 
259 void
261 
262 
273 vrna_md_t *
274 vrna_md_copy(vrna_md_t *md_to,
275  const vrna_md_t *md_from);
276 
277 
283 char *
285 
286 
287 void
288 vrna_md_set_nonstandards(vrna_md_t *md,
289  const char *ns_bases);
290 
291 
309 void
311 
312 
318 void
320 
321 
327 double
329 
330 
338 void
340 
341 
348 double
350 
351 
357 void
359 
360 
366 int
368 
369 
375 void
377 
378 
384 int
386 
387 
393 void
394 vrna_md_defaults_noLP(int flag);
395 
396 
402 int
404 
405 
411 void
412 vrna_md_defaults_noGU(int flag);
413 
414 
420 int
422 
423 
429 void
431 
432 
438 int
440 
441 
447 void
448 vrna_md_defaults_logML(int flag);
449 
450 
456 int
458 
459 
465 void
466 vrna_md_defaults_circ(int flag);
467 
468 
474 int
476 
477 
483 void
484 vrna_md_defaults_gquad(int flag);
485 
486 
492 int
494 
495 
502 void
503 vrna_md_defaults_uniq_ML(int flag);
504 
505 
511 int
513 
514 
520 void
522 
523 
529 int
531 
532 
538 void
540 
541 
547 int
549 
550 
556 void
558 
559 
565 char
567 
568 
574 void
576 
577 
583 int
585 
586 
592 void
594 
595 
601 int
603 
604 
610 void
612 
613 
619 int
621 
622 
628 void
630 
631 
637 int
639 
640 
648 void
649 vrna_md_defaults_oldAliEn(int flag);
650 
651 
657 int
659 
660 
666 void
667 vrna_md_defaults_ribo(int flag);
668 
669 
675 int
677 
678 
684 void
685 vrna_md_defaults_cv_fact(double factor);
686 
687 
693 double
695 
696 
702 void
703 vrna_md_defaults_nc_fact(double factor);
704 
705 
711 double
713 
714 
720 void
721 vrna_md_defaults_sfact(double factor);
722 
723 
729 double
731 
732 
733 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
734 
735 #define model_detailsT vrna_md_t /* restore compatibility of struct rename */
736 
737 /* BEGIN deprecated global variables: */
738 
748 extern double temperature;
749 
761 extern double pf_scale;
762 
784 extern int dangles;
785 
791 extern int tetra_loop;
792 
800 extern int noLonelyPairs;
801 
805 extern int noGU;
806 
810 extern int no_closingGU;
811 
815 extern int circ;
816 
820 extern int gquad;
821 
825 extern int uniq_ML;
826 
834 extern int energy_set;
835 
842 extern int do_backtrack;
843 
851 extern char backtrack_type;
852 
860 extern char *nonstandards;
861 
867 extern int max_bp_span;
868 
872 extern int oldAliEn;
873 
877 extern int ribo;
878 
879 extern double cv_fact;
880 
881 extern double nc_fact;
882 
884 extern int logML;
885 
886 /* END deprecated global variables: */
887 
901 void
903 
904 
905 char *
906 option_string(void);
907 
908 
909 #endif
910 
914 #endif
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:213
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 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;.
short alias[MAXALPHA+1]
alias of an integer nucleotide representation
Definition: model.h:230
int vrna_md_defaults_backtrack_get(void)
Get default behavior for whether to backtrack secondary structures.
int special_hp
Include special hairpin contributions for tri, tetra and hexaloops.
Definition: model.h:204
int compute_bpp
Specifies whether or not backward recursions for base pair probability (bpp) computation will be perf...
Definition: model.h:215
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 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 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:205
vrna_md_t * vrna_md_copy(vrna_md_t *md_to, const vrna_md_t *md_from)
Copy/Clone a vrna_md_t model.
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 multi-branch loop decomposition during folding.
Definition: model.h:211
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:206
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
Co-variance scaling factor for consensus structure prediction.
Definition: model.h:226
int vrna_md_defaults_energy_set_get(void)
Get default energy set.
int oldAliEn
Use old alifold energy model.
Definition: model.h:224
int window_size
Size of the sliding window for locally optimal structure prediction.
Definition: model.h:223
int vrna_md_defaults_ribo_get(void)
Get default behavior for whether to use Ribosum Scoring in comparative structure prediction.
double nc_fact
Scaling factor to weight co-variance contributions of non-canonical pairs.
Definition: model.h:227
int logML
Use logarithmic scaling for multiloops.
Definition: model.h:208
void vrna_md_defaults_uniq_ML(int flag)
Set default behavior for creating additional matrix for unique multi-branch loop prediction.
int max_bp_span
maximum allowed base pair span
Definition: model.h:217
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 rtype[8]
Reverse base pair type array.
Definition: model.h:229
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:177
void vrna_md_defaults_energy_set(int e)
Set default energy set.
double sfact
Scaling factor for partition function scaling.
Definition: model.h:228
void vrna_md_defaults_cv_fact(double factor)
Set the default co-variance 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 multi-branch loops using a logarithmic model...
int gquad
Include G-quadruplexes in structure prediction.
Definition: model.h:210
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:163
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.
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.
char backtrack_type
Specifies in which matrix to backtrack.
Definition: model.h:214
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 multi-branch loop prediction.
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:225
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:231
char nonstandards[64]
contains allowed non standard bases
Definition: model.h:216
double vrna_md_defaults_cv_fact_get(void)
Get the default co-variance scaling factor used in comparative structure prediction.
double temperature
The temperature used to scale the thermodynamic parameters.
Definition: model.h:178
int dangles
Specifies the dangle model used in any energy evaluation (0,1,2 or 3)
Definition: model.h:180
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:209
int vrna_md_defaults_gquad_get(void)
Get default behavior for treatment of G-Quadruplexes.
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 multi-branch loops using a logarithmic model...
int noGUclosure
Do not allow loops to be closed by GU pair.
Definition: model.h:207
int energy_set
Specifies the energy set that defines set of compatible base pairs.
Definition: model.h:212
int min_loop_size
Minimum size of hairpin loops.
Definition: model.h:219
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:179