2Dpfold.h
Go to the documentation of this file.
/*
minimum free energy
RNA secondary structure with
basepair distance d to reference structure prediction
*/
#ifndef VIENNA_RNA_PACKAGE_TWO_D_PF_FOLD_H
#define VIENNA_RNA_PACKAGE_TWO_D_PF_FOLD_H
/* make this interface backward compatible with RNAlib < 2.2.0 */
#define VRNA_BACKWARD_COMPAT
#ifdef DEPRECATION_WARNINGS
# ifdef __GNUC__
# define DEPRECATED(func) func __attribute__ ((deprecated))
# else
# define DEPRECATED(func) func
# endif
#else
# define DEPRECATED(func) func
#endif
#include <ViennaRNA/data_structures.h>
typedef struct vrna_sol_TwoD_pf_t{
int k;
int l;
FLT_OR_DBL q;
} vrna_sol_TwoD_pf_t;
vrna_sol_TwoD_pf_t *
vrna_pf_TwoD(vrna_fold_compound_t *vc,
int maxDistance1,
int maxDistance2);
/* End of group kl_neighborhood_pf */
char *
vrna_pbacktrack_TwoD( vrna_fold_compound_t *vc,
int d1,
int d2);
char *
vrna_pbacktrack5_TwoD(vrna_fold_compound_t *vc,
int d1,
int d2,
unsigned int length);
/* End of group kl_neighborhood_stochbt */
#ifdef VRNA_BACKWARD_COMPAT
#define TwoDpfold_solution vrna_sol_TwoD_pf_t /* restore compatibility of struct rename */
typedef struct{
unsigned int alloc;
char *ptype;
char *sequence;
short *S, *S1;
unsigned int maxD1;
unsigned int maxD2;
double temperature; /* temperature in last call to scale_pf_params */
double init_temp; /* temperature in last call to scale_pf_params */
FLT_OR_DBL *scale;
FLT_OR_DBL pf_scale;
vrna_exp_param_t *pf_params; /* holds all [unscaled] pf parameters */
int *my_iindx;
int *jindx;
short *reference_pt1;
short *reference_pt2;
unsigned int *referenceBPs1;
unsigned int *referenceBPs2;
unsigned int *bpdist;
unsigned int *mm1;
unsigned int *mm2;
int circ;
int dangles;
unsigned int seq_length;
FLT_OR_DBL ***Q;
FLT_OR_DBL ***Q_B;
FLT_OR_DBL ***Q_M;
FLT_OR_DBL ***Q_M1;
FLT_OR_DBL ***Q_M2;
FLT_OR_DBL **Q_c;
FLT_OR_DBL **Q_cH;
FLT_OR_DBL **Q_cI;
FLT_OR_DBL **Q_cM;
int **l_min_values;
int **l_max_values;
int *k_min_values;
int *k_max_values;
int **l_min_values_b;
int **l_max_values_b;
int *k_min_values_b;
int *k_max_values_b;
int **l_min_values_m;
int **l_max_values_m;
int *k_min_values_m;
int *k_max_values_m;
int **l_min_values_m1;
int **l_max_values_m1;
int *k_min_values_m1;
int *k_max_values_m1;
int **l_min_values_m2;
int **l_max_values_m2;
int *k_min_values_m2;
int *k_max_values_m2;
int *l_min_values_qc;
int *l_max_values_qc;
int k_min_values_qc;
int k_max_values_qc;
int *l_min_values_qcH;
int *l_max_values_qcH;
int k_min_values_qcH;
int k_max_values_qcH;
int *l_min_values_qcI;
int *l_max_values_qcI;
int k_min_values_qcI;
int k_max_values_qcI;
int *l_min_values_qcM;
int *l_max_values_qcM;
int k_min_values_qcM;
int k_max_values_qcM;
/* auxilary arrays for remaining set of coarse graining (k,l) > (k_max, l_max) */
FLT_OR_DBL *Q_rem;
FLT_OR_DBL *Q_B_rem;
FLT_OR_DBL *Q_M_rem;
FLT_OR_DBL *Q_M1_rem;
FLT_OR_DBL *Q_M2_rem;
FLT_OR_DBL Q_c_rem;
FLT_OR_DBL Q_cH_rem;
FLT_OR_DBL Q_cI_rem;
FLT_OR_DBL Q_cM_rem;
vrna_fold_compound_t *compatibility;
} TwoDpfold_vars;
DEPRECATED(TwoDpfold_vars *
get_TwoDpfold_variables(const char *seq,
const char *structure1,
char *structure2,
int circ));
DEPRECATED(void
destroy_TwoDpfold_variables(TwoDpfold_vars *vars));
DEPRECATED(TwoDpfold_solution *
TwoDpfoldList(TwoDpfold_vars *vars,
int maxDistance1,
int maxDistance2));
DEPRECATED(char *
TwoDpfold_pbacktrack( TwoDpfold_vars *vars,
int d1,
int d2));
DEPRECATED(char *
TwoDpfold_pbacktrack5(TwoDpfold_vars *vars,
int d1,
int d2,
unsigned int length));
DEPRECATED(FLT_OR_DBL **TwoDpfold(TwoDpfold_vars *our_variables,
int maxDistance1,
int maxDistance2));
DEPRECATED(FLT_OR_DBL **TwoDpfold_circ(
TwoDpfold_vars *our_variables,
int maxDistance1,
int maxDistance2));
#endif
#endif
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
TwoDpfold_vars::ptype
char * ptype
Precomputed array of pair types.
Definition: 2Dpfold.h:154
vrna_sol_TwoD_pf_t
Solution element returned from vrna_pf_TwoD()
Definition: 2Dpfold.h:47
temperature
double temperature
Rescale energy parameters to a temperature in degC.
TwoDpfold_vars::referenceBPs1
unsigned int * referenceBPs1
Matrix containing number of basepairs of reference structure1 in interval [i,j].
Definition: 2Dpfold.h:172
TwoDpfold_vars::maxD2
unsigned int maxD2
Maximum allowed base pair distance to second reference.
Definition: 2Dpfold.h:158
TwoDpfold_vars::my_iindx
int * my_iindx
Index for moving in quadratic distancy dimensions.
Definition: 2Dpfold.h:166
vrna_sol_TwoD_pf_t::q
FLT_OR_DBL q
partition function
Definition: 2Dpfold.h:50
get_TwoDpfold_variables
TwoDpfold_vars * get_TwoDpfold_variables(const char *seq, const char *structure1, char *structure2, int circ)
Get a datastructure containing all necessary attributes and global folding switches.
data_structures.h
TwoDpfold_pbacktrack5
char * TwoDpfold_pbacktrack5(TwoDpfold_vars *vars, int d1, int d2, unsigned int length)
Sample secondary structure representatives with a specified length from a set of distance classes acc...
vrna_exp_param_s
The datastructure that contains temperature scaled Boltzmann weights of the energy parameters...
Definition: params.h:94
pf_scale
double pf_scale
A scaling factor used by pf_fold() to avoid overflows.
TwoDpfold_vars::bpdist
unsigned int * bpdist
Matrix containing base pair distance of reference structure 1 and 2 on interval [i,j].
Definition: 2Dpfold.h:174
destroy_TwoDpfold_variables
void destroy_TwoDpfold_variables(TwoDpfold_vars *vars)
Free all memory occupied by a TwoDpfold_vars datastructure.
TwoDpfold_vars::maxD1
unsigned int maxD1
Maximum allowed base pair distance to first reference.
Definition: 2Dpfold.h:157
TwoDpfold_pbacktrack
char * TwoDpfold_pbacktrack(TwoDpfold_vars *vars, int d1, int d2)
Sample secondary structure representatives from a set of distance classes according to their Boltzman...
vrna_sol_TwoD_pf_t
struct vrna_sol_TwoD_pf_t vrna_sol_TwoD_pf_t
Solution element returned from vrna_pf_TwoD()
vrna_sol_TwoD_pf_t::l
int l
Distance to second reference.
Definition: 2Dpfold.h:49
TwoDpfold_vars::mm1
unsigned int * mm1
Maximum matching matrix, reference struct 1 disallowed.
Definition: 2Dpfold.h:176
vrna_pbacktrack5_TwoD
char * vrna_pbacktrack5_TwoD(vrna_fold_compound_t *vc, int d1, int d2, unsigned int length)
Sample secondary structure representatives with a specified length from a set of distance classes acc...
TwoDpfoldList
vrna_sol_TwoD_pf_t * TwoDpfoldList(TwoDpfold_vars *vars, int maxDistance1, int maxDistance2)
Compute the partition function for all distance classes.
TwoDpfold_vars::jindx
int * jindx
Index for moving in the triangular matrix qm1.
Definition: 2Dpfold.h:167
vrna_pbacktrack_TwoD
char * vrna_pbacktrack_TwoD(vrna_fold_compound_t *vc, int d1, int d2)
Sample secondary structure representatives from a set of distance classes according to their Boltzman...
TwoDpfold_vars::S1
short * S1
The input sequences in numeric form.
Definition: 2Dpfold.h:156
circ
int circ
backward compatibility variable.. this does not effect anything
dangles
int dangles
Switch the energy model for dangling end contributions (0, 1, 2, 3)
TwoDpfold_vars::sequence
char * sequence
The input sequence.
Definition: 2Dpfold.h:155
vrna_pf_TwoD
vrna_sol_TwoD_pf_t * vrna_pf_TwoD(vrna_fold_compound_t *vc, int maxDistance1, int maxDistance2)
Compute the partition function for all distance classes.
TwoDpfold_vars::mm2
unsigned int * mm2
Maximum matching matrix, reference struct 2 disallowed.
Definition: 2Dpfold.h:177
TwoDpfold_vars::referenceBPs2
unsigned int * referenceBPs2
Matrix containing number of basepairs of reference structure2 in interval [i,j].
Definition: 2Dpfold.h:173
vrna_sol_TwoD_pf_t::k
int k
Distance to first reference.
Definition: 2Dpfold.h:48
TwoDpfold_vars
Variables compound for 2Dfold partition function folding.
Definition: 2Dpfold.h:151