The Dynamic Programming Matrices

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

Defines

VRNA_MX_FLAG_F5
#include <ViennaRNA/datastructures/dp_matrices.h>
VRNA_MX_FLAG_F3
#include <ViennaRNA/datastructures/dp_matrices.h>
VRNA_MX_FLAG_C
#include <ViennaRNA/datastructures/dp_matrices.h>
VRNA_MX_FLAG_M
#include <ViennaRNA/datastructures/dp_matrices.h>
VRNA_MX_FLAG_M2
#include <ViennaRNA/datastructures/dp_matrices.h>
VRNA_MX_FLAG_M1
#include <ViennaRNA/datastructures/dp_matrices.h>
VRNA_MX_FLAG_MS5
#include <ViennaRNA/datastructures/dp_matrices.h>
VRNA_MX_FLAG_MS3
#include <ViennaRNA/datastructures/dp_matrices.h>
VRNA_MX_FLAG_G
#include <ViennaRNA/datastructures/dp_matrices.h>
VRNA_MX_FLAG_MAX
#include <ViennaRNA/datastructures/dp_matrices.h>

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.

#include <ViennaRNA/datastructures/dp_matrices.h>
typedef struct vrna_mx_pf_s vrna_mx_pf_t

Typename for the Partition Function (PF) DP matrices data structure vrna_mx_pf_s.

#include <ViennaRNA/datastructures/dp_matrices.h>

Enums

enum vrna_mx_type_e

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

#include <ViennaRNA/datastructures/dp_matrices.h>

Values:

enumerator VRNA_MX_DEFAULT

Default DP matrices.

enumerator VRNA_MX_WINDOW

DP matrices suitable for local structure prediction using window approach.

enumerator VRNA_MX_2DFOLD

DP matrices suitable for distance class partitioned structure prediction.

Functions

int vrna_mx_add(vrna_fold_compound_t *fc, vrna_mx_type_e type, unsigned int options)

Add Dynamic Programming (DP) matrices (allocate memory).

#include <ViennaRNA/datastructures/dp_matrices.h>

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.

Parameters:
  • fc – The vrna_fold_compound_t that holds pointers to the DP matrices

  • type – The type of DP matrices requested

  • options – Option 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

int vrna_mx_mfe_add(vrna_fold_compound_t *fc, vrna_mx_type_e mx_type, unsigned int options)
#include <ViennaRNA/datastructures/dp_matrices.h>
int vrna_mx_pf_add(vrna_fold_compound_t *fc, vrna_mx_type_e mx_type, unsigned int options)
#include <ViennaRNA/datastructures/dp_matrices.h>
int vrna_mx_prepare(vrna_fold_compound_t *fc, unsigned int options)
#include <ViennaRNA/datastructures/dp_matrices.h>
void vrna_mx_mfe_free(vrna_fold_compound_t *fc)

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

#include <ViennaRNA/datastructures/dp_matrices.h>

Parameters:
void vrna_mx_pf_free(vrna_fold_compound_t *fc)

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

#include <ViennaRNA/datastructures/dp_matrices.h>

Parameters:
struct vrna_mx_mfe_s
#include <ViennaRNA/datastructures/dp_matrices.h>

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

Common fields for MFE matrices

const vrna_mx_type_e type
#include <ViennaRNA/datastructures/dp_matrices.h>

Type of the DP matrices

unsigned int length

Length of the sequence, therefore an indicator of the size of the DP matrices.

#include <ViennaRNA/datastructures/dp_matrices.h>
unsigned int strands
#include <ViennaRNA/datastructures/dp_matrices.h>

Number of strands

Default DP matrices

Note

These data fields are available if

vrna_mx_mfe_t.type == VRNA_MX_DEFAULT 

int *c

Energy array, given that i-j pair.

#include <ViennaRNA/datastructures/dp_matrices.h>
int *f5

Energy of 5’ end.

#include <ViennaRNA/datastructures/dp_matrices.h>
int *f3

Energy of 3’ end.

#include <ViennaRNA/datastructures/dp_matrices.h>
int **fms5

Energy for connected interstrand configurations.

#include <ViennaRNA/datastructures/dp_matrices.h>
int **fms3

nergy for connected interstrand configurations

#include <ViennaRNA/datastructures/dp_matrices.h>
int *fML

Multi-loop auxiliary energy array.

#include <ViennaRNA/datastructures/dp_matrices.h>
int *fM1

Second ML array, only for unique multibrnach loop decomposition.

#include <ViennaRNA/datastructures/dp_matrices.h>
int *fM2

Energy for a multibranch loop region with exactly two stems, extending to 3’ end.

#include <ViennaRNA/datastructures/dp_matrices.h>
int *fM1_new

ML array with exactly one component within 5’end and i, ending at i (for circRNA).

#include <ViennaRNA/datastructures/dp_matrices.h>
int *fM2_real

