2Dfold.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_FOLD_H
#define VIENNA_RNA_PACKAGE_TWO_D_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>
#include <ViennaRNA/params.h>
typedef struct vrna_sol_TwoD_t{
int k;
int l;
float en;
char *s;
} vrna_sol_TwoD_t;
vrna_sol_TwoD_t *
vrna_mfe_TwoD(vrna_fold_compound_t *vc,
int distance1,
int distance2);
char *
vrna_backtrack5_TwoD( vrna_fold_compound_t *vc,
int k,
int l,
unsigned int j);
#ifdef VRNA_BACKWARD_COMPAT
#define TwoDfold_solution vrna_sol_TwoD_t /* restore compatibility of struct rename */
typedef struct TwoDfold_vars{
vrna_param_t *P;
int do_backtrack;
char *ptype;
char *sequence;
short *S, *S1;
unsigned int maxD1;
unsigned int maxD2;
unsigned int *mm1;
unsigned int *mm2;
int *my_iindx;
double temperature;
unsigned int *referenceBPs1;
unsigned int *referenceBPs2;
unsigned int *bpdist;
short *reference_pt1;
short *reference_pt2;
int circ;
int dangles;
unsigned int seq_length;
int ***E_F5;
int ***E_F3;
int ***E_C;
int ***E_M;
int ***E_M1;
int ***E_M2;
int **E_Fc;
int **E_FcH;
int **E_FcI;
int **E_FcM;
int **l_min_values;
int **l_max_values;
int *k_min_values;
int *k_max_values;
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_f;
int **l_max_values_f;
int *k_min_values_f;
int *k_max_values_f;
int **l_min_values_f3;
int **l_max_values_f3;
int *k_min_values_f3;
int *k_max_values_f3;
int **l_min_values_m2;
int **l_max_values_m2;
int *k_min_values_m2;
int *k_max_values_m2;
int *l_min_values_fc;
int *l_max_values_fc;
int k_min_values_fc;
int k_max_values_fc;
int *l_min_values_fcH;
int *l_max_values_fcH;
int k_min_values_fcH;
int k_max_values_fcH;
int *l_min_values_fcI;
int *l_max_values_fcI;
int k_min_values_fcI;
int k_max_values_fcI;
int *l_min_values_fcM;
int *l_max_values_fcM;
int k_min_values_fcM;
int k_max_values_fcM;
/* auxilary arrays for remaining set of coarse graining (k,l) > (k_max, l_max) */
int *E_F5_rem;
int *E_F3_rem;
int *E_C_rem;
int *E_M_rem;
int *E_M1_rem;
int *E_M2_rem;
int E_Fc_rem;
int E_FcH_rem;
int E_FcI_rem;
int E_FcM_rem;
#ifdef COUNT_STATES
unsigned long ***N_F5;
unsigned long ***N_C;
unsigned long ***N_M;
unsigned long ***N_M1;
#endif
vrna_fold_compound_t *compatibility;
} TwoDfold_vars;
DEPRECATED(TwoDfold_vars *
get_TwoDfold_variables( const char *seq,
const char *structure1,
const char *structure2,
int circ));
DEPRECATED(void
destroy_TwoDfold_variables(TwoDfold_vars *our_variables));
DEPRECATED(TwoDfold_solution *
TwoDfoldList( TwoDfold_vars *vars,
int distance1,
int distance2));
DEPRECATED(char *TwoDfold_backtrack_f5(unsigned int j,
int k,
int l,
TwoDfold_vars *vars));
DEPRECATED(TwoDfold_solution **TwoDfold(TwoDfold_vars *our_variables,
int distance1,
int distance2));
#endif
#endif
vrna_sol_TwoD_t
Solution element returned from vrna_mfe_TwoD()
Definition: 2Dfold.h:62
TwoDfold_vars
struct TwoDfold_vars TwoDfold_vars
Variables compound for 2Dfold MFE folding.
TwoDfold_vars::mm2
unsigned int * mm2
Maximum matching matrix, reference struct 2 disallowed.
Definition: 2Dfold.h:149
TwoDfold_vars
Variables compound for 2Dfold MFE folding.
Definition: 2Dfold.h:138
vrna_fc_s
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:390
temperature
double temperature
Rescale energy parameters to a temperature in degC.
TwoDfold_backtrack_f5
char * TwoDfold_backtrack_f5(unsigned int j, int k, int l, TwoDfold_vars *vars)
Backtrack a minimum free energy structure from a 5&#39; section of specified length.
vrna_param_s
The datastructure that contains temperature scaled energy parameters.
Definition: params.h:50
TwoDfold_vars::mm1
unsigned int * mm1
Maximum matching matrix, reference struct 1 disallowed.
Definition: 2Dfold.h:148
destroy_TwoDfold_variables
void destroy_TwoDfold_variables(TwoDfold_vars *our_variables)
Destroy a TwoDfold_vars datastructure without memory loss.
vrna_sol_TwoD_t::l
int l
Distance to second reference.
Definition: 2Dfold.h:64
vrna_sol_TwoD_t::s
char * s
MFE representative structure in dot-bracket notation.
Definition: 2Dfold.h:66
vrna_backtrack5_TwoD
char * vrna_backtrack5_TwoD(vrna_fold_compound_t *vc, int k, int l, unsigned int j)
Backtrack a minimum free energy structure from a 5&#39; section of specified length.
TwoDfold_vars::do_backtrack
int do_backtrack
Flag whether to do backtracing of the structure(s) or not.
Definition: 2Dfold.h:140
data_structures.h
TwoDfold_vars::referenceBPs2
unsigned int * referenceBPs2
Matrix containing number of basepairs of reference structure2 in interval [i,j].
Definition: 2Dfold.h:156
TwoDfold_vars::referenceBPs1
unsigned int * referenceBPs1
Matrix containing number of basepairs of reference structure1 in interval [i,j].
Definition: 2Dfold.h:155
params.h
TwoDfold_vars::my_iindx
int * my_iindx
Index for moving in quadratic distancy dimensions.
Definition: 2Dfold.h:151
TwoDfold_vars::maxD1
unsigned int maxD1
Maximum allowed base pair distance to first reference.
Definition: 2Dfold.h:144
TwoDfoldList
vrna_sol_TwoD_t * TwoDfoldList(TwoDfold_vars *vars, int distance1, int distance2)
Compute MFE&#39;s and representative for distance partitioning.
vrna_sol_TwoD_t
struct vrna_sol_TwoD_t vrna_sol_TwoD_t
Solution element returned from vrna_mfe_TwoD()
vrna_sol_TwoD_t::k
int k
Distance to first reference.
Definition: 2Dfold.h:63
vrna_mfe_TwoD
vrna_sol_TwoD_t * vrna_mfe_TwoD(vrna_fold_compound_t *vc, int distance1, int distance2)
Compute MFE&#39;s and representative for distance partitioning.
TwoDfold_vars::ptype
char * ptype
Precomputed array of pair types.
Definition: 2Dfold.h:141
TwoDfold_vars::P
vrna_param_t * P
Precomputed energy parameters and model details.
Definition: 2Dfold.h:139
TwoDfold_vars::S1
short * S1
The input sequences in numeric form.
Definition: 2Dfold.h:143
TwoDfold_vars::sequence
char * sequence
The input sequence.
Definition: 2Dfold.h:142
get_TwoDfold_variables
TwoDfold_vars * get_TwoDfold_variables(const char *seq, const char *structure1, const char *structure2, int circ)
Get a structure of type TwoDfold_vars prefilled with current global settings.
vrna_sol_TwoD_t::en
float en
Free energy in kcal/mol.
Definition: 2Dfold.h:65
TwoDfold_vars::maxD2
unsigned int maxD2
Maximum allowed base pair distance to second reference.
Definition: 2Dfold.h:145
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)
TwoDfold_vars::bpdist
unsigned int * bpdist
Matrix containing base pair distance of reference structure 1 and 2 on interval [i,j].
Definition: 2Dfold.h:157