part_func.h
Go to the documentation of this file.
#ifndef VIENNA_RNA_PACKAGE_PART_FUNC_H
#define VIENNA_RNA_PACKAGE_PART_FUNC_H
/* make this interface backward compatible with RNAlib < 2.2.0 */
#define VRNA_BACKWARD_COMPAT
#include <ViennaRNA/data_structures.h>
#include <ViennaRNA/params.h>
#include <ViennaRNA/centroid.h>
#include <ViennaRNA/boltzmann_sampling.h>
#ifdef DEPRECATION_WARNINGS
# ifdef __GNUC__
# define DEPRECATED(func) func __attribute__ ((deprecated))
# else
# define DEPRECATED(func) func
# endif
#else
# define DEPRECATED(func) func
#endif
/*
#################################################
# PARTITION FUNCTION COMPUTATION #
#################################################
*/
float vrna_pf(vrna_fold_compound_t *vc, char *structure);
float vrna_pf_fold(const char *seq, char *structure, vrna_plist_t **pl);
float vrna_pf_circfold(const char *seq, char *structure, vrna_plist_t **pl);
/*
#################################################
# OTHER PARTITION FUNCTION RELATED DECLARATIONS #
#################################################
*/
int vrna_pf_float_precision(void);
double vrna_mean_bp_distance_pr(int length, FLT_OR_DBL *pr);
double vrna_mean_bp_distance(vrna_fold_compound_t *vc);
vrna_plist_t *vrna_stack_prob(vrna_fold_compound_t *vc, double cutoff);
#ifdef VRNA_BACKWARD_COMPAT
/*
#################################################
# DEPRECATED FUNCTIONS #
#################################################
*/
extern int st_back;
DEPRECATED(float pf_fold_par( const char *sequence,
char *structure,
vrna_exp_param_t *parameters,
int calculate_bppm,
int is_constrained,
int is_circular));
DEPRECATED(float pf_fold(const char *sequence,
char *structure));
DEPRECATED(float pf_circ_fold( const char *sequence,
char *structure));
DEPRECATED(char *pbacktrack(char *sequence));
DEPRECATED(char *pbacktrack5(char *sequence, int length));
DEPRECATED(char *pbacktrack_circ(char *sequence));
DEPRECATED(void free_pf_arrays(void));
DEPRECATED(void update_pf_params(int length));
DEPRECATED(void update_pf_params_par(int length, vrna_exp_param_t *parameters));
DEPRECATED(FLT_OR_DBL *export_bppm(void));
DEPRECATED(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));
DEPRECATED(double get_subseq_F(int i, int j));
DEPRECATED(double mean_bp_distance(int length));
DEPRECATED(double mean_bp_distance_pr(int length, FLT_OR_DBL *pr));
DEPRECATED(vrna_plist_t *stackProb(double cutoff));
DEPRECATED(void init_pf_fold(int length));
DEPRECATED(char *centroid(int length, double *dist));
DEPRECATED(char *get_centroid_struct_gquad_pr(int length,
double *dist));
DEPRECATED(double mean_bp_dist(int length));
DEPRECATED(double expLoopEnergy(int u1,
int u2,
int type,
int type2,
short si1,
short sj1,
short sp1,
short sq1));
DEPRECATED(double expHairpinEnergy( int u,
int type,
short si1,
short sj1,
const char *string));
/* this doesn't work if free_pf_arrays() is called before */
DEPRECATED(void assign_plist_gquad_from_pr(vrna_plist_t **pl,
int length,
double cut_off));
#endif
#endif
pf_circ_fold
float pf_circ_fold(const char *sequence, char *structure)
Compute the partition function of a circular RNA sequence.
vrna_pf_fold
float vrna_pf_fold(const char *seq, char *structure, vrna_plist_t **pl)
Compute Partition function (and base pair probabilities) for an RNA sequence using a comparative met...
get_centroid_struct_gquad_pr
char * get_centroid_struct_gquad_pr(int length, double *dist)
vrna_pf_circfold
float vrna_pf_circfold(const char *seq, char *structure, vrna_plist_t **pl)
Compute Partition function (and base pair probabilities) for a circular RNA sequences using a compar...
vrna_mean_bp_distance
double vrna_mean_bp_distance(vrna_fold_compound_t *vc)
Get the mean base pair distance in the thermodynamic ensemble.
FLT_OR_DBL
double FLT_OR_DBL
Typename for floating point number in partition function computations.
Definition: data_structures.h:39
vrna_fc_s
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:390
expHairpinEnergy
double expHairpinEnergy(int u, int type, short si1, short sj1, const char *string)
vrna_stack_prob
vrna_plist_t * vrna_stack_prob(vrna_fold_compound_t *vc, double cutoff)
Compute stacking probabilities.
get_subseq_F
double get_subseq_F(int i, int j)
Get the free energy of a subsequence from the q[] array.
data_structures.h
update_pf_params_par
void update_pf_params_par(int length, vrna_exp_param_t *parameters)
Recalculate energy parameters.
init_pf_fold
void init_pf_fold(int length)
Allocate space for pf_fold()
st_back
int st_back
Flag indicating that auxilary arrays are needed throughout the computations. This is essential for st...
centroid
char * centroid(int length, double *dist)
vrna_pf
float vrna_pf(vrna_fold_compound_t *vc, char *structure)
Compute the partition function for a given RNA sequence, or sequence alignment.
pf_fold
float pf_fold(const char *sequence, char *structure)
Compute the partition function of an RNA sequence.
export_bppm
FLT_OR_DBL * export_bppm(void)
Get a pointer to the base pair probability arrayAccessing the base pair probabilities for a pair (i...
params.h
vrna_exp_param_s
The datastructure that contains temperature scaled Boltzmann weights of the energy parameters...
Definition: params.h:94
boltzmann_sampling.h
Boltzmann Sampling of secondary structures from the ensemble.
free_pf_arrays
void free_pf_arrays(void)
Free arrays for the partition function recursions.
mean_bp_distance
double mean_bp_distance(int length)
Get the mean base pair distance of the last partition function computation.
vrna_plist_s
this datastructure is used as input parameter in functions of PS_dot.h and others ...
Definition: data_structures.h:164
vrna_mean_bp_distance_pr
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.
pbacktrack_circ
char * pbacktrack_circ(char *sequence)
Sample a secondary structure of a circular RNA from the Boltzmann ensemble according its probability...
update_pf_params
void update_pf_params(int length)
Recalculate energy parameters.
mean_bp_distance_pr
double mean_bp_distance_pr(int length, FLT_OR_DBL *pr)
Get the mean base pair distance in the thermodynamic ensemble.
pr
FLT_OR_DBL * pr
A pointer to the base pair probability matrix.
get_pf_arrays
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...
pbacktrack
char * pbacktrack(char *sequence)
Sample a secondary structure from the Boltzmann ensemble according its probability.
stackProb
vrna_plist_t * stackProb(double cutoff)
Get the probability of stacks.
pf_fold_par
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.
expLoopEnergy
double expLoopEnergy(int u1, int u2, int type, int type2, short si1, short sj1, short sp1, short sq1)
vrna_pf_float_precision
int vrna_pf_float_precision(void)
Find out whether partition function computations are using single precision floating points...
mean_bp_dist
double mean_bp_dist(int length)
centroid.h
Centroid structure computation.