RNAlib-2.4.5
alifold.h
Go to the documentation of this file.
1 #ifndef VIENNA_RNA_PACKAGE_ALIFOLD_H
2 #define VIENNA_RNA_PACKAGE_ALIFOLD_H
3 
5 #include <ViennaRNA/params.h>
6 #include <ViennaRNA/ribo.h>
7 #include <ViennaRNA/mfe.h>
8 #include <ViennaRNA/part_func.h>
9 #include <ViennaRNA/aln_util.h>
11 
12 #ifdef VRNA_WARN_DEPRECATED
13 # if defined(__clang__)
14 # define DEPRECATED(func, msg) func __attribute__ ((deprecated("", msg)))
15 # elif defined(__GNUC__)
16 # define DEPRECATED(func, msg) func __attribute__ ((deprecated(msg)))
17 # else
18 # define DEPRECATED(func, msg) func
19 # endif
20 #else
21 # define DEPRECATED(func, msg) func
22 #endif
23 
31 /*
32 ##############################################
33 # MFE VARIANTS OF THE ALIFOLD IMPLEMENTATION #
34 ##############################################
35 */
36 
60 float
61 vrna_alifold( const char **sequences,
62  char *structure);
63 
90 float
91 vrna_circalifold( const char **sequences,
92  char *structure);
93 
94 /*
95 #############################################################
96 # PARTITION FUNCTION VARIANTS OF THE ALIFOLD IMPLEMENTATION #
97 #############################################################
98 */
99 
123 float vrna_pf_alifold(const char **sequences, char *structure, vrna_ep_t **pl);
124 
151 float vrna_pf_circalifold(const char **sequences, char *structure, vrna_ep_t **pl);
152 
153 
154 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY
155 
156 /*
157 #################################################
158 # DEPRECATED FUNCTIONS #
159 #################################################
160 */
161 
162 
183 DEPRECATED(float alifold( const char **strings, char *structure),
184  "Use vrna_alifold() or vrna_mfe() instead");
185 
199 DEPRECATED(float circalifold( const char **strings, char *structure),
200  "Use vrna_alicircfold() or vrna_mfe() instead");
201 
215 DEPRECATED(void free_alifold_arrays(void),
216  "This function is obsolete");
217 
233 DEPRECATED(float energy_of_alistruct(const char **sequences, const char *structure, int n_seq, float *energy),
234  "Use vrna_eval_structure() and vrna_eval_covar_structure() instead");
235 
236 DEPRECATED(float energy_of_ali_gquad_structure(const char **sequences, const char *structure, int n_seq, float *energy),
237  "Use vrna_eval_structure() and vrna_eval_covar_structure() instead");
238 
249 DEPRECATED(extern double cv_fact,
250  "Use the cv_fact attribute of the vrna_md_t datastructure instead");
261 DEPRECATED(extern double nc_fact,
262  "Use the nc_fact attribute of the vrna_md_t datastructure instead");
263 
280 DEPRECATED(float alipf_fold_par( const char **sequences,
281  char *structure,
282  vrna_ep_t **pl,
283  vrna_exp_param_t *parameters,
284  int calculate_bppm,
285  int is_constrained,
286  int is_circular),
287  "Use vrna_pf_alifold() or vrna_pf() instead");
288 
307 DEPRECATED(float alipf_fold( const char **sequences, char *structure, vrna_ep_t **pl),
308  "Use vrna_pf_alifold() or vrna_pf() instead");
309 
322 DEPRECATED(float alipf_circ_fold(const char **sequences, char *structure, vrna_ep_t **pl),
323  "Use vrna_pf_circalifold() or vrna_pf() instead");
324 
325 
344 DEPRECATED(FLT_OR_DBL *export_ali_bppm(void),
345  "Use the new API with vrna_fold_compound_t datastructure instead");
346 
359 DEPRECATED(void free_alipf_arrays(void),
360  "This function is obsolete");
361 
372 DEPRECATED(char *alipbacktrack(double *prob),
373  "Use the new API and vrna_pbacktrack() instead");
374 
401 DEPRECATED(int get_alipf_arrays(short ***S_p,
402  short ***S5_p,
403  short ***S3_p,
404  unsigned short ***a2s_p,
405  char ***Ss_p,
406  FLT_OR_DBL **qb_p,
407  FLT_OR_DBL **qm_p,
408  FLT_OR_DBL **q1k_p,
409  FLT_OR_DBL **qln_p,
410  short **pscore),
411  "Use the new API with vrna_fold_compound_t datastructure instead");
412 
413 
425 DEPRECATED(void update_alifold_params(void),
426  "Use the new API with vrna_fold_compound_t datastructure instead");
427 
428 #endif
429 
430 
431 #endif
float alipf_circ_fold(const char **sequences, char *structure, vrna_ep_t **pl)
int get_alipf_arrays(short ***S_p, short ***S5_p, short ***S3_p, unsigned short ***a2s_p, char ***Ss_p, FLT_OR_DBL **qb_p, FLT_OR_DBL **qm_p, FLT_OR_DBL **q1k_p, FLT_OR_DBL **qln_p, short **pscore)
Get pointers to (almost) all relavant arrays used in alifold&#39;s partition function computation...
float alifold(const char **strings, char *structure)
Compute MFE and according consensus structure of an alignment of sequences.
FLT_OR_DBL * export_ali_bppm(void)
Get a pointer to the base pair probability array.
double cv_fact
This variable controls the weight of the covariance term in the energy function of alignment folding ...
Data structure representing a single entry of an element probability list (e.g. list of pair probabil...
Definition: structure_utils.h:114
double FLT_OR_DBL
Typename for floating point number in partition function computations.
Definition: data_structures.h:43
float vrna_pf_circalifold(const char **sequences, char *structure, vrna_ep_t **pl)
Compute Partition function (and base pair probabilities) for an alignment of circular RNA sequences ...
void update_alifold_params(void)
Update the energy parameters for alifold function.
double nc_fact
This variable controls the magnitude of the penalty for non-compatible sequences in the covariance te...
void free_alifold_arrays(void)
Free the memory occupied by MFE alifold functions.
float circalifold(const char **strings, char *structure)
Compute MFE and according structure of an alignment of sequences assuming the sequences are circular ...
float vrna_pf_alifold(const char **sequences, char *structure, vrna_ep_t **pl)
Compute Partition function (and base pair probabilities) for an RNA sequence alignment using a compa...
Various data structures and pre-processor macros.
char * alipbacktrack(double *prob)
Sample a consensus secondary structure from the Boltzmann ensemble according its probability.
void free_alipf_arrays(void)
Free the memory occupied by folding matrices allocated by alipf_fold, alipf_circ_fold, etc.
Functions to deal with sets of energy parameters.
float vrna_alifold(const char **sequences, char *structure)
Compute Minimum Free Energy (MFE), and a corresponding consensus secondary structure for an RNA seque...
The data structure that contains temperature scaled Boltzmann weights of the energy parameters...
Definition: params.h:101
float vrna_circalifold(const char **sequences, char *structure)
Compute Minimum Free Energy (MFE), and a corresponding consensus secondary structure for a sequence a...
Boltzmann Sampling of secondary structures from the ensemble.
Various utility- and helper-functions for sequence alignments and comparative structure prediction...
Partition function implementations.
float alipf_fold_par(const char **sequences, char *structure, vrna_ep_t **pl, vrna_exp_param_t *parameters, int calculate_bppm, int is_constrained, int is_circular)
Compute Minimum Free energy (MFE) and backtrace corresponding secondary structures from RNA sequence ...
float alipf_fold(const char **sequences, char *structure, vrna_ep_t **pl)
The partition function version of alifold() works in analogy to pf_fold(). Pair probabilities and inf...
float energy_of_alistruct(const char **sequences, const char *structure, int n_seq, float *energy)
Calculate the free energy of a consensus structure given a set of aligned sequences.
Parse RiboSum Scoring Matrices for Covariance Scoring of Alignments.