RNAlib-2.2.7
The Dynamic Programming Matrices

This module provides interfaces that deal with creation and destruction of dynamic programming matrices used within the RNAlib. More...

+ Collaboration diagram for The Dynamic Programming Matrices:

Data Structures

struct  vrna_mx_mfe_s
 Minimum Free Energy (MFE) Dynamic Programming (DP) matrices data structure required within the vrna_fold_compound_t. More...
 
struct  vrna_mx_pf_s
 Partition function (PF) Dynamic Programming (DP) matrices data structure required within the vrna_fold_compound_t. More...
 

Typedefs

typedef struct vrna_mx_mfe_s vrna_mx_mfe_t
 Typename for the Minimum Free Energy (MFE) DP matrices data structure vrna_mx_mfe_s.
 
typedef struct vrna_mx_pf_s vrna_mx_pf_t
 Typename for the Partition Function (PF) DP matrices data structure vrna_mx_pf_s.
 

Enumerations

enum  vrna_mx_type_e { VRNA_MX_DEFAULT, VRNA_MX_WINDOW, VRNA_MX_2DFOLD }
 An enumerator that is used to specify the type of a polymorphic Dynamic Programming (DP) matrix data structure. More...
 

Functions

int vrna_mx_add (vrna_fold_compound_t *vc, vrna_mx_type_e type, unsigned int options)
 Add Dynamic Programming (DP) matrices (allocate memory) More...
 
void vrna_mx_mfe_free (vrna_fold_compound_t *vc)
 Free memory occupied by the Minimum Free Energy (MFE) Dynamic Programming (DP) matrices. More...
 
void vrna_mx_pf_free (vrna_fold_compound_t *vc)
 Free memory occupied by the Partition Function (PF) Dynamic Programming (DP) matrices. More...
 

Detailed Description

This module provides interfaces that deal with creation and destruction of dynamic programming matrices used within the RNAlib.


Data Structure Documentation

struct vrna_mx_mfe_s

Minimum Free Energy (MFE) Dynamic Programming (DP) matrices data structure required within the vrna_fold_compound_t.

Data Fields

Common fields for MFE matrices
vrna_mx_type_e type
 
unsigned int length
 Length of the sequence, therefore an indicator of the size of the DP matrices.
 
Default DP matrices
Note
These data fields are available if
int * c
 Energy array, given that i-j pair.
 
int * f5
 Energy of 5' end.
 
int * f3
 Energy of 3' end.
 
int * fc
 Energy from i to cutpoint (and vice versa if i>cut)
 
int * fML
 Multi-loop auxiliary energy array.
 
int * fM1
 Second ML array, only for unique multibrnach loop decomposition.
 
int * fM2
 Energy for a multibranch loop region with exactly two stems, extending to 3' end.
 
int * ggg
 Energies of g-quadruplexes.
 
int Fc
 Minimum Free Energy of entire circular RNA.
 
int FcH
 
int FcI
 
int FcM
 
Local Folding DP matrices using window approach
Note
These data fields are available if
int ** c_local
 Energy array, given that i-j pair.
 
int * f3_local
 Energy of 5' end.
 
int ** fML_local
 Multi-loop auxiliary energy array.
 
int ** ggg_local
 Energies of g-quadruplexes.
 
Distance Class DP matrices
Note
These data fields are available if
int *** E_F5
 
int ** l_min_F5
 
int ** l_max_F5
 
int * k_min_F5
 
int * k_max_F5
 
int *** E_F3
 
int ** l_min_F3
 
int ** l_max_F3
 
int * k_min_F3
 
int * k_max_F3
 
int *** E_C
 
int ** l_min_C
 
int ** l_max_C
 
int * k_min_C
 
int * k_max_C
 
int *** E_M
 
int ** l_min_M
 
int ** l_max_M
 
int * k_min_M
 
int * k_max_M
 
int *** E_M1
 
int ** l_min_M1
 
int ** l_max_M1
 
int * k_min_M1
 
int * k_max_M1
 
int *** E_M2
 
int ** l_min_M2
 
int ** l_max_M2
 
int * k_min_M2
 
int * k_max_M2
 
int ** E_Fc
 
int * l_min_Fc
 
int * l_max_Fc
 
int k_min_Fc
 
int k_max_Fc
 
int ** E_FcH
 
int * l_min_FcH
 
int * l_max_FcH
 
int k_min_FcH
 
int k_max_FcH
 
int ** E_FcI
 
int * l_min_FcI
 
int * l_max_FcI
 
int k_min_FcI
 
int k_max_FcI
 
int ** E_FcM
 
int * l_min_FcM
 
int * l_max_FcM
 
int k_min_FcM
 
int k_max_FcM
 
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
 
struct vrna_mx_pf_s

Partition function (PF) Dynamic Programming (DP) matrices data structure required within the vrna_fold_compound_t.

Data Fields

Common fields for DP matrices
vrna_mx_type_e type
 
unsigned int length
 
FLT_OR_DBLscale
 
FLT_OR_DBLexpMLbase
 
Default PF matrices
Note
These data fields are available if
FLT_OR_DBLq
 
FLT_OR_DBLqb
 
FLT_OR_DBLqm
 
FLT_OR_DBLqm1
 
FLT_OR_DBLprobs
 
FLT_OR_DBLq1k
 
FLT_OR_DBLqln
 
FLT_OR_DBLG
 
FLT_OR_DBL qo
 
FLT_OR_DBLqm2
 
FLT_OR_DBL qho
 
FLT_OR_DBL qio
 
FLT_OR_DBL qmo
 
Distance Class DP matrices
Note
These data fields are available if
FLT_OR_DBL *** Q
 
int ** l_min_Q
 
int ** l_max_Q
 
int * k_min_Q
 
int * k_max_Q
 
FLT_OR_DBL *** Q_B
 
int ** l_min_Q_B
 
int ** l_max_Q_B
 
int * k_min_Q_B
 
int * k_max_Q_B
 
FLT_OR_DBL *** Q_M
 
int ** l_min_Q_M
 
int ** l_max_Q_M
 
int * k_min_Q_M
 
int * k_max_Q_M
 
FLT_OR_DBL *** Q_M1
 
int ** l_min_Q_M1
 
int ** l_max_Q_M1
 
int * k_min_Q_M1
 
int * k_max_Q_M1
 
FLT_OR_DBL *** Q_M2
 
int ** l_min_Q_M2
 
int ** l_max_Q_M2
 
int * k_min_Q_M2
 
int * k_max_Q_M2
 
FLT_OR_DBL ** Q_c
 
int * l_min_Q_c
 
int * l_max_Q_c
 
int k_min_Q_c
 
int k_max_Q_c
 
FLT_OR_DBL ** Q_cH
 
int * l_min_Q_cH
 
int * l_max_Q_cH
 
int k_min_Q_cH
 
int k_max_Q_cH
 
FLT_OR_DBL ** Q_cI
 
int * l_min_Q_cI
 
int * l_max_Q_cI
 
int k_min_Q_cI
 
int k_max_Q_cI
 
FLT_OR_DBL ** Q_cM
 
int * l_min_Q_cM
 
int * l_max_Q_cM
 
int k_min_Q_cM
 
int k_max_Q_cM
 
FLT_OR_DBLQ_rem
 
FLT_OR_DBLQ_B_rem
 
FLT_OR_DBLQ_M_rem
 
FLT_OR_DBLQ_M1_rem
 
FLT_OR_DBLQ_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
 

Enumeration Type Documentation

#include <ViennaRNA/dp_matrices.h>

An enumerator that is used to specify the type of a polymorphic Dynamic Programming (DP) matrix data structure.

See also
vrna_mx_mfe_t, vrna_mx_pf_t
Enumerator
VRNA_MX_DEFAULT 

Default DP matrices.

VRNA_MX_WINDOW 

DP matrices suitable for local structure prediction using window approach.

See also
vrna_mfe_window(), vrna_mfe_window_zscore(), pfl_fold()
VRNA_MX_2DFOLD 

DP matrices suitable for distance class partitioned structure prediction.

See also
vrna_mfe_TwoD(), vrna_pf_TwoD()

Function Documentation

int vrna_mx_add ( vrna_fold_compound_t vc,
vrna_mx_type_e  type,
unsigned int  options 
)

#include <ViennaRNA/dp_matrices.h>

Add Dynamic Programming (DP) matrices (allocate memory)

This function adds DP matrices of a specific type to the provided vrna_fold_compound_t, such that successive DP recursion can be applied. The function caller has to specify which type of DP matrix is requested, see vrna_mx_type_e, and what kind of recursive algorithm will be applied later on, using the parameters type, and options, respectively. For the latter, Minimum free energy (MFE), and Partition function (PF) computations are distinguished. A third option that may be passed is #VRNA_OPTION_HYBRID, indicating that auxiliary DP arrays are required for RNA-RNA interaction prediction.

Note
Usually, there is no need to call this function, since the constructors of vrna_fold_compound_t are handling all the DP matrix memory allocation.
See also
vrna_mx_mfe_add(), vrna_mx_pf_add(), vrna_fold_compound(), vrna_fold_compound_comparative(), vrna_fold_compound_free(), vrna_mx_pf_free(), vrna_mx_mfe_free(), vrna_mx_type_e, VRNA_OPTION_MFE, VRNA_OPTION_PF, #VRNA_OPTION_HYBRID, VRNA_OPTION_EVAL_ONLY
Parameters
vcThe vrna_fold_compound_t that holds pointers to the DP matrices
typeThe type of DP matrices requested
optionsOption flags that specify the kind of DP matrices, such as MFE or PF arrays, and auxiliary requirements
Returns
1 if DP matrices were properly allocated and attached, 0 otherwise
void vrna_mx_mfe_free ( vrna_fold_compound_t vc)

#include <ViennaRNA/dp_matrices.h>

Free memory occupied by the Minimum Free Energy (MFE) Dynamic Programming (DP) matrices.

See also
vrna_fold_compound(), vrna_fold_compound_comparative(), vrna_fold_compound_free(), vrna_mx_pf_free()
Parameters
vcThe vrna_fold_compound_t storing the MFE DP matrices that are to be erased from memory
void vrna_mx_pf_free ( vrna_fold_compound_t vc)

#include <ViennaRNA/dp_matrices.h>

Free memory occupied by the Partition Function (PF) Dynamic Programming (DP) matrices.

See also
vrna_fold_compound(), vrna_fold_compound_comparative(), vrna_fold_compound_free(), vrna_mx_mfe_free()
Parameters
vcThe vrna_fold_compound_t storing the PF DP matrices that are to be erased from memory