RNAlib-2.0.2
H/part_func.h
Go to the documentation of this file.
00001 #ifndef __VIENNA_RNA_PACKAGE_PART_FUNC_H__
00002 #define __VIENNA_RNA_PACKAGE_PART_FUNC_H__
00003 
00004 #include "data_structures.h"
00005 
00006 #ifdef __GNUC__
00007 #define DEPRECATED(func) func __attribute__ ((deprecated))
00008 #else
00009 #define DEPRECATED(func) func
00010 #endif
00011 
00012 
00031 extern  int st_back;
00032 
00033 /*
00034 #################################################
00035 # PARTITION FUNCTION COMPUTATION                #
00036 #################################################
00037 */
00038 
00071 float   pf_fold(const char *sequence,
00072                 char *structure);
00073 
00089 float   pf_circ_fold( const char *sequence,
00090                       char *structure);
00091 
00092 float   pf_fold_par(  const char *sequence,
00093                       char *structure,
00094                       pf_paramT *parameters,
00095                       int calculate_bppm,
00096                       int is_circular);
00097 
00110 char    *pbacktrack(char *sequence);
00111 
00124 char    *pbacktrack_circ(char *sequence);
00125 
00138 void  free_pf_arrays(void);
00139 
00146 void  update_pf_params(int length);
00147 
00148 void update_pf_params_par(int length, pf_paramT *parameters);
00149 
00162 FLT_OR_DBL  *export_bppm(void);
00163 
00164 /*
00165 #################################################
00166 # OTHER PARTITION FUNCTION RELATED DECLARATIONS #
00167 #################################################
00168 */
00169 
00187 void  assign_plist_from_pr( plist **pl,
00188                             FLT_OR_DBL *probs,
00189                             int length,
00190                             double cutoff);
00191 
00208 int get_pf_arrays(short **S_p,
00209                   short **S1_p,
00210                   char **ptype_p,
00211                   FLT_OR_DBL **qb_p,
00212                   FLT_OR_DBL **qm_p,
00213                   FLT_OR_DBL **q1k_p,
00214                   FLT_OR_DBL **qln_p);
00215 
00231 char  *get_centroid_struct_pl(int length,
00232                               double *dist,
00233                               plist *pl);
00234 
00250 char  *get_centroid_struct_pr(int length,
00251                               double *dist,
00252                               FLT_OR_DBL *pr);
00253 
00264 double  mean_bp_distance(int length);
00265 
00281 double  mean_bp_distance_pr(int length,
00282                             FLT_OR_DBL *pr);
00283 
00287 void  bppm_to_structure(char *structure,
00288                         FLT_OR_DBL *pr,
00289                         unsigned int length);
00290 
00291 plist *stackProb(double cutoff);
00292 
00296 char    bppm_symbol(const float *x);
00297 
00298 
00299 /*
00300 #################################################
00301 # DEPRECATED FUNCTIONS                          #
00302 #################################################
00303 */
00304 
00310 DEPRECATED(void init_pf_fold(int length));
00311 
00316 DEPRECATED(char *centroid(int length,
00317                           double *dist));     /* mean pair distance of ensemble */
00318 
00324 DEPRECATED(double mean_bp_dist(int length));
00325 
00329 DEPRECATED(double expLoopEnergy(int u1,
00330                                 int u2,
00331                                 int type,
00332                                 int type2,
00333                                 short si1,
00334                                 short sj1,
00335                                 short sp1,
00336                                 short sq1));
00337 
00341 DEPRECATED(double expHairpinEnergy( int u,
00342                                     int type,
00343                                     short si1,
00344                                     short sj1,
00345                                     const char *string));
00346 
00347 #endif