Energy for a multibranch loop region with at least two stems.

#include <ViennaRNA/datastructures/dp_matrices.h>
int Fc

Minimum Free Energy of entire circular RNA.

#include <ViennaRNA/datastructures/dp_matrices.h>
int FcH

Minimum Free Energy of hairpin loop cases in circular RNA.

#include <ViennaRNA/datastructures/dp_matrices.h>
int FcI

Minimum Free Energy of internal loop cases in circular RNA.

#include <ViennaRNA/datastructures/dp_matrices.h>
int FcM

Minimum Free Energy of multibranch loop cases in circular RNA.

#include <ViennaRNA/datastructures/dp_matrices.h>

Local Folding DP matrices using window approach

Note

These data fields are available if

vrna_mx_mfe_t.type == VRNA_MX_WINDOW 

int **c_local

Energy array, given that i-j pair.

#include <ViennaRNA/datastructures/dp_matrices.h>
int *f3_local

Energy of 5’ end.

#include <ViennaRNA/datastructures/dp_matrices.h>
int **fML_local

Multi-loop auxiliary energy array.

#include <ViennaRNA/datastructures/dp_matrices.h>
int **ggg_local

Energies of g-quadruplexes.

#include <ViennaRNA/datastructures/dp_matrices.h>
unsigned int ggg_local_shift
#include <ViennaRNA/datastructures/dp_matrices.h>

Distance Class DP matrices

Note

These data fields are available if

vrna_mx_mfe_t.type == VRNA_MX_2DFOLD 

int ***E_F5
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_min_F5
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_max_F5
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_min_F5
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_max_F5
#include <ViennaRNA/datastructures/dp_matrices.h>
int ***E_F3
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_min_F3
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_max_F3
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_min_F3
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_max_F3
#include <ViennaRNA/datastructures/dp_matrices.h>
int ***E_C
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_min_C
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_max_C
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_min_C
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_max_C
#include <ViennaRNA/datastructures/dp_matrices.h>
int ***E_M
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_min_M
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_max_M
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_min_M
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_max_M
#include <ViennaRNA/datastructures/dp_matrices.h>
int ***E_M1
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_min_M1
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_max_M1
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_min_M1
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_max_M1
#include <ViennaRNA/datastructures/dp_matrices.h>
int ***E_M2
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_min_M2
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_max_M2
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_min_M2
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_max_M2
#include <ViennaRNA/datastructures/dp_matrices.h>
int **E_Fc
#include <ViennaRNA/datastructures/dp_matrices.h>
int *l_min_Fc
#include <ViennaRNA/datastructures/dp_matrices.h>
int *l_max_Fc
#include <ViennaRNA/datastructures/dp_matrices.h>
int k_min_Fc
#include <ViennaRNA/datastructures/dp_matrices.h>
int k_max_Fc
#include <ViennaRNA/datastructures/dp_matrices.h>
int **E_FcH
#include <ViennaRNA/datastructures/dp_matrices.h>
int *l_min_FcH
#include <ViennaRNA/datastructures/dp_matrices.h>
int *l_max_FcH
#include <ViennaRNA/datastructures/dp_matrices.h>
int k_min_FcH
#include <ViennaRNA/datastructures/dp_matrices.h>
int k_max_FcH
#include <ViennaRNA/datastructures/dp_matrices.h>
int **E_FcI
#include <ViennaRNA/datastructures/dp_matrices.h>
int *l_min_FcI
#include <ViennaRNA/datastructures/dp_matrices.h>
int *l_max_FcI
#include <ViennaRNA/datastructures/dp_matrices.h>
int k_min_FcI
#include <ViennaRNA/datastructures/dp_matrices.h>
int k_max_FcI
#include <ViennaRNA/datastructures/dp_matrices.h>
int **E_FcM
#include <ViennaRNA/datastructures/dp_matrices.h>
int *l_min_FcM
#include <ViennaRNA/datastructures/dp_matrices.h>
int *l_max_FcM
#include <ViennaRNA/datastructures/dp_matrices.h>
int k_min_FcM
#include <ViennaRNA/datastructures/dp_matrices.h>
int k_max_FcM
#include <ViennaRNA/datastructures/dp_matrices.h>
int *E_F5_rem
#include <ViennaRNA/datastructures/dp_matrices.h>
int *E_F3_rem
#include <ViennaRNA/datastructures/dp_matrices.h>
int *E_C_rem
#include <ViennaRNA/datastructures/dp_matrices.h>
int *E_M_rem
#include <ViennaRNA/datastructures/dp_matrices.h>
int *E_M1_rem
#include <ViennaRNA/datastructures/dp_matrices.h>
int *E_M2_rem
#include <ViennaRNA/datastructures/dp_matrices.h>
int E_Fc_rem
#include <ViennaRNA/datastructures/dp_matrices.h>
int E_FcH_rem
#include <ViennaRNA/datastructures/dp_matrices.h>
int E_FcI_rem
#include <ViennaRNA/datastructures/dp_matrices.h>
int E_FcM_rem
#include <ViennaRNA/datastructures/dp_matrices.h>

