RNAlib-2.2.9

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

- File List
- Globals

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
188 struct vrna_md_s {
189 double temperature;
190 double betaScale;
191 int dangles;
215 int special_hp;
216 int noLP;
217 int noGU;
218 int noGUclosure;
219 int logML;
220 int circ;
221 int gquad;
222 int canonicalBPonly;
223 int uniq_ML;
224 int energy_set;
225 int backtrack;
226 char backtrack_type;
227 int compute_bpp;
228 char nonstandards[64];
229 int max_bp_span;
231 int min_loop_size;
235 int window_size;
236 int oldAliEn;
237 int ribo;
238 double cv_fact;
239 double nc_fact;
240 double sfact;
241 int rtype[8];
242 short alias[MAXALPHA+1];
243 int pair[MAXALPHA+1][MAXALPHA+1];
244 };
245
246
255 void
256 vrna_md_set_default(vrna_md_t *md);
257
270 void
271 vrna_md_update(vrna_md_t *md);
272
278 char *
279 vrna_md_option_string(vrna_md_t *md);
280
281 void
282 vrna_md_set_nonstandards(vrna_md_t *md, const char *ns_bases);
283
301 void
302 vrna_md_defaults_reset(vrna_md_t *md_p);
303
309 void
310 vrna_md_defaults_temperature(double T);
311
317 double
318 vrna_md_defaults_temperature_get(void);
319
327 void
328 vrna_md_defaults_betaScale(double b);
329
336 double
337 vrna_md_defaults_betaScale_get(void);
338
344 void
345 vrna_md_defaults_dangles(int d);
346
352 int
353 vrna_md_defaults_dangles_get(void);
354
360 void
361 vrna_md_defaults_special_hp(int flag);
362
368 int
369 vrna_md_defaults_special_hp_get(void);
370
376 void
377 vrna_md_defaults_noLP(int flag);
378
384 int
385 vrna_md_defaults_noLP_get(void);
386
392 void
393 vrna_md_defaults_noGU(int flag);
394
400 int
401 vrna_md_defaults_noGU_get(void);
402
408 void
409 vrna_md_defaults_noGUclosure(int flag);
410
416 int
417 vrna_md_defaults_noGUclosure_get(void);
418
424 void
425 vrna_md_defaults_logML(int flag);
426
432 int
433 vrna_md_defaults_logML_get(void);
434
440 void
441 vrna_md_defaults_circ(int flag);
442
448 int
449 vrna_md_defaults_circ_get(void);
450
456 void
457 vrna_md_defaults_gquad(int flag);
458
464 int
465 vrna_md_defaults_gquad_get(void);
466
473 void
474 vrna_md_defaults_uniq_ML(int flag);
475
481 int
482 vrna_md_defaults_uniq_ML_get(void);
483
489 void
490 vrna_md_defaults_energy_set(int e);
491
497 int
498 vrna_md_defaults_energy_set_get(void);
499
505 void
506 vrna_md_defaults_backtrack(int flag);
507
513 int
514 vrna_md_defaults_backtrack_get(void);
515
521 void
522 vrna_md_defaults_backtrack_type(char t);
523
529 char
530 vrna_md_defaults_backtrack_type_get(void);
531
537 void
538 vrna_md_defaults_compute_bpp(int flag);
539
545 int
546 vrna_md_defaults_compute_bpp_get(void);
547
553 void
554 vrna_md_defaults_max_bp_span(int span);
555
561 int
562 vrna_md_defaults_max_bp_span_get(void);
563
569 void
570 vrna_md_defaults_min_loop_size(int size);
571
577 int
578 vrna_md_defaults_min_loop_size_get(void);
579
585 void
586 vrna_md_defaults_window_size(int size);
587
593 int
594 vrna_md_defaults_window_size_get(void);
595
603 void
604 vrna_md_defaults_oldAliEn(int flag);
605
611 int
612 vrna_md_defaults_oldAliEn_get(void);
613
619 void
620 vrna_md_defaults_ribo(int flag);
621
627 int
628 vrna_md_defaults_ribo_get(void);
629
635 void
636 vrna_md_defaults_cv_fact(double factor);
637
643 double
644 vrna_md_defaults_cv_fact_get(void);
645
651 void
652 vrna_md_defaults_nc_fact(double factor);
653
659 double
660 vrna_md_defaults_nc_fact_get(void);
661
667 void
668 vrna_md_defaults_sfact(double factor);
669
675 double
676 vrna_md_defaults_sfact_get(void);
677
678 #ifdef VRNA_BACKWARD_COMPAT
679
680 #define model_detailsT vrna_md_t /* restore compatibility of struct rename */
681
682 /* BEGIN deprecated global variables: */
683
693 extern double temperature;
694
706 extern double pf_scale;
707
729 extern int dangles;
730
736 extern int tetra_loop;
737
745 extern int noLonelyPairs;
746
750 extern int noGU;
751
755 extern int no_closingGU;
756
760 extern int circ;
761
765 extern int gquad;
766
770 extern int canonicalBPonly;
771
775 extern int uniq_ML;
776
784 extern int energy_set;
785
792 extern int do_backtrack;
793
801 extern char backtrack_type;
802
810 extern char *nonstandards;
811
817 extern int max_bp_span;
818
822 extern int oldAliEn;
823
827 extern int ribo;
828
829 extern double cv_fact;
830
831 extern double nc_fact;
832
834 extern int logML;
835
836 /* END deprecated global variables: */
837
851 void
852 set_model_details(vrna_md_t *md);
853
854 char *
855 option_string(void);
856
857 #endif
858
862 #endif
vrna_md_defaults_sfact
void vrna_md_defaults_sfact(double factor)
Set the default scaling factor used to avoid under-/overflows in partition function computation...
vrna_md_s::backtrack
int backtrack
Specifies whether or not secondary structures should be backtraced.
Definition: model.h:225
vrna_md_update
void vrna_md_update(vrna_md_t *md)
Update the model details data structure.
vrna_md_defaults_noLP_get
int vrna_md_defaults_noLP_get(void)
Get default behavior for prediction of canonical secondary structures.
vrna_md_defaults_min_loop_size_get
int vrna_md_defaults_min_loop_size_get(void)
Get default minimal loop size.
vrna_md_set_default
void vrna_md_set_default(vrna_md_t *md)
Apply default model details to a provided vrna_md_t data structure.
vrna_md_defaults_sfact_get
double vrna_md_defaults_sfact_get(void)
Get the default scaling factor used to avoid under-/overflows in partition function computation...
vrna_md_defaults_max_bp_span_get
int vrna_md_defaults_max_bp_span_get(void)
Get default maximal base pair span.
vrna_md_defaults_backtrack_type_get
char vrna_md_defaults_backtrack_type_get(void)
Get default backtrack type, i.e. which DP matrix is used.
tetra_loop
int tetra_loop
Include special stabilizing energies for some tri-, tetra- and hexa-loops;.
vrna_md_s::alias
short alias[MAXALPHA+1]
alias of an integer nucleotide representation
Definition: model.h:242
vrna_md_defaults_backtrack_get
int vrna_md_defaults_backtrack_get(void)
Get default behavior for whether to backtrack secondary structures.
vrna_md_s::special_hp
int special_hp
Include special hairpin contributions for tri, tetra and hexaloops.
Definition: model.h:215
vrna_md_s::compute_bpp
int compute_bpp
Specifies whether or not backward recursions for base pair probability (bpp) computation will be perf...
Definition: model.h:227
vrna_md_defaults_circ
void vrna_md_defaults_circ(int flag)
Set default behavior whether input sequences are circularized.
vrna_md_defaults_temperature_get
double vrna_md_defaults_temperature_get(void)
Get default temperature for energy evaluation of loops.
vrna_md_defaults_window_size_get
int vrna_md_defaults_window_size_get(void)
Get default window size for sliding window structure prediction approaches.
vrna_md_defaults_noGU
void vrna_md_defaults_noGU(int flag)
Set default behavior for treatment of G-U wobble pairs.
vrna_md_defaults_betaScale
void vrna_md_defaults_betaScale(double b)
Set default scaling factor of thermodynamic temperature in Boltzmann factors.
do_backtrack
int do_backtrack
do backtracking, i.e. compute secondary structures or base pair probabilities
vrna_md_s::noLP
int noLP
Only consider canonical structures, i.e. no &#39;lonely&#39; base pairs.
Definition: model.h:216
vrna_md_defaults_max_bp_span
void vrna_md_defaults_max_bp_span(int span)
Set default maximal base pair span.
vrna_md_defaults_dangles
void vrna_md_defaults_dangles(int d)
Set default dangle model for structure prediction.
vrna_md_s::uniq_ML
int uniq_ML
Flag to ensure unique multibranch loop decomposition during folding.
Definition: model.h:223
vrna_md_defaults_oldAliEn_get
int vrna_md_defaults_oldAliEn_get(void)
Get default behavior for whether to use old energy model for comparative structure prediction...
vrna_md_s::noGU
int noGU
Do not allow GU pairs.
Definition: model.h:217
vrna_md_defaults_temperature
void vrna_md_defaults_temperature(double T)
Set default temperature for energy evaluation of loops.
vrna_md_defaults_nc_fact_get
double vrna_md_defaults_nc_fact_get(void)
vrna_md_defaults_special_hp
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.
vrna_md_s::cv_fact
double cv_fact
Covariance scaling factor for consensus structure prediction.
Definition: model.h:238
vrna_md_defaults_energy_set_get
int vrna_md_defaults_energy_set_get(void)
Get default energy set.
vrna_md_s::oldAliEn
int oldAliEn
Use old alifold energy model.
Definition: model.h:236
vrna_md_s::window_size
int window_size
Size of the sliding window for locally optimal structure predition.
Definition: model.h:235
vrna_md_defaults_ribo_get
int vrna_md_defaults_ribo_get(void)
Get default behavior for whether to use Ribosum Scoring in comparative structure prediction.
vrna_md_s::nc_fact
double nc_fact
Scaling factor to weight covariance contributions of non-canonical pairs.
Definition: model.h:239
vrna_md_s::logML
int logML
Use logarithmic scaling for multi loops.
Definition: model.h:219
vrna_md_defaults_uniq_ML
void vrna_md_defaults_uniq_ML(int flag)
Set default behavior for creating additional matrix for unique multibranch loop prediction.
vrna_md_s::max_bp_span
int max_bp_span
maximum allowed base pair span
Definition: model.h:229
vrna_md_option_string
char * vrna_md_option_string(vrna_md_t *md)
Get a corresponding commandline parameter string of the options in a vrna_md_t.
vrna_md_defaults_special_hp_get
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.
vrna_md_s::rtype
int rtype[8]
Reverse base pair type array.
Definition: model.h:241
vrna_md_defaults_circ_get
int vrna_md_defaults_circ_get(void)
Get default behavior whether input sequences are circularized.
vrna_md_defaults_reset
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...
set_model_details
void set_model_details(vrna_md_t *md)
Set default model details.
vrna_md_defaults_min_loop_size
void vrna_md_defaults_min_loop_size(int size)
Set default minimal loop size.
vrna_md_s
The data structure that contains the complete model details used throughout the calculations.
Definition: model.h:188
vrna_md_defaults_energy_set
void vrna_md_defaults_energy_set(int e)
Set default energy set.
vrna_md_s::sfact
double sfact
Scaling factor for partition function scaling.
Definition: model.h:240
vrna_md_defaults_cv_fact
void vrna_md_defaults_cv_fact(double factor)
Set the default covariance scaling factor used in comparative structure prediction.
pf_scale
double pf_scale
A scaling factor used by pf_fold() to avoid overflows.
vrna_md_defaults_logML
void vrna_md_defaults_logML(int flag)
Set default behavior recomputing free energies of multibranch loops using a logarithmic model...
vrna_md_s::gquad
int gquad
Include G-quadruplexes in structure prediction.
Definition: model.h:221
vrna_md_defaults_noLP
void vrna_md_defaults_noLP(int flag)
Set default behavior for prediction of canonical secondary structures.
MAXALPHA
#define MAXALPHA
Maximal length of alphabet.
Definition: model.h:174
vrna_md_defaults_window_size
void vrna_md_defaults_window_size(int size)
Set default window size for sliding window structure prediction approaches.
vrna_md_defaults_gquad
void vrna_md_defaults_gquad(int flag)
Set default behavior for treatment of G-Quadruplexes.
vrna_md_defaults_backtrack_type
void vrna_md_defaults_backtrack_type(char t)
Set default backtrack type, i.e. which DP matrix is used.
vrna_md_defaults_backtrack
void vrna_md_defaults_backtrack(int flag)
Set default behavior for whether to backtrack secondary structures.
vrna_md_defaults_noGU_get
int vrna_md_defaults_noGU_get(void)
Get default behavior for treatment of G-U wobble pairs.
vrna_md_s::backtrack_type
char backtrack_type
Specifies in which matrix to backtrack.
Definition: model.h:226
vrna_md_defaults_oldAliEn
void vrna_md_defaults_oldAliEn(int flag)
Set default behavior for whether to use old energy model for comparative structure prediction...
vrna_md_defaults_uniq_ML_get
int vrna_md_defaults_uniq_ML_get(void)
Get default behavior for creating additional matrix for unique multibranch loop prediction.
vrna_md_defaults_ribo
void vrna_md_defaults_ribo(int flag)
Set default behavior for whether to use Ribosum Scoring in comparative structure prediction.
vrna_md_s::ribo
int ribo
Use ribosum scoring table in alifold energy model.
Definition: model.h:237
vrna_md_defaults_compute_bpp_get
int vrna_md_defaults_compute_bpp_get(void)
Get the default behavior for whether to compute base pair probabilities after partition function comp...
vrna_md_s::pair
int pair[MAXALPHA+1][MAXALPHA+1]
Integer representation of a base pair.
Definition: model.h:243
vrna_md_s::nonstandards
char nonstandards[64]
contains allowed non standard bases
Definition: model.h:228
vrna_md_defaults_cv_fact_get
double vrna_md_defaults_cv_fact_get(void)
Get the default covariance scaling factor used in comparative structure prediction.
vrna_md_s::temperature
double temperature
The temperature used to scale the thermodynamic parameters.
Definition: model.h:189
vrna_md_s::dangles
int dangles
Specifies the dangle model used in any energy evaluation (0,1,2 or 3)
Definition: model.h:191
noLonelyPairs
int noLonelyPairs
Global switch to avoid/allow helices of length 1.
vrna_md_defaults_betaScale_get
double vrna_md_defaults_betaScale_get(void)
Get default scaling factor of thermodynamic temperature in Boltzmann factors.
vrna_md_s::circ
int circ
Assume RNA to be circular instead of linear.
Definition: model.h:220
vrna_md_defaults_gquad_get
int vrna_md_defaults_gquad_get(void)
Get default behavior for treatment of G-Quadruplexes.
vrna_md_s::canonicalBPonly
int canonicalBPonly
remove non-canonical bp&#39;s from constraint structures
Definition: model.h:222
vrna_md_defaults_compute_bpp
void vrna_md_defaults_compute_bpp(int flag)
Set the default behavior for whether to compute base pair probabilities after partition function comp...
vrna_md_defaults_nc_fact
void vrna_md_defaults_nc_fact(double factor)
vrna_md_defaults_noGUclosure
void vrna_md_defaults_noGUclosure(int flag)
Set default behavior for G-U pairs as closing pair for loops.
no_closingGU
int no_closingGU
GU allowed only inside stacks if set to 1.
vrna_md_defaults_logML_get
int vrna_md_defaults_logML_get(void)
Get default behavior recomputing free energies of multibranch loops using a logarithmic model...
vrna_md_s::noGUclosure
int noGUclosure
Do not allow loops to be closed by GU pair.
Definition: model.h:218
vrna_md_s::energy_set
int energy_set
Specifies the energy set that defines set of compatible base pairs.
Definition: model.h:224
vrna_md_s::min_loop_size
int min_loop_size
Minimum size of hairpin loops.
Definition: model.h:231
vrna_md_defaults_dangles_get
int vrna_md_defaults_dangles_get(void)
Get default dangle model for structure prediction.
vrna_md_defaults_noGUclosure_get
int vrna_md_defaults_noGUclosure_get(void)
Get default behavior for G-U pairs as closing pair for loops.
vrna_md_s::betaScale
double betaScale
A scaling factor for the thermodynamic temperature of the Boltzmann factors.
Definition: model.h:190