RNAlib-2.1.9h
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 
4 #include "data_structures.h"
5 
6 #ifdef __GNUC__
7 #define DEPRECATED(func) func __attribute__ ((deprecated))
8 #else
9 #define DEPRECATED(func) func
10 #endif
11 
12 
41 extern int st_back;
42 
43 /*
44 #################################################
45 # PARTITION FUNCTION COMPUTATION #
46 #################################################
47 */
48 
87 float pf_fold_par( const char *sequence,
88  char *structure,
89  pf_paramT *parameters,
90  int calculate_bppm,
91  int is_constrained,
92  int is_circular);
93 
133 float pf_fold(const char *sequence,
134  char *structure);
135 
161 float pf_circ_fold( const char *sequence,
162  char *structure);
163 
173 char *pbacktrack(char *sequence);
174 
187 char *pbacktrack_circ(char *sequence);
188 
204 void free_pf_arrays(void);
205 
215 void update_pf_params(int length);
216 
223 void update_pf_params_par(int length, pf_paramT *parameters);
224 
241 FLT_OR_DBL *export_bppm(void);
242 
243 /*
244 #################################################
245 # OTHER PARTITION FUNCTION RELATED DECLARATIONS #
246 #################################################
247 */
248 
266 void assign_plist_from_pr( plist **pl,
267  FLT_OR_DBL *probs,
268  int length,
269  double cutoff);
270 
271 /* this doesn't work if free_pf_arrays() is called before */
272 void assign_plist_gquad_from_pr(plist **pl,
273  int length,
274  double cut_off);
275 
276 char *get_centroid_struct_gquad_pr(int length,
277  double *dist);
278 
294 int get_pf_arrays(short **S_p,
295  short **S1_p,
296  char **ptype_p,
297  FLT_OR_DBL **qb_p,
298  FLT_OR_DBL **qm_p,
299  FLT_OR_DBL **q1k_p,
300  FLT_OR_DBL **qln_p);
301 
305 double get_subseq_F(int i, int j);
306 
323 char *get_centroid_struct_pl(int length,
324  double *dist,
325  plist *pl);
326 
343 char *get_centroid_struct_pr(int length,
344  double *dist,
345  FLT_OR_DBL *pr);
346 
359 double mean_bp_distance(int length);
360 
378 double mean_bp_distance_pr(int length,
379  FLT_OR_DBL *pr);
380 
384 void bppm_to_structure(char *structure,
385  FLT_OR_DBL *pr,
386  unsigned int length);
387 
388 plist *stackProb(double cutoff);
389 
393 char bppm_symbol(const float *x);
394 
395 
396 /*
397 #################################################
398 # DEPRECATED FUNCTIONS #
399 #################################################
400 */
401 
407 DEPRECATED(void init_pf_fold(int length));
408 
413 DEPRECATED(char *centroid(int length,
414  double *dist)); /* mean pair distance of ensemble */
415 
421 DEPRECATED(double mean_bp_dist(int length));
422 
426 DEPRECATED(double expLoopEnergy(int u1,
427  int u2,
428  int type,
429  int type2,
430  short si1,
431  short sj1,
432  short sp1,
433  short sq1));
434 
438 DEPRECATED(double expHairpinEnergy( int u,
439  int type,
440  short si1,
441  short sj1,
442  const char *string));
443 
444 #endif
float pf_fold_par(const char *sequence, char *structure, pf_paramT *parameters, int calculate_bppm, int is_constrained, int is_circular)
Compute the partition function for a given RNA sequence.
float pf_circ_fold(const char *sequence, char *structure)
Compute the partition function of a circular RNA sequence.
double * pr
A pointer to the base pair probability matrix.
double mean_bp_distance_pr(int length, double *pr)
Get the mean base pair distance in the thermodynamic ensemble.
double expHairpinEnergy(int u, int type, short si1, short sj1, const char *string)
The datastructure that contains temperature scaled Boltzmann weights of the energy parameters...
Definition: data_structures.h:203
double get_subseq_F(int i, int j)
Get the free energy of a subsequence from the q[] array.
All datastructures and typedefs shared among the Vienna RNA Package can be found here.
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)
char * get_centroid_struct_pr(int length, double *dist, double *pr)
Get the centroid structure of the ensemble.
float pf_fold(const char *sequence, char *structure)
Compute the partition function of an RNA sequence.
this datastructure is used as input parameter in functions of PS_dot.h and others ...
Definition: data_structures.h:48
char * get_centroid_struct_pl(int length, double *dist, plist *pl)
Get the centroid structure of the ensemble.
void assign_plist_from_pr(plist **pl, double *probs, int length, double cutoff)
Create a plist from a probability matrix.
void free_pf_arrays(void)
Free arrays for the partition function recursions.
double mean_bp_distance(int length)
Get the mean base pair distance of the last partition function computation.
char bppm_symbol(const float *x)
Get a pseudo dot bracket notation for a given probability information.
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.
void bppm_to_structure(char *structure, double *pr, unsigned int length)
Create a dot-bracket like structure string from base pair probability matrix.
double * export_bppm(void)
Get a pointer to the base pair probability arrayAccessing the base pair probabilities for a pair (i...
char * pbacktrack(char *sequence)
Sample a secondary structure from the Boltzmann ensemble according its probability ...
double expLoopEnergy(int u1, int u2, int type, int type2, short si1, short sj1, short sp1, short sq1)
double mean_bp_dist(int length)
int get_pf_arrays(short **S_p, short **S1_p, char **ptype_p, double **qb_p, double **qm_p, double **q1k_p, double **qln_p)
Get the pointers to (almost) all relavant computation arrays used in partition function computation...
void update_pf_params_par(int length, pf_paramT *parameters)
Recalculate energy parameters.