RNAlib-2.2.0c
Basic Data Structures for Structure Prediction and Evaluation

This module provides interfaces that deal with the most basic data structures used in structure predicting and energy evaluating function of the RNAlib. More...

+ Collaboration diagram for Basic Data Structures for Structure Prediction and Evaluation:

Data Structures

struct  vrna_mx_mfeT
 
struct  vrna_mx_pfT
 
struct  vrna_fold_compound
 

Macros

#define VRNA_VC_TYPE_SINGLE   1
 fold_compound_type Single Sequence
 
#define VRNA_VC_TYPE_ALIGNMENT   2
 fold_compound_type Sequence Alignment
 
#define VRNA_OPTION_MFE   1
 Option flag to specify requirement of Minimum Free Energy (MFE) DP matrices and corresponding set of energy parameters. More...
 
#define VRNA_OPTION_PF   2
 Option flag to specify requirement of Partition Function (PF) DP matrices and corresponding set of Boltzmann factors. More...
 
#define VRNA_OPTION_EVAL_ONLY   8
 Option flag to specify that neither MFE, nor PF DP matrices are required. More...
 

Functions

vrna_fold_compoundvrna_get_fold_compound (const char *sequence, model_detailsT *md_p, unsigned int options)
 Retrieve a vrna_fold_compound data structure for single sequences and hybridizing sequences. More...
 
vrna_fold_compoundvrna_get_fold_compound_ali (const char **sequences, model_detailsT *md_p, unsigned int options)
 Retrieve a vrna_fold_compound data structure for sequence alignments. More...
 
void vrna_free_fold_compound (vrna_fold_compound *vc)
 Free memory occupied by a vrna_fold_compound. More...
 
void vrna_free_mfe_matrices (vrna_fold_compound *vc)
 Free memory occupied by the Minimum Free Energy (MFE) Dynamic Programming (DP) matrices. More...
 
void vrna_free_pf_matrices (vrna_fold_compound *vc)
 Free memory occupied by the Partition Function (PF) Dynamic Programming (DP) matrices. More...
 

Detailed Description

This module provides interfaces that deal with the most basic data structures used in structure predicting and energy evaluating function of the RNAlib.

Throughout the RNAlib, a data structure, the vrna_fold_compound, is used to group information and data that is required for structure prediction and energy evaluation. Here, you'll find interface functions to create, modify, and delete vrna_fold_compound data structures.

Macro Definition Documentation

#define VRNA_OPTION_MFE   1

Option flag to specify requirement of Minimum Free Energy (MFE) DP matrices and corresponding set of energy parameters.

See Also
vrna_get_fold_compound(), vrna_get_fold_compound_ali(), VRNA_OPTION_EVAL_ONLY
#define VRNA_OPTION_PF   2

Option flag to specify requirement of Partition Function (PF) DP matrices and corresponding set of Boltzmann factors.

See Also
vrna_get_fold_compound(), vrna_get_fold_compound_ali(), VRNA_OPTION_EVAL_ONLY
#define VRNA_OPTION_EVAL_ONLY   8

Option flag to specify that neither MFE, nor PF DP matrices are required.

Use this flag in conjuntion with VRNA_OPTION_MFE, and VRNA_OPTION_PF to save memory for a vrna_fold_compound obtained from vrna_get_fold_compound(), or vrna_get_fold_compound_ali() in cases where only energy evaluation but no structure prediction is required.

See Also
vrna_get_fold_compound(), vrna_get_fold_compound_ali(), vrna_eval_structure()

Function Documentation

vrna_fold_compound* vrna_get_fold_compound ( const char *  sequence,
model_detailsT md_p,
unsigned int  options 
)

Retrieve a vrna_fold_compound data structure for single sequences and hybridizing sequences.

This function provides an easy interface to obtain a prefilled vrna_fold_compound by passing a single sequence, or two contatenated sequences as input. For the latter, sequences need to be seperated by an '&' character like this:

char *sequence = "GGGG&CCCC"; 

The optional parameter 'md_p' can be used to specify the model details for computations on the #vrna_fold_compounds content. The third parameter 'options' is used to specify the DP matrix requirements and the corresponding set of energy parameters. Use the macros:

to specify the required type of computations that will be performed with the vrna_fold_compound.

Note
The sequence string must be uppercase, and should contain only RNA (resp. DNA) alphabet depending on what energy parameter set is used
See Also
vrna_get_fold_compound_ali(), model_detailsT, VRNA_OPTION_MFE, VRNA_OPTION_PF, VRNA_OPTION_EVAL_ONLY
Parameters
sequenceA single sequence, or two concatenated sequences seperated by an '&' character
md_pAn optional set of model details
optionsThe options for DP matrices memory allocation
Returns
A prefilled vrna_fold_compound that can be readily used for computations
vrna_fold_compound* vrna_get_fold_compound_ali ( const char **  sequences,
model_detailsT md_p,
unsigned int  options 
)

Retrieve a vrna_fold_compound data structure for sequence alignments.

This function provides an easy interface to obtain a prefilled vrna_fold_compound by passing an alignment of sequences.

The optional parameter 'md_p' can be used to specify the model details for computations on the #vrna_fold_compounds content. The third parameter 'options' is used to specify the DP matrix requirements and the corresponding set of energy parameters. Use the macros:

to specify the required type of computations that will be performed with the vrna_fold_compound.

Note
The sequence strings must be uppercase, and should contain only RNA (resp. DNA) alphabet including gap characters depending on what energy parameter set is used.
See Also
vrna_get_fold_compound(), model_detailsT, VRNA_OPTION_MFE, VRNA_OPTION_PF, VRNA_OPTION_EVAL_ONLY, read_clustal()
Parameters
sequencesA sequence alignment including 'gap' characters
md_pAn optional set of model details
optionsThe options for DP matrices memory allocation
Returns
A prefilled vrna_fold_compound that can be readily used for computations
void vrna_free_fold_compound ( vrna_fold_compound vc)

Free memory occupied by a vrna_fold_compound.

See Also
vrna_get_fold_compound(), vrna_get_fold_compound_ali(), vrna_free_mfe_matrices(), vrna_free_pf_matrices()
Parameters
vcThe vrna_fold_compound that is to be erased from memory
void vrna_free_mfe_matrices ( vrna_fold_compound vc)

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

See Also
vrna_get_fold_compound(), vrna_get_fold_compound_ali(), vrna_free_fold_compound(), vrna_free_pf_matrices()
Parameters
vcThe vrna_fold_compound storing the MFE DP matrices that are to be erased from memory
void vrna_free_pf_matrices ( vrna_fold_compound vc)

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

See Also
vrna_get_fold_compound(), vrna_get_fold_compound_ali(), vrna_free_fold_compound(), vrna_free_mfe_matrices()
Parameters
vcThe vrna_fold_compound storing the PF DP matrices that are to be erased from memory