RNAlib-2.3.1
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 
29 #ifndef NBASES
30 #define NBASES 8
31 #endif
32 
34 typedef struct vrna_md_s vrna_md_t;
35 
42 #define VRNA_MODEL_DEFAULT_TEMPERATURE 37.0
43 
48 #define VRNA_MODEL_DEFAULT_PF_SCALE -1
49 
54 #define VRNA_MODEL_DEFAULT_BETA_SCALE 1.
55 
59 #define VRNA_MODEL_DEFAULT_DANGLES 2
60 
65 #define VRNA_MODEL_DEFAULT_SPECIAL_HP 1
66 
71 #define VRNA_MODEL_DEFAULT_NO_LP 0
72 
77 #define VRNA_MODEL_DEFAULT_NO_GU 0
78 
83 #define VRNA_MODEL_DEFAULT_NO_GU_CLOSURE 0
84 
89 #define VRNA_MODEL_DEFAULT_CIRC 0
90 
95 #define VRNA_MODEL_DEFAULT_GQUAD 0
96 
97 #define VRNA_MODEL_DEFAULT_CANONICAL_BP 0
98 
103 #define VRNA_MODEL_DEFAULT_UNIQ_ML 0
104 
109 #define VRNA_MODEL_DEFAULT_ENERGY_SET 0
110 
115 #define VRNA_MODEL_DEFAULT_BACKTRACK 1
116 
121 #define VRNA_MODEL_DEFAULT_BACKTRACK_TYPE 'F'
122 
127 #define VRNA_MODEL_DEFAULT_COMPUTE_BPP 1
128 
133 #define VRNA_MODEL_DEFAULT_MAX_BP_SPAN -1
134 
139 #define VRNA_MODEL_DEFAULT_WINDOW_SIZE -1
140 
145 #define VRNA_MODEL_DEFAULT_LOG_ML 0
146 
151 #define VRNA_MODEL_DEFAULT_ALI_OLD_EN 0
152 
157 #define VRNA_MODEL_DEFAULT_ALI_RIBO 0
158 
163 #define VRNA_MODEL_DEFAULT_ALI_CV_FACT 1.
164 
168 #define VRNA_MODEL_DEFAULT_ALI_NC_FACT 1.
169 
170 
171 #ifdef VRNA_BACKWARD_COMPAT
172 
173 #ifndef MAXALPHA
174 
177 #define MAXALPHA 20
178 #endif
179 
180 #endif
181 
191 struct vrna_md_s {
192  double temperature;
193  double betaScale;
194  int dangles;
219  int noLP;
220  int noGU;
222  int logML;
223  int circ;
224  int gquad;
226  int uniq_ML;
228  int backtrack;
231  char nonstandards[64];
239  int oldAliEn;
240  int ribo;
241  double cv_fact;
242  double nc_fact;
243  double sfact;
244  int rtype[8];
245  short alias[MAXALPHA+1];
246  int pair[MAXALPHA+1][MAXALPHA+1];
247 };
248 
249 
258 void
260 
273 void
275 
286 vrna_md_t *
287 vrna_md_copy( vrna_md_t *md_to,
288  const vrna_md_t *md_from);
289 
295 char *
297 
298 void
299 vrna_md_set_nonstandards(vrna_md_t *md, const char *ns_bases);
300 
318 void
320 
326 void
328 
334 double
336 
344 void
346 
353 double
355 
361 void
363 
369 int
371 
377 void
379 
385 int
387 
393 void
394 vrna_md_defaults_noLP(int flag);
395 
401 int
403 
409 void
410 vrna_md_defaults_noGU(int flag);
411 
417 int
419 
425 void
427 
433 int
435 
441 void
442 vrna_md_defaults_logML(int flag);
443 
449 int
451 
457 void
458 vrna_md_defaults_circ(int flag);
459 
465 int
467 
473 void
474 vrna_md_defaults_gquad(int flag);
475 
481 int
483 
490 void
491 vrna_md_defaults_uniq_ML(int flag);
492 
498 int
500 
506 void
508 
514 int
516 
522 void
524 
530 int
532 
538 void
540 
546 char
548 
554 void
556 
562 int
564 
570 void
572 
578 int
580 
586 void
588 
594 int
596 
602 void
604 
610 int
612 
620 void
621 vrna_md_defaults_oldAliEn(int flag);
622 
628 int
630 
636 void
637 vrna_md_defaults_ribo(int flag);
638 
644 int
646 
652 void
653 vrna_md_defaults_cv_fact(double factor);
654 
660 double
662 
668 void
669 vrna_md_defaults_nc_fact(double factor);
670 
676 double
678 
684 void
685 vrna_md_defaults_sfact(double factor);
686 
692 double
694 
695 #ifdef VRNA_BACKWARD_COMPAT
696 
697 #define model_detailsT vrna_md_t /* restore compatibility of struct rename */
698 
699 /* BEGIN deprecated global variables: */
700 
710 extern double temperature;
711 
723 extern double pf_scale;
724 
746 extern int dangles;
747 
753 extern int tetra_loop;
754 
762 extern int noLonelyPairs;
763 
767 extern int noGU;
768 
772 extern int no_closingGU;
773 
777 extern int circ;
778 
782 extern int gquad;
783 
787 extern int canonicalBPonly;
788 
792 extern int uniq_ML;
793 
801 extern int energy_set;
802 
809 extern int do_backtrack;
810 
818 extern char backtrack_type;
819 
827 extern char *nonstandards;
828 
834 extern int max_bp_span;
835 
839 extern int oldAliEn;
840 
844 extern int ribo;
845 
846 extern double cv_fact;
847 
848 extern double nc_fact;
849 
851 extern int logML;
852 
853 /* END deprecated global variables: */
854 
868 void
870 
871 char *
872 option_string(void);
873 
874 #endif
875 
879 #endif
char nonstandards[64]
contains allowed non standard bases
Definition: model.h:231
void vrna_md_defaults_sfact(double factor)
Set the default scaling factor used to avoid under-/overflows in partition function computation...
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.
int window_size
Size of the sliding window for locally optimal structure prediction.
Definition: model.h:238
double vrna_md_defaults_sfact_get(void)
Get the default scaling factor used to avoid under-/overflows in partition function computation...
short alias[MAXALPHA+1]
alias of an integer nucleotide representation
Definition: model.h:245
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;.
int vrna_md_defaults_backtrack_get(void)
Get default behavior for whether to backtrack secondary structures.
int dangles
Specifies the dangle model used in any energy evaluation (0,1,2 or 3)
Definition: model.h:194
void vrna_md_defaults_circ(int flag)
Set default behavior whether input sequences are circularized.
int backtrack
Specifies whether or not secondary structures should be backtraced.
Definition: model.h:228
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 max_bp_span
maximum allowed base pair span
Definition: model.h:232
int noGUclosure
Do not allow loops to be closed by GU pair.
Definition: model.h:221
int do_backtrack
do backtracking, i.e. compute secondary structures or base pair probabilities
vrna_md_t * vrna_md_copy(vrna_md_t *md_to, const vrna_md_t *md_from)
Copy/Clone a vrna_md_t model.
int energy_set
Specifies the energy set that defines set of compatible base pairs.
Definition: model.h:227
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 vrna_md_defaults_oldAliEn_get(void)
Get default behavior for whether to use old energy model for comparative structure prediction...
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.
int vrna_md_defaults_energy_set_get(void)
Get default energy set.
int vrna_md_defaults_ribo_get(void)
Get default behavior for whether to use Ribosum Scoring in comparative structure prediction.
double betaScale
A scaling factor for the thermodynamic temperature of the Boltzmann factors.
Definition: model.h:193
char backtrack_type
Specifies in which matrix to backtrack.
Definition: model.h:229
int noLP
Only consider canonical structures, i.e. no &#39;lonely&#39; base pairs.
Definition: model.h:219
int ribo
Use ribosum scoring table in alifold energy model.
Definition: model.h:240
int pair[MAXALPHA+1][MAXALPHA+1]
Integer representation of a base pair.
Definition: model.h:246
void vrna_md_defaults_uniq_ML(int flag)
Set default behavior for creating additional matrix for unique multi-branch loop prediction.
int gquad
Include G-quadruplexes in structure prediction.
Definition: model.h:224
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 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...
double nc_fact
Scaling factor to weight co-variance contributions of non-canonical pairs.
Definition: model.h:242
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.
void vrna_md_defaults_energy_set(int e)
Set default energy set.
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.
The data structure that contains the complete model details used throughout the calculations.
Definition: model.h:191
void vrna_md_defaults_logML(int flag)
Set default behavior recomputing free energies of multi-branch loops using a logarithmic model...
void vrna_md_defaults_noLP(int flag)
Set default behavior for prediction of canonical secondary structures.
int special_hp
Include special hairpin contributions for tri, tetra and hexaloops.
Definition: model.h:218
#define MAXALPHA
Maximal length of alphabet.
Definition: model.h:177
void vrna_md_defaults_window_size(int size)
Set default window size for sliding window structure prediction approaches.
int uniq_ML
Flag to ensure unique multi-branch loop decomposition during folding.
Definition: model.h:226
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 energy model.
Definition: model.h:239
double temperature
The temperature used to scale the thermodynamic parameters.
Definition: model.h:192
int min_loop_size
Minimum size of hairpin loops.
Definition: model.h:234
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 logML
Use logarithmic scaling for multiloops.
Definition: model.h:222
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 vrna_md_defaults_compute_bpp_get(void)
Get the default behavior for whether to compute base pair probabilities after partition function comp...
int canonicalBPonly
remove non-canonical bp&#39;s from constraint structures
Definition: model.h:225
double vrna_md_defaults_cv_fact_get(void)
Get the default co-variance scaling factor used in comparative structure prediction.
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 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)
int circ
Assume RNA to be circular instead of linear.
Definition: model.h:223
int compute_bpp
Specifies whether or not backward recursions for base pair probability (bpp) computation will be perf...
Definition: model.h:230
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 rtype[8]
Reverse base pair type array.
Definition: model.h:244
double cv_fact
Co-variance scaling factor for consensus structure prediction.
Definition: model.h:241
int vrna_md_defaults_logML_get(void)
Get default behavior recomputing free energies of multi-branch loops using a logarithmic model...
int noGU
Do not allow GU pairs.
Definition: model.h:220
double sfact
Scaling factor for partition function scaling.
Definition: model.h:243
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.