Public Members

union vrna_mx_mfe_s
#include <ViennaRNA/datastructures/dp_matrices.h>
struct vrna_mx_pf_s
#include <ViennaRNA/datastructures/dp_matrices.h>

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

Common fields for DP matrices

const vrna_mx_type_e type
#include <ViennaRNA/datastructures/dp_matrices.h>

Type of the DP matrices

unsigned int length
#include <ViennaRNA/datastructures/dp_matrices.h>

Size of the DP matrices (i.e. sequence length)

FLT_OR_DBL *scale
#include <ViennaRNA/datastructures/dp_matrices.h>

Boltzmann factor scaling

FLT_OR_DBL *expMLbase
#include <ViennaRNA/datastructures/dp_matrices.h>

Boltzmann factors for unpaired bases in multibranch loop

Default PF matrices

Note

These data fields are available if

vrna_mx_pf_t.type == VRNA_MX_DEFAULT 

FLT_OR_DBL *q
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL *qb
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL *qm
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL *qm1
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL *probs
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL *q1k
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL *qln
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL qo
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL *qm2
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL *qm2_real
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL *qm1_new
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL qho
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL qio
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL qmo
#include <ViennaRNA/datastructures/dp_matrices.h>

Local Folding DP matrices using window approach

Note

These data fields are available if

vrna_mx_mfe_t.type == VRNA_MX_WINDOW 

FLT_OR_DBL **q_local
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL **qb_local
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL **qm_local
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL **pR
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL **qm2_local
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL **QI5
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL **q2l
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL **qmb
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL **G_local
#include <ViennaRNA/datastructures/dp_matrices.h>

Distance Class DP matrices

Note

These data fields are available if

vrna_mx_pf_t.type == VRNA_MX_2DFOLD 

FLT_OR_DBL ***Q
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_min_Q
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_max_Q
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_min_Q
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_max_Q
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL ***Q_B
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_min_Q_B
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_max_Q_B
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_min_Q_B
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_max_Q_B
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL ***Q_M
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_min_Q_M
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_max_Q_M
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_min_Q_M
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_max_Q_M
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL ***Q_M1
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_min_Q_M1
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_max_Q_M1
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_min_Q_M1
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_max_Q_M1
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL ***Q_M2
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_min_Q_M2
#include <ViennaRNA/datastructures/dp_matrices.h>
int **l_max_Q_M2
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_min_Q_M2
#include <ViennaRNA/datastructures/dp_matrices.h>
int *k_max_Q_M2
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL **Q_c
#include <ViennaRNA/datastructures/dp_matrices.h>
int *l_min_Q_c
#include <ViennaRNA/datastructures/dp_matrices.h>
int *l_max_Q_c
#include <ViennaRNA/datastructures/dp_matrices.h>
int k_min_Q_c
#include <ViennaRNA/datastructures/dp_matrices.h>
int k_max_Q_c
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL **Q_cH
#include <ViennaRNA/datastructures/dp_matrices.h>
int *l_min_Q_cH
#include <ViennaRNA/datastructures/dp_matrices.h>
int *l_max_Q_cH
#include <ViennaRNA/datastructures/dp_matrices.h>
int k_min_Q_cH
#include <ViennaRNA/datastructures/dp_matrices.h>
int k_max_Q_cH
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL **Q_cI
#include <ViennaRNA/datastructures/dp_matrices.h>
int *l_min_Q_cI
#include <ViennaRNA/datastructures/dp_matrices.h>
int *l_max_Q_cI
#include <ViennaRNA/datastructures/dp_matrices.h>
int k_min_Q_cI
#include <ViennaRNA/datastructures/dp_matrices.h>
int k_max_Q_cI
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL **Q_cM
#include <ViennaRNA/datastructures/dp_matrices.h>
int *l_min_Q_cM
#include <ViennaRNA/datastructures/dp_matrices.h>
int *l_max_Q_cM
#include <ViennaRNA/datastructures/dp_matrices.h>
int k_min_Q_cM
#include <ViennaRNA/datastructures/dp_matrices.h>
int k_max_Q_cM
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL *Q_rem
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL *Q_B_rem
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL *Q_M_rem
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL *Q_M1_rem
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL *Q_M2_rem
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL Q_c_rem
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL Q_cH_rem
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL Q_cI_rem
#include <ViennaRNA/datastructures/dp_matrices.h>
FLT_OR_DBL Q_cM_rem
#include <ViennaRNA/datastructures/dp_matrices.h>

Public Members

union vrna_mx_pf_s
#include <ViennaRNA/datastructures/dp_matrices.h>