RNAlib-2.5.0
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 #define VRNA_MODEL_DEFAULT_PF_SMOOTH 1
158 
159 
160 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
161 
162 #ifndef MAXALPHA
166 #define MAXALPHA 20
167 #endif
168 
169 #endif
170 
180 struct vrna_md_s {
181  double temperature;
182  double betaScale;
183  int pf_smooth;
184  int dangles;
209  int noLP;
210  int noGU;
212  int logML;
213  int circ;
214  int gquad;
215  int uniq_ML;
217  int backtrack;
220  char nonstandards[64];
228  int oldAliEn;
229  int ribo;
230  double cv_fact;
231  double nc_fact;
232  double sfact;
233  int rtype[8];
234  short alias[MAXALPHA + 1];
235  int pair[MAXALPHA + 1][MAXALPHA + 1];
236  float pair_dist[7][7];
237 };
238 
239 
248 void
250 
251 
264 void
266 
267 
278 vrna_md_t *
280  const vrna_md_t *md_from);
281 
282 
288 char *
290 
291 
292 void
293 vrna_md_set_nonstandards(vrna_md_t *md,
294  const char *ns_bases);
295 
296 
314 void
316 
317 
323 void
325 
326 
332 double
334 
335 
343 void
345 
346 
353 double
355 
356 
357 void
358 vrna_md_defaults_pf_smooth(int s);
359 
360 
361 int
362 vrna_md_defaults_pf_smooth_get(void);
363 
364 
370 void
372 
373 
379 int
381 
382 
388 void
390 
391 
397 int
399 
400 
406 void
408 
409 
415 int
417 
418 
424 void
426 
427 
433 int
435 
436 
442 void
444 
445 
451 int
453 
454 
460 void
462 
463 
469 int
471 
472 
478 void
480 
481 
487 int
489 
490 
496 void
498 
499 
505 int
507 
508 
515 void
517 
518 
524 int
526 
527 
533 void
535 
536 
542 int
544 
545 
551 void
553 
554 
560 int
562 
563 
569 void
571 
572 
578 char
580 
581 
587 void
589 
590 
596 int
598 
599 
605 void
607 
608 
614 int
616 
617 
623 void
625 
626 
632 int
634 
635 
641 void
643 
644 
650 int
652 
653 
661 void
663 
664 
670 int
672 
673 
679 void
681 
682 
688 int
690 
691 
697 void
699 
700 
706 double
708 
709 
715 void
717 
718 
724 double
726 
727 
733 void
734 vrna_md_defaults_sfact(double factor);
735 
736 
742 double
744 
745 
746 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
747 
748 #define model_detailsT vrna_md_t /* restore compatibility of struct rename */
749 
750 /* BEGIN deprecated global variables: */
751 
761 extern double temperature;
762 
774 extern double pf_scale;
775 
797 extern int dangles;
798 
804 extern int tetra_loop;
805 
813 extern int noLonelyPairs;
814 
818 extern int noGU;
819 
823 extern int no_closingGU;
824 
828 extern int circ;
829 
833 extern int gquad;
834 
838 extern int uniq_ML;
839 
847 extern int energy_set;
848 
855 extern int do_backtrack;
856 
864 extern char backtrack_type;
865 
873 extern char *nonstandards;
874 
880 extern int max_bp_span;
881 
885 extern int oldAliEn;
886 
890 extern int ribo;
891 
892 extern double cv_fact;
893 
894 extern double nc_fact;
895 
897 extern int logML;
898 
899 /* END deprecated global variables: */
900 
914 void
916 
917 
918 char *
919 option_string(void);
920 
921 
922 #endif
927 #endif
double nc_fact
This variable controls the magnitude of the penalty for non-compatible sequences in the covariance te...
double cv_fact
This variable controls the weight of the covariance term in the energy function of alignment folding ...
double betaScale
A scaling factor for the thermodynamic temperature of the Boltzmann factors.
Definition: model.h:182
int backtrack
Specifies whether or not secondary structures should be backtraced.
Definition: model.h:217
int ribo
Use ribosum scoring table in alifold energy model.
Definition: model.h:229
char nonstandards[64]
contains allowed non standard bases
Definition: model.h:220
int energy_set
Specifies the energy set that defines set of compatible base pairs.
Definition: model.h:216
double temperature
The temperature used to scale the thermodynamic parameters.
Definition: model.h:181
double cv_fact
Co-variance scaling factor for consensus structure prediction.
Definition: model.h:230
int max_bp_span
maximum allowed base pair span
Definition: model.h:221
short alias[MAXALPHA+1]
alias of an integer nucleotide representation
Definition: model.h:234
int noLP
Only consider canonical structures, i.e. no 'lonely' base pairs.
Definition: model.h:209
int noGUclosure
Do not allow loops to be closed by GU pair.
Definition: model.h:211
int circ
Assume RNA to be circular instead of linear.
Definition: model.h:213
float pair_dist[7][7]
Base pair dissimilarity, a.k.a. distance matrix.
Definition: model.h:236
int pf_smooth
A flat specifying whether energies in Boltzmann factors need to be smoothed.
Definition: model.h:183
int min_loop_size
Minimum size of hairpin loops.
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:219
int pair[MAXALPHA+1][MAXALPHA+1]
Integer representation of a base pair.
Definition: model.h:235
int oldAliEn
Use old alifold energy model.
Definition: model.h:228
double sfact
Scaling factor for partition function scaling.
Definition: model.h:232
char backtrack_type
Specifies in which matrix to backtrack.
Definition: model.h:218
double nc_fact
Scaling factor to weight co-variance contributions of non-canonical pairs.
Definition: model.h:231
int window_size
Size of the sliding window for locally optimal structure prediction.
Definition: model.h:227
int rtype[8]
Reverse base pair type array.
Definition: model.h:233
int noGU
Do not allow GU pairs.
Definition: model.h:210
int dangles
Specifies the dangle model used in any energy evaluation (0,1,2 or 3)
Definition: model.h:184
int special_hp
Include special hairpin contributions for tri, tetra and hexaloops.
Definition: model.h:208
int uniq_ML
Flag to ensure unique multi-branch loop decomposition during folding.
Definition: model.h:215
int logML
Use logarithmic scaling for multiloops.
Definition: model.h:212
int gquad
Include G-quadruplexes in structure prediction.
Definition: model.h:214
int vrna_md_defaults_energy_set_get(void)
Get default energy set.
#define MAXALPHA
Maximal length of alphabet.
Definition: model.h:166
int ribo
use ribosum matrices
void vrna_md_defaults_gquad(int flag)
Set default behavior for treatment of G-Quadruplexes.
int noLonelyPairs
Global switch to avoid/allow helices of length 1.
char vrna_md_defaults_backtrack_type_get(void)
Get default backtrack type, i.e. which DP matrix is used.
int vrna_md_defaults_ribo_get(void)
Get default behavior for whether to use Ribosum Scoring in comparative structure prediction.
int max_bp_span
Maximum allowed base pair span.
int vrna_md_defaults_special_hp_get(void)
Get default behavior for lookup of tabulated free energies for special hairpin loops,...
int vrna_md_defaults_oldAliEn_get(void)
Get default behavior for whether to use old energy model for comparative structure prediction.
int gquad
Allow G-quadruplex formation.
char * nonstandards
contains allowed non standard base pairs
void vrna_md_defaults_noLP(int flag)
Set default behavior for prediction of canonical secondary structures.
void vrna_md_update(vrna_md_t *md)
Update the model details data structure.
char * vrna_md_option_string(vrna_md_t *md)
Get a corresponding commandline parameter string of the options in a vrna_md_t.
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_sfact(double factor)
Set the default scaling factor used to avoid under-/overflows in partition function computation.
void vrna_md_defaults_oldAliEn(int flag)
Set default behavior for whether to use old energy model for comparative structure prediction.
void vrna_md_defaults_max_bp_span(int span)
Set default maximal base pair span.
void vrna_md_defaults_circ(int flag)
Set default behavior whether input sequences are circularized.
int tetra_loop
Include special stabilizing energies for some tri-, tetra- and hexa-loops;.
int vrna_md_defaults_noGUclosure_get(void)
Get default behavior for G-U pairs as closing pair for loops.
void vrna_md_defaults_uniq_ML(int flag)
Set default behavior for creating additional matrix for unique multi-branch loop prediction.
int vrna_md_defaults_min_loop_size_get(void)
Get default minimal loop size.
int vrna_md_defaults_noGU_get(void)
Get default behavior for treatment of G-U wobble pairs.
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 vrna_md_defaults_window_size_get(void)
Get default window size for sliding window structure prediction approaches.
int vrna_md_defaults_dangles_get(void)
Get default dangle model for structure prediction.
void vrna_md_defaults_backtrack_type(char t)
Set default backtrack type, i.e. which DP matrix is used.
int uniq_ML
do ML decomposition uniquely (for subopt)
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.
int dangles
Switch the energy model for dangling end contributions (0, 1, 2, 3)
double vrna_md_defaults_nc_fact_get(void)
void vrna_md_defaults_window_size(int size)
Set default window size for sliding window structure prediction approaches.
int logML
if nonzero use logarithmic ML energy in energy_of_struct
char backtrack_type
A backtrack array marker for inverse_fold()
void vrna_md_set_default(vrna_md_t *md)
Apply default model details to a provided vrna_md_t data structure.
void vrna_md_defaults_energy_set(int e)
Set default energy set.
int vrna_md_defaults_backtrack_get(void)
Get default behavior for whether to backtrack secondary structures.
int vrna_md_defaults_noLP_get(void)
Get default behavior for prediction of canonical secondary structures.
void vrna_md_defaults_ribo(int flag)
Set default behavior for whether to use Ribosum Scoring in comparative structure prediction.
int vrna_md_defaults_logML_get(void)
Get default behavior recomputing free energies of multi-branch loops using a logarithmic model.
double vrna_md_defaults_temperature_get(void)
Get default temperature for energy evaluation of loops.
void vrna_md_defaults_backtrack(int flag)
Set default behavior for whether to backtrack secondary structures.
void vrna_md_defaults_noGU(int flag)
Set default behavior for treatment of G-U wobble pairs.
int vrna_md_defaults_compute_bpp_get(void)
Get the default behavior for whether to compute base pair probabilities after partition function comp...
int vrna_md_defaults_max_bp_span_get(void)
Get default maximal base pair span.
int no_closingGU
GU allowed only inside stacks if set to 1.
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_uniq_ML_get(void)
Get default behavior for creating additional matrix for unique multi-branch loop prediction.
double temperature
Rescale energy parameters to a temperature in degC.
void set_model_details(vrna_md_t *md)
Set default model details.
double vrna_md_defaults_betaScale_get(void)
Get default scaling factor of thermodynamic temperature in Boltzmann factors.
int noGU
Global switch to forbid/allow GU base pairs at all.
void vrna_md_defaults_min_loop_size(int size)
Set default minimal loop size.
void vrna_md_defaults_nc_fact(double factor)
int oldAliEn
use old alifold energies (with gaps)
void vrna_md_defaults_dangles(int d)
Set default dangle model for structure prediction.
void vrna_md_defaults_cv_fact(double factor)
Set the default co-variance scaling factor used in comparative structure prediction.
int vrna_md_defaults_circ_get(void)
Get default behavior whether input sequences are circularized.
double pf_scale
A scaling factor used by pf_fold() to avoid overflows.
int do_backtrack
do backtracking, i.e. compute secondary structures or base pair probabilities
void vrna_md_defaults_noGUclosure(int flag)
Set default behavior for G-U pairs as closing pair for loops.
double vrna_md_defaults_cv_fact_get(void)
Get the default co-variance scaling factor used in comparative structure prediction.
int vrna_md_defaults_gquad_get(void)
Get default behavior for treatment of G-Quadruplexes.
void vrna_md_defaults_betaScale(double b)
Set default scaling factor of thermodynamic temperature in Boltzmann factors.
void vrna_md_defaults_compute_bpp(int flag)
Set the default behavior for whether to compute base pair probabilities after partition function comp...
int circ
backward compatibility variable.. this does not effect anything
void vrna_md_defaults_temperature(double T)
Set default temperature for energy evaluation of loops.
int energy_set
0 = BP; 1=any with GC; 2=any with AU-parameter
void vrna_md_defaults_special_hp(int flag)
Set default behavior for lookup of tabulated free energies for special hairpin loops,...
The data structure that contains the complete model details used throughout the calculations.
Definition: model.h:180