RNAlib-2.2.0-RC3
part_func.h
Go to the documentation of this file.
1 #ifndef VIENNA_RNA_PACKAGE_PART_FUNC_H
2 #define VIENNA_RNA_PACKAGE_PART_FUNC_H
3 
5 #include <ViennaRNA/params.h>
6 #include <ViennaRNA/centroid.h>
7 
8 #ifdef __GNUC__
9 #define DEPRECATED(func) func __attribute__ ((deprecated))
10 #else
11 #define DEPRECATED(func) func
12 #endif
13 
14 /* make this interface backward compatible with RNAlib < 2.2.0 */
15 #define VRNA_BACKWARD_COMPAT
16 
17 
18 
37 /*
38 #################################################
39 # PARTITION FUNCTION COMPUTATION #
40 #################################################
41 */
42 
73  char *structure);
74 
75 /*
76 #################################################
77 # OTHER PARTITION FUNCTION RELATED DECLARATIONS #
78 #################################################
79 */
80 
92 char *vrna_pbacktrack5(vrna_fold_compound *vc, int length);
93 
109 
123 double vrna_mean_bp_distance_pr(int length, FLT_OR_DBL *pr);
124 
138 
151 plist *vrna_stack_prob(vrna_fold_compound *vc, double cutoff);
152 
153 #ifdef VRNA_BACKWARD_COMPAT
154 
155 /*
156 #################################################
157 # DEPRECATED FUNCTIONS #
158 #################################################
159 */
160 
173 extern int st_back;
174 
215 DEPRECATED(float pf_fold_par( const char *sequence,
216  char *structure,
217  vrna_exp_param_t *parameters,
218  int calculate_bppm,
219  int is_constrained,
220  int is_circular));
221 
261 DEPRECATED(float pf_fold(const char *sequence,
262  char *structure));
263 
290 DEPRECATED(float pf_circ_fold( const char *sequence,
291  char *structure));
292 
303 DEPRECATED(char *pbacktrack(char *sequence));
304 
305 DEPRECATED(char *pbacktrack5(char *sequence, int length));
306 
322 DEPRECATED(char *pbacktrack_circ(char *sequence));
323 
342 DEPRECATED(void free_pf_arrays(void));
343 
354 DEPRECATED(void update_pf_params(int length));
355 
363 DEPRECATED(void update_pf_params_par(int length, vrna_exp_param_t *parameters));
364 
381 DEPRECATED(FLT_OR_DBL *export_bppm(void));
382 
383 
399 DEPRECATED(int get_pf_arrays(short **S_p,
400  short **S1_p,
401  char **ptype_p,
402  FLT_OR_DBL **qb_p,
403  FLT_OR_DBL **qm_p,
404  FLT_OR_DBL **q1k_p,
405  FLT_OR_DBL **qln_p));
406 
410 DEPRECATED(double get_subseq_F(int i, int j));
411 
412 
424 DEPRECATED(double mean_bp_distance(int length));
425 
443 DEPRECATED(double mean_bp_distance_pr(int length, FLT_OR_DBL *pr));
444 
450 DEPRECATED(plist *stackProb(double cutoff));
451 
452 
458 DEPRECATED(void init_pf_fold(int length));
459 
464 DEPRECATED(char *centroid(int length, double *dist));
465 
470 DEPRECATED(char *get_centroid_struct_gquad_pr(int length,
471  double *dist));
472 
478 DEPRECATED(double mean_bp_dist(int length));
479 
483 DEPRECATED(double expLoopEnergy(int u1,
484  int u2,
485  int type,
486  int type2,
487  short si1,
488  short sj1,
489  short sp1,
490  short sq1));
491 
495 DEPRECATED(double expHairpinEnergy( int u,
496  int type,
497  short si1,
498  short sj1,
499  const char *string));
500 
501 /* this doesn't work if free_pf_arrays() is called before */
502 DEPRECATED(void assign_plist_gquad_from_pr(plist **pl,
503  int length,
504  double cut_off));
505 
506 #endif
507 
508 #endif
char * vrna_pbacktrack(vrna_fold_compound *vc)
Sample a secondary structure from the Boltzmann ensemble according its probability.
float pf_circ_fold(const char *sequence, char *structure)
Compute the partition function of a circular RNA sequence.
double vrna_mean_bp_distance(vrna_fold_compound *vc)
Get the mean base pair distance in the thermodynamic ensemble.
char * get_centroid_struct_gquad_pr(int length, double *dist)
char * vrna_pbacktrack5(vrna_fold_compound *vc, int length)
Sample a secondary structure of a subsequence from the Boltzmann ensemble according its probability...
double expHairpinEnergy(int u, int type, short si1, short sj1, const char *string)
plist * vrna_stack_prob(vrna_fold_compound *vc, double cutoff)
Compute stacking probabilities.
double get_subseq_F(int i, int j)
Get the free energy of a subsequence from the q[] array.
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:698
void update_pf_params_par(int length, vrna_exp_param_t *parameters)
Recalculate energy parameters.
void init_pf_fold(int length)
Allocate space for pf_fold()
int st_back
Flag indicating that auxilary arrays are needed throughout the computations. This is essential for st...
char * centroid(int length, double *dist)
float pf_fold(const char *sequence, char *structure)
Compute the partition function of an RNA sequence.
FLT_OR_DBL * export_bppm(void)
Get a pointer to the base pair probability arrayAccessing the base pair probabilities for a pair (i...
this datastructure is used as input parameter in functions of PS_dot.h and others ...
Definition: data_structures.h:45
plist * stackProb(double cutoff)
Get the probability of stacks.
void free_pf_arrays(void)
Free arrays for the partition function recursions.
float vrna_pf_fold(vrna_fold_compound *vc, char *structure)
Compute the partition function for a given RNA sequence.
double mean_bp_distance(int length)
Get the mean base pair distance of the last partition function computation.
double vrna_mean_bp_distance_pr(int length, FLT_OR_DBL *pr)
Get the mean base pair distance in the thermodynamic ensemble from a probability matrix.
char * pbacktrack_circ(char *sequence)
Sample a secondary structure of a circular RNA from the Boltzmann ensemble according its probability...
void update_pf_params(int length)
Recalculate energy parameters.
double mean_bp_distance_pr(int length, FLT_OR_DBL *pr)
Get the mean base pair distance in the thermodynamic ensemble.
FLT_OR_DBL * pr
A pointer to the base pair probability matrix.
int get_pf_arrays(short **S_p, short **S1_p, char **ptype_p, FLT_OR_DBL **qb_p, FLT_OR_DBL **qm_p, FLT_OR_DBL **q1k_p, FLT_OR_DBL **qln_p)
Get the pointers to (almost) all relavant computation arrays used in partition function computation...
char * pbacktrack(char *sequence)
Sample a secondary structure from the Boltzmann ensemble according its probability.
float pf_fold_par(const char *sequence, char *structure, vrna_exp_param_t *parameters, int calculate_bppm, int is_constrained, int is_circular)
Compute the partition function for a given RNA sequence.
double expLoopEnergy(int u1, int u2, int type, int type2, short si1, short sj1, short sp1, short sq1)
The datastructure that contains temperature scaled Boltzmann weights of the energy parameters...
Definition: params.h:86
double mean_bp_dist(int length)
Centroid structure computation.