RNAlib-2.4.14
Local (sliding window) MFE Prediction

Variations of the local (sliding window) Minimum Free Energy (MFE) prediction algorithm. More...

Detailed Description

Variations of the local (sliding window) Minimum Free Energy (MFE) prediction algorithm.

We provide implementations for the local (sliding window) MFE prediction algorithm for

Note, that our implementation scans an RNA sequence (or MSA) from the 3' to the 5' end, and reports back locally optimal (consensus) structures, the corresponding free energy, and the position of the sliding window in global coordinates.

For any particular RNA sequence (or MSA) multiple locally optimal (consensus) secondary structures may be predicted. Thus, we tried to implement an interface that allows for an effortless conversion of the corresponding hits into any target data structure. As a consequence, we provide two distinct ways to retrieve the corresponding predictions, either

The latter allows one to store the results in any possible target data structure. Our implementations then pass the results through the user-implemented callback as soon as the prediction for a particular window is finished.

+ Collaboration diagram for Local (sliding window) MFE Prediction:

Modules

 Deprecated Interface for Local (Sliding Window) MFE Prediction
 

Files

file  mfe_window.h
 Compute local Minimum Free Energy (MFE) using a sliding window approach and backtrace corresponding secondary structures.
 

Typedefs

typedef void( vrna_mfe_window_callback) (int start, int end, const char *structure, float en, void *data)
 The default callback for sliding window MFE structure predictions. More...
 

Basic local (sliding window) MFE prediction interface

float vrna_mfe_window (vrna_fold_compound_t *vc, FILE *file)
 Local MFE prediction using a sliding window approach. More...
 
float vrna_mfe_window_cb (vrna_fold_compound_t *vc, vrna_mfe_window_callback *cb, void *data)
 
float vrna_mfe_window_zscore (vrna_fold_compound_t *vc, double min_z, FILE *file)
 Local MFE prediction using a sliding window approach (with z-score cut-off) More...
 
float vrna_mfe_window_zscore_cb (vrna_fold_compound_t *vc, double min_z, vrna_mfe_window_zscore_callback *cb, void *data)
 

Simplified local MFE prediction using sequence(s) or multiple sequence alignment(s)

float vrna_Lfold (const char *string, int window_size, FILE *file)
 Local MFE prediction using a sliding window approach (simplified interface) More...
 
float vrna_Lfold_cb (const char *string, int window_size, vrna_mfe_window_callback *cb, void *data)
 
float vrna_Lfoldz (const char *string, int window_size, double min_z, FILE *file)
 Local MFE prediction using a sliding window approach with z-score cut-off (simplified interface) More...
 
float vrna_Lfoldz_cb (const char *string, int window_size, double min_z, vrna_mfe_window_zscore_callback *cb, void *data)
 
float vrna_aliLfold (const char **alignment, int maxdist, FILE *fp)
 
float vrna_aliLfold_cb (const char **alignment, int maxdist, vrna_mfe_window_callback *cb, void *data)
 

Typedef Documentation

typedef void( vrna_mfe_window_callback) (int start, int end, const char *structure, float en, void *data)

#include <ViennaRNA/mfe_window.h>

The default callback for sliding window MFE structure predictions.

Notes on Callback Functions:
This function will be called for each hit in a sliding window MFE prediction.
See also
vrna_mfe_window()
Parameters
startprovides the first position of the hit (1-based, relative to entire sequence/alignment)
endprovides the last position of the hit (1-based, relative to the entire sequence/alignment)
structureprovides the (sub)structure in dot-bracket notation
enis the free energy of the structure hit in kcal/mol
datais some arbitrary data pointer passed through by the function executing the callback

Function Documentation

float vrna_mfe_window ( vrna_fold_compound_t vc,
FILE *  file 
)

#include <ViennaRNA/mfe_window.h>

Local MFE prediction using a sliding window approach.

Computes minimum free energy structures using a sliding window approach, where base pairs may not span outside the window. In contrast to vrna_mfe(), where a maximum base pair span may be set using the vrna_md_t.max_bp_span attribute and one globally optimal structure is predicted, this function uses a sliding window to retrieve all locally optimal structures within each window. The size of the sliding window is set in the vrna_md_t.window_size attribute, prior to the retrieval of the vrna_fold_compound_t using vrna_fold_compound() with option VRNA_OPTION_WINDOW

The predicted structures are written on-the-fly, either to stdout, if a NULL pointer is passed as file parameter, or to the corresponding filehandle.

See also
vrna_fold_compound(), vrna_mfe_window_zscore(), vrna_mfe(), vrna_Lfold(), vrna_Lfoldz(), VRNA_OPTION_WINDOW, vrna_md_t.max_bp_span, vrna_md_t.window_size
Parameters
vcThe vrna_fold_compound_t with preallocated memory for the DP matrices
fileThe output file handle where predictions are written to (maybe NULL)
SWIG Wrapper Notes:
This function is attached as method mfe_window() to objects of type fold_compound
float vrna_mfe_window_zscore ( vrna_fold_compound_t vc,
double  min_z,
FILE *  file 
)

#include <ViennaRNA/mfe_window.h>

Local MFE prediction using a sliding window approach (with z-score cut-off)

Computes minimum free energy structures using a sliding window approach, where base pairs may not span outside the window. This function is the z-score version of vrna_mfe_window(), i.e. only predictions above a certain z-score cut-off value are printed. As for vrna_mfe_window(), the size of the sliding window is set in the vrna_md_t.window_size attribute, prior to the retrieval of the vrna_fold_compound_t using vrna_fold_compound() with option VRNA_OPTION_WINDOW.

The predicted structures are written on-the-fly, either to stdout, if a NULL pointer is passed as file parameter, or to the corresponding filehandle.

See also
vrna_fold_compound(), vrna_mfe_window_zscore(), vrna_mfe(), vrna_Lfold(), vrna_Lfoldz(), VRNA_OPTION_WINDOW, vrna_md_t.max_bp_span, vrna_md_t.window_size
Parameters
vcThe vrna_fold_compound_t with preallocated memory for the DP matrices
min_zThe minimal z-score for a predicted structure to appear in the output
fileThe output file handle where predictions are written to (maybe NULL)
float vrna_Lfold ( const char *  string,
int  window_size,
FILE *  file 
)

#include <ViennaRNA/mfe_window.h>

Local MFE prediction using a sliding window approach (simplified interface)

This simplified interface to vrna_mfe_window() computes the MFE and locally optimal secondary structure using default options. Structures are predicted using a sliding window approach, where base pairs may not span outside the window. Memory required for dynamic programming (DP) matrices will be allocated and free'd on-the-fly. Hence, after return of this function, the recursively filled matrices are not available any more for any post-processing.

Note
In case you want to use the filled DP matrices for any subsequent post-processing step, or you require other conditions than specified by the default model details, use vrna_mfe_window(), and the data structure vrna_fold_compound_t instead.
See also
vrna_mfe_window(), vrna_Lfoldz(), vrna_mfe_window_zscore()
Parameters
stringThe nucleic acid sequence
window_sizeThe window size for locally optimal structures
fileThe output file handle where predictions are written to (if NULL, output is written to stdout)
float vrna_Lfoldz ( const char *  string,
int  window_size,
double  min_z,
FILE *  file 
)

#include <ViennaRNA/mfe_window.h>

Local MFE prediction using a sliding window approach with z-score cut-off (simplified interface)

This simplified interface to vrna_mfe_window_zscore() computes the MFE and locally optimal secondary structure using default options. Structures are predicted using a sliding window approach, where base pairs may not span outside the window. Memory required for dynamic programming (DP) matrices will be allocated and free'd on-the-fly. Hence, after return of this function, the recursively filled matrices are not available any more for any post-processing. This function is the z-score version of vrna_Lfold(), i.e. only predictions above a certain z-score cut-off value are printed.

Note
In case you want to use the filled DP matrices for any subsequent post-processing step, or you require other conditions than specified by the default model details, use vrna_mfe_window(), and the data structure vrna_fold_compound_t instead.
See also
vrna_mfe_window_zscore(), vrna_Lfold(), vrna_mfe_window()
Parameters
stringThe nucleic acid sequence
window_sizeThe window size for locally optimal structures
min_zThe minimal z-score for a predicted structure to appear in the output
fileThe output file handle where predictions are written to (if NULL, output is written to stdout)