Minimum Free Energy (MFE)#
Global MFE Prediction#
Functions related tor global Minimum Free Energy (MFE) prediction algorithms.
Basic global MFE prediction interface
-
float vrna_mfe(vrna_fold_compound_t *fc, char *structure)#
Compute minimum free energy and an appropriate secondary structure of an RNA sequence, or RNA sequence alignment.
#include <ViennaRNA/mfe/global.h>
Depending on the type of the provided vrna_fold_compound_t, this function predicts the MFE for a single sequence (or connected component of multiple sequences), or an averaged MFE for a sequence alignment. If backtracking is activated, it also constructs the corresponding secondary structure, or consensus structure. Therefore, the second parameter, structure, has to point to an allocated block of memory with a size of at least \(\mathrm{strlen}(\mathrm{sequence})+1\) to store the backtracked MFE structure. (For consensus structures, this is the length of the alignment + 1. If
NULLis passed, no backtracking will be performed.- SWIG Wrapper Notes:
This function is attached as method
Minimum Free Energy (MFE) Algorithmsto objects of typeThe Fold Compound. The parameterstructureis returned along with the MFE und must not be provided. See e.g.RNA.fold_compound.mfe()in the The RNA Python module.
See also
vrna_fold_compound_t, vrna_fold_compound(), vrna_fold(), vrna_circfold(), vrna_fold_compound_comparative(), vrna_alifold(), vrna_circalifold()
Note
This function is polymorphic. It accepts vrna_fold_compound_t of type VRNA_FC_TYPE_SINGLE, and VRNA_FC_TYPE_COMPARATIVE.
- Parameters:
fc – fold compound
structure – A pointer to the character array where the secondary structure in dot-bracket notation will be written to (Maybe NULL)
- Returns:
the minimum free energy (MFE) in kcal/mol
-
float vrna_mfe_dimer(vrna_fold_compound_t *fc, char *structure)#
Compute the minimum free energy of two interacting RNA molecules.
#include <ViennaRNA/mfe/global.h>
The code is analog to the vrna_mfe() function.
- Deprecated:
This function is obsolete since vrna_mfe() can handle complexes multiple sequences since v2.5.0. Use vrna_mfe() for connected component MFE instead and compute MFEs of unconnected states separately.
- SWIG Wrapper Notes:
This function is attached as method
mfe_dimer()to objects of typeThe Fold Compound. The parameterstructureis returned along with the MFE und must not be provided. See e.g.RNA.fold_compound.mfe_dimer()in the The RNA Python module.
See also
- Parameters:
fc – fold compound
structure – Will hold the barcket dot structure of the dimer molecule
- Returns:
minimum free energy of the structure
Simplified global MFE prediction using sequence(s) or multiple sequence alignment(s)
-
float vrna_fold(const char *sequence, char *structure)#
Compute Minimum Free Energy (MFE), and a corresponding secondary structure for an RNA sequence.
#include <ViennaRNA/mfe/global.h>
This simplified interface to vrna_mfe() computes the MFE and, if required, a secondary structure for an RNA sequence using default options. 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, e.g. suboptimal backtracking, etc.
- SWIG Wrapper Notes:
This function is available as function
fold()in the global namespace. The parameterstructureis returned along with the MFE und must not be provided. See e.g.RNA.fold()in the The RNA Python module.
See also
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(), and the data structure vrna_fold_compound_t instead.
- Parameters:
sequence – RNA sequence
structure – A pointer to the character array where the secondary structure in dot-bracket notation will be written to
- Returns:
the minimum free energy (MFE) in kcal/mol
-
float vrna_circfold(const char *sequence, char *structure)#
Compute Minimum Free Energy (MFE), and a corresponding secondary structure for a circular RNA sequence.
#include <ViennaRNA/mfe/global.h>
This simplified interface to vrna_mfe() computes the MFE and, if required, a secondary structure for a circular RNA sequence using default options. 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, e.g. suboptimal backtracking, etc.
Folding of circular RNA sequences is handled as a post-processing step of the forward recursions. See Hofacker and Stadler [2006] for further details.
- SWIG Wrapper Notes:
This function is available as function
circfold()in the global namespace. The parameterstructureis returned along with the MFE und must not be provided. See e.g.RNA.circfold()in the The RNA Python module.
See also
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(), and the data structure vrna_fold_compound_t instead.
- Parameters:
sequence – RNA sequence
structure – A pointer to the character array where the secondary structure in dot-bracket notation will be written to
- Returns:
the minimum free energy (MFE) in kcal/mol
-
float vrna_alifold(const char **sequences, char *structure)#
Compute Minimum Free Energy (MFE), and a corresponding consensus secondary structure for an RNA sequence alignment using a comparative method.
#include <ViennaRNA/mfe/global.h>
This simplified interface to vrna_mfe() computes the MFE and, if required, a consensus secondary structure for an RNA sequence alignment using default options. 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, e.g. suboptimal backtracking, etc.
- SWIG Wrapper Notes:
This function is available as function
alifold()in the global namespace. The parameterstructureis returned along with the MFE und must not be provided. See e.g.RNA.alifold()in the The RNA Python module.
See also
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(), and the data structure vrna_fold_compound_t instead.
- Parameters:
sequences – RNA sequence alignment
structure – A pointer to the character array where the secondary structure in dot-bracket notation will be written to
- Returns:
the minimum free energy (MFE) in kcal/mol
-
float vrna_circalifold(const char **sequences, char *structure)#
Compute Minimum Free Energy (MFE), and a corresponding consensus secondary structure for a sequence alignment of circular RNAs using a comparative method.
#include <ViennaRNA/mfe/global.h>
This simplified interface to vrna_mfe() computes the MFE and, if required, a consensus secondary structure for an RNA sequence alignment using default options. 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, e.g. suboptimal backtracking, etc.
Folding of circular RNA sequences is handled as a post-processing step of the forward recursions. See Hofacker and Stadler [2006] for further details.
- SWIG Wrapper Notes:
This function is available as function
circalifold()in the global namespace. The parameterstructureis returned along with the MFE und must not be provided. See e.g.RNA.circalifold()in the The RNA Python module.
See also
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(), and the data structure vrna_fold_compound_t instead.
- Parameters:
sequences – Sequence alignment of circular RNAs
structure – A pointer to the character array where the secondary structure in dot-bracket notation will be written to
- Returns:
the minimum free energy (MFE) in kcal/mol
-
float vrna_cofold(const char *sequence, char *structure)#
Compute Minimum Free Energy (MFE), and a corresponding secondary structure for two dimerized RNA sequences.
#include <ViennaRNA/mfe/global.h>
This simplified interface to vrna_mfe() computes the MFE and, if required, a secondary structure for two RNA sequences upon dimerization using default options. 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, e.g. suboptimal backtracking, etc.
- Deprecated:
This function is obsolete since vrna_mfe()/vrna_fold() can handle complexes multiple sequences since v2.5.0. Use vrna_mfe()/vrna_fold() for connected component MFE instead and compute MFEs of unconnected states separately.
- SWIG Wrapper Notes:
This function is available as function
cofold()in the global namespace. The parameterstructureis returned along with the MFE und must not be provided. See e.g.RNA.cofold()in the The RNA Python module.
See also
vrna_fold(), vrna_mfe(), vrna_fold_compound(), vrna_fold_compound_t, vrna_cut_point_insert()
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(), and the data structure vrna_fold_compound_t instead.
- Parameters:
sequence – two RNA sequences separated by the ‘&’ character
structure – A pointer to the character array where the secondary structure in dot-bracket notation will be written to
- Returns:
the minimum free energy (MFE) in kcal/mol
-
float vrna_mfe(vrna_fold_compound_t *fc, char *structure)#
Local MFE Prediction#
Functions related tor local (sliding window) Minimum Free Energy (MFE) prediction algorithms.
Basic local (sliding window) MFE prediction interface
-
float vrna_mfe_window(vrna_fold_compound_t *fc, FILE *file)#
Local MFE prediction using a sliding window approach.
#include <ViennaRNA/mfe/local.h>
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.
- SWIG Wrapper Notes:
This function is attached as overloaded method
Local (sliding window) MFE Predictionto objects of typeThe Fold Compound. The parameterFILEhas default value ofNULLand can be omitted. See e.g.RNA.fold_compound.mfe_window()in the The RNA Python module.
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:
fc – The vrna_fold_compound_t with preallocated memory for the DP matrices
file – The output file handle where predictions are written to (maybe NULL)
-
float vrna_mfe_window_cb(vrna_fold_compound_t *fc, vrna_mfe_window_f cb, void *data)#
#include <ViennaRNA/mfe/local.h>
- SWIG Wrapper Notes:
This function is attached as overloaded method
mfe_window_cb()to objects of typeThe Fold Compound. The parameterdatahas default value ofNULLand can be omitted. See e.g.RNA.fold_compound.mfe_window_cb()in the The RNA Python module.
-
float vrna_mfe_window_zscore(vrna_fold_compound_t *fc, double min_z, FILE *file)#
Local MFE prediction using a sliding window approach (with z-score cut-off).
#include <ViennaRNA/mfe/local.h>
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.
- SWIG Wrapper Notes:
This function is attached as overloaded method
mfe_window_zscore()to objects of typeThe Fold Compound. The parameterFILEhas default value ofNULLand can be omitted. See e.g.RNA.fold_compound.mfe_window_zscore()in the The RNA Python module.
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:
fc – The vrna_fold_compound_t with preallocated memory for the DP matrices
min_z – The minimal z-score for a predicted structure to appear in the output
file – The output file handle where predictions are written to (maybe NULL)
-
float vrna_mfe_window_zscore_cb(vrna_fold_compound_t *fc, double min_z, vrna_mfe_window_zscore_f cb, void *data)#
#include <ViennaRNA/mfe/local.h>
- SWIG Wrapper Notes:
This function is attached as overloaded method
mfe_window_zscore_cb()to objects of typeThe Fold Compound. The parameterdatahas default value ofNULLand can be omitted. See e.g.RNA.fold_compound.mfe_window_zscore()in the The RNA Python module.
-
int vrna_backtrack_window(vrna_fold_compound_t *fc, const char *Lfold_filename, long file_pos, char **structure, double mfe)#
#include <ViennaRNA/mfe/local.h>
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).
#include <ViennaRNA/mfe/local.h>
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.
- SWIG Wrapper Notes:
This function is available as overloaded function
Lfold()in the global namespace. The parameterfiledefaults toNULLand may be omitted. See e.g.RNA.Lfold()in the The RNA Python module.
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.
- Parameters:
string – The nucleic acid sequence
window_size – The window size for locally optimal structures
file – The output file handle where predictions are written to (if NULL, output is written to stdout)
-
float vrna_Lfold_cb(const char *string, int window_size, vrna_mfe_window_f cb, void *data)#
#include <ViennaRNA/mfe/local.h>
- SWIG Wrapper Notes:
This function is available as overloaded function
Lfold_cb()in the global namespace. The parameterdatadefaults toNULLand may be omitted. See e.g.RNA.Lfold_cb()in the The RNA Python module.
-
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).
#include <ViennaRNA/mfe/local.h>
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.
- Parameters:
string – The nucleic acid sequence
window_size – The window size for locally optimal structures
min_z – The minimal z-score for a predicted structure to appear in the output
file – The output file handle where predictions are written to (if NULL, output is written to stdout)
-
float vrna_Lfoldz_cb(const char *string, int window_size, double min_z, vrna_mfe_window_zscore_f cb, void *data)#
#include <ViennaRNA/mfe/local.h>
- SWIG Wrapper Notes:
This function is available as overloaded function
Lfoldz_cb()in the global namespace. The parameterdatadefaults toNULLand may be omitted. See e.g.RNA.Lfoldz_cb()in the The RNA Python module.
-
float vrna_aliLfold(const char **alignment, int maxdist, FILE *fp)#
#include <ViennaRNA/mfe/local.h>
- SWIG Wrapper Notes:
This function is available as overloaded function
aliLfold()in the global namespace. The parameterfpdefaults toNULLand may be omitted. See e.g.RNA.aliLfold()in the The RNA Python module.
-
float vrna_aliLfold_cb(const char **alignment, int maxdist, vrna_mfe_window_f cb, void *data)#
#include <ViennaRNA/mfe/local.h>
- SWIG Wrapper Notes:
This function is available as overloaded function
aliLfold_cb()in the global namespace. The parameterdatadefaults toNULLand may be omitted. See e.g.RNA.aliLfold_cb()in the The RNA Python module.
Typedefs
-
typedef void (*vrna_mfe_window_f)(unsigned int start, unsigned int end, const char *structure, float en, void *data)#
The default callback for sliding window MFE structure predictions.
#include <ViennaRNA/mfe/local.h>
- Notes on Callback Functions:
This function will be called for each hit in a sliding window MFE prediction.
See also
- Param start:
provides the first position of the hit (1-based, relative to entire sequence/alignment)
- Param end:
provides the last position of the hit (1-based, relative to the entire sequence/alignment)
- Param structure:
provides the (sub)structure in dot-bracket notation
- Param en:
is the free energy of the structure hit in kcal/mol
- Param data:
is some arbitrary data pointer passed through by the function executing the callback
-
typedef void vrna_mfe_window_callback(int start, int end, const char *structure, float en, void *data)#
#include <ViennaRNA/mfe/local.h>
-
typedef void (*vrna_mfe_window_zscore_f)(unsigned int start, unsigned int end, const char *structure, float en, float zscore, void *data)#
#include <ViennaRNA/mfe/local.h>
-
typedef void vrna_mfe_window_zscore_callback(int start, int end, const char *structure, float en, float zscore, void *data)#
#include <ViennaRNA/mfe/local.h>
-
float vrna_mfe_window(vrna_fold_compound_t *fc, FILE *file)#
Backtracking MFE structures#
Backtracking related API
Functions
-
unsigned int vrna_bt_f(vrna_fold_compound_t *fc, unsigned int i, unsigned int j, vrna_bps_t bp_stack, vrna_bts_t bt_stack)#
#include <ViennaRNA/backtrack/exterior.h>
-
unsigned int vrna_bt_exterior_f5(vrna_fold_compound_t *fc, unsigned int j, vrna_bps_t bp_stack, vrna_bts_t bt_stack)#
#include <ViennaRNA/backtrack/exterior.h>
-
unsigned int vrna_bt_exterior_f3(vrna_fold_compound_t *fc, unsigned int i, unsigned int j, vrna_bps_t bp_stack, vrna_bts_t bt_stack)#
#include <ViennaRNA/backtrack/exterior.h>
-
unsigned int vrna_bt_exterior_f3_pp(vrna_fold_compound_t *fc, unsigned int *i, unsigned int maxdist)#
#include <ViennaRNA/backtrack/exterior.h>
-
int vrna_backtrack_from_intervals(vrna_fold_compound_t *fc, vrna_bp_stack_t *bp_stack, sect bt_stack[], int s)#
Backtrack a secondary structure with pre-evaluated structure components.
#include <ViennaRNA/backtrack/global.h>
-
float vrna_backtrack5(vrna_fold_compound_t *fc, unsigned int length, char *structure)#
Backtrack an MFE (sub)structure.
#include <ViennaRNA/backtrack/global.h>
This function allows one to backtrack the MFE structure for a (sub)sequence
- SWIG Wrapper Notes:
This function is attached as overloaded method
backtrack()to objects of typeThe Fold Compound. The parameterlengthdefaults to the total length of the RNA sequence and may be omitted. The parameterstructureis returned along with the MFE und must not be provided. See e.g.RNA.fold_compound.backtrack()in the The RNA Python module.
See also
Note
On error, the function returns INF / 100. and stores the empty string in
structure.- Parameters:
fc – fold compound
length – The length of the subsequence, starting from the 5’ end
structure – A pointer to the character array where the secondary structure in dot-bracket notation will be written to. (Must have size of at least $p length + 1)
- Pre:
Requires pre-filled MFE dynamic programming matrices, i.e. one has to call vrna_mfe() prior to calling this function
- Returns:
The minimum free energy (MFE) for the specified
lengthin kcal/mol and a corresponding secondary structure in dot-bracket notation (stored instructure)
-
int vrna_bt_hairpin(vrna_fold_compound_t *fc, unsigned int i, unsigned int j, int en, vrna_bps_t bp_stack, vrna_bts_t bt_stack)#
Backtrack a hairpin loop closed by \( (i,j) \).
#include <ViennaRNA/backtrack/hairpin.h>
Note
This function is polymorphic! The provided vrna_fold_compound_t may be of type VRNA_FC_TYPE_SINGLE or VRNA_FC_TYPE_COMPARATIVE
-
int vrna_bt_stacked_pairs(vrna_fold_compound_t *fc, unsigned int i, unsigned int j, int *en, vrna_bps_t bp_stack, vrna_bts_t bt_stack)#
Backtrack a stacked pair closed by \( (i,j) \).
#include <ViennaRNA/backtrack/internal.h>
-
int vrna_bt_internal_loop(vrna_fold_compound_t *fc, unsigned int i, unsigned int j, int en, vrna_bps_t bp_stack, vrna_bts_t bt_stack)#
Backtrack an internal loop closed by \( (i,j) \).
#include <ViennaRNA/backtrack/internal.h>
-
unsigned int vrna_bt_m(vrna_fold_compound_t *fc, unsigned int i, unsigned int j, vrna_bps_t bp_stack, vrna_bts_t bt_stack)#
#include <ViennaRNA/backtrack/multibranch.h>
-
unsigned int vrna_bt_multibranch_loop(vrna_fold_compound_t *fc, unsigned int i, unsigned int j, int en, vrna_bps_t bp_stack, vrna_bts_t bt_stack)#
Backtrack the decomposition of a multi branch loop closed by \( (i,j) \).
#include <ViennaRNA/backtrack/multibranch.h>
- Parameters:
fc – The vrna_fold_compound_t filled with all relevant data for backtracking
i – 5’ position of base pair closing the loop (will be set to 5’ position of leftmost decomposed block upon successful backtracking)
j – 3’ position of base pair closing the loop (will be set to 3’ position of rightmost decomposed block upon successful backtracking)
en – The energy contribution of the substructure enclosed by \( (i,j) \)
bp_stack – The base pair stack
bt_stack – The backtrack stack
- Returns:
1, if backtracking succeeded, 0 otherwise.
-
unsigned int vrna_bt_multibranch_split(vrna_fold_compound_t *fc, unsigned int i, unsigned int j, vrna_bps_t bp_stack, vrna_bts_t bt_stack)#
#include <ViennaRNA/backtrack/multibranch.h>
-
unsigned int vrna_bt_f(vrna_fold_compound_t *fc, unsigned int i, unsigned int j, vrna_bps_t bp_stack, vrna_bts_t bt_stack)#
Deprecated MFE API#
Unnamed Group
-
float alifold(const char **strings, char *structure)#
Compute MFE and according consensus structure of an alignment of sequences.
#include <ViennaRNA/alifold.h>
This function predicts the consensus structure for the aligned ‘sequences’ and returns the minimum free energy; the mfe structure in bracket notation is returned in ‘structure’.
Sufficient space must be allocated for ‘structure’ before calling alifold().
- Deprecated:
Usage of this function is discouraged! Use vrna_alifold(), or vrna_mfe() instead!
See also
- Parameters:
strings – A pointer to a NULL terminated array of character arrays
structure – A pointer to a character array that may contain a constraining consensus structure (will be overwritten by a consensus structure that exhibits the MFE)
- Returns:
The free energy score in kcal/mol
-
float circalifold(const char **strings, char *structure)#
Compute MFE and according structure of an alignment of sequences assuming the sequences are circular instead of linear.
#include <ViennaRNA/alifold.h>
- Deprecated:
Usage of this function is discouraged! Use vrna_alicircfold(), and vrna_mfe() instead!
See also
vrna_alicircfold(), vrna_alifold(), vrna_mfe()
- Parameters:
strings – A pointer to a NULL terminated array of character arrays
structure – A pointer to a character array that may contain a constraining consensus structure (will be overwritten by a consensus structure that exhibits the MFE)
- Returns:
The free energy score in kcal/mol
-
void free_alifold_arrays(void)#
Free the memory occupied by MFE alifold functions.
#include <ViennaRNA/alifold.h>
- Deprecated:
Usage of this function is discouraged! It only affects memory being free’d that was allocated by an old API function before. Release of memory occupied by the newly introduced vrna_fold_compound_t is handled by vrna_fold_compound_free()
See also
Functions
-
void update_alifold_params(void)#
Update the energy parameters for alifold function.
#include <ViennaRNA/alifold.h>
Call this to recalculate the pair matrix and energy parameters after a change in folding parameters like temperature
- Deprecated:
Usage of this function is discouraged! The new API uses vrna_fold_compound_t to lump all folding related necessities together, including the energy parameters. Use vrna_update_fold_params() to update the energy parameters within a vrna_fold_compound_t.
-
float cofold(const char *sequence, char *structure)#
Compute the minimum free energy of two interacting RNA molecules.
#include <ViennaRNA/cofold.h>
The code is analog to the fold() function. If cut_point ==-1 results should be the same as with fold().
- Deprecated:
use vrna_mfe_dimer() instead
- Parameters:
sequence – The two sequences concatenated
structure – Will hold the barcket dot structure of the dimer molecule
- Returns:
minimum free energy of the structure
-
float cofold_par(const char *string, char *structure, vrna_param_t *parameters, int is_constrained)#
Compute the minimum free energy of two interacting RNA molecules.
#include <ViennaRNA/cofold.h>
- Deprecated:
use vrna_mfe_dimer() instead
-
void free_co_arrays(void)#
Free memory occupied by cofold().
#include <ViennaRNA/cofold.h>
- Deprecated:
This function will only free memory allocated by a prior call of cofold() or cofold_par(). See vrna_mfe_dimer() for how to use the new API
See also
vrna_fc_destroy(), vrna_mfe_dimer()
Note
folding matrices now reside in the fold compound, and should be free’d there
-
void update_cofold_params(void)#
Recalculate parameters.
#include <ViennaRNA/cofold.h>
- Deprecated:
See vrna_params_subst() for an alternative using the new API
-
void update_cofold_params_par(vrna_param_t *parameters)#
Recalculate parameters.
#include <ViennaRNA/cofold.h>
- Deprecated:
See vrna_params_subst() for an alternative using the new API
-
void export_cofold_arrays_gq(int **f5_p, int **c_p, int **fML_p, int **fM1_p, int **fc_p, int **ggg_p, int **indx_p, char **ptype_p)#
Export the arrays of partition function cofold (with gquadruplex support).
#include <ViennaRNA/cofold.h>
Export the cofold arrays for use e.g. in the concentration Computations or suboptimal secondary structure backtracking
- Deprecated:
folding matrices now reside within the fold compound. Thus, this function will only work in conjunction with a prior call to cofold() or cofold_par()
See also
vrna_mfe_dimer() for the new API
- Parameters:
f5_p – A pointer to the ‘f5’ array, i.e. array conatining best free energy in interval [1,j]
c_p – A pointer to the ‘c’ array, i.e. array containing best free energy in interval [i,j] given that i pairs with j
fML_p – A pointer to the ‘M’ array, i.e. array containing best free energy in interval [i,j] for any multiloop segment with at least one stem
fM1_p – A pointer to the ‘M1’ array, i.e. array containing best free energy in interval [i,j] for multiloop segment with exactly one stem
fc_p – A pointer to the ‘fc’ array, i.e. array …
ggg_p – A pointer to the ‘ggg’ array, i.e. array containing best free energy of a gquadruplex delimited by [i,j]
indx_p – A pointer to the indexing array used for accessing the energy matrices
ptype_p – A pointer to the ptype array containing the base pair types for each possibility (i,j)
-
void export_cofold_arrays(int **f5_p, int **c_p, int **fML_p, int **fM1_p, int **fc_p, int **indx_p, char **ptype_p)#
Export the arrays of partition function cofold.
#include <ViennaRNA/cofold.h>
Export the cofold arrays for use e.g. in the concentration Computations or suboptimal secondary structure backtracking
- Deprecated:
folding matrices now reside within the vrna_fold_compound_t. Thus, this function will only work in conjunction with a prior call to the deprecated functions cofold() or cofold_par()
See also
vrna_mfe_dimer() for the new API
- Parameters:
f5_p – A pointer to the ‘f5’ array, i.e. array conatining best free energy in interval [1,j]
c_p – A pointer to the ‘c’ array, i.e. array containing best free energy in interval [i,j] given that i pairs with j
fML_p – A pointer to the ‘M’ array, i.e. array containing best free energy in interval [i,j] for any multiloop segment with at least one stem
fM1_p – A pointer to the ‘M1’ array, i.e. array containing best free energy in interval [i,j] for multiloop segment with exactly one stem
fc_p – A pointer to the ‘fc’ array, i.e. array …
indx_p – A pointer to the indexing array used for accessing the energy matrices
ptype_p – A pointer to the ptype array containing the base pair types for each possibility (i,j)
-
void initialize_cofold(int length)#
#include <ViennaRNA/cofold.h>
allocate arrays for folding
-
float fold_par(const char *sequence, char *structure, vrna_param_t *parameters, int is_constrained, int is_circular)#
Compute minimum free energy and an appropriate secondary structure of an RNA sequence.
#include <ViennaRNA/fold.h>
The first parameter given, the RNA sequence, must be uppercase and should only contain an alphabet \(\Sigma\)
that is understood by the RNAlib
(e.g.
\( \Sigma = \{A,U,C,G\} \))
The second parameter,
structure, must always point to an allocated block of memory with a size of at least \(\mathrm{strlen}(\mathrm{sequence})+1\)If the third parameter is NULL, global model detail settings are assumed for the folding recursions. Otherwise, the provided parameters are used.
The fourth parameter indicates whether a secondary structure constraint in enhanced dot-bracket notation is passed through the structure parameter or not. If so, the characters “ | x < > “ are recognized to mark bases that are paired, unpaired, paired upstream, or downstream, respectively. Matching brackets “ ( ) “ denote base pairs, dots “.” are used for unconstrained bases.
To indicate that the RNA sequence is circular and thus has to be post-processed, set the last parameter to non-zero
After a successful call of fold_par(), a backtracked secondary structure (in dot-bracket notation) that exhibits the minimum of free energy will be written to the memory structure is pointing to. The function returns the minimum of free energy for any fold of the sequence given.
- Deprecated:
use vrna_mfe() instead!
See also
vrna_mfe(), fold(), circfold(), vrna_md_t, set_energy_model(), get_scaled_parameters()
Note
OpenMP: Passing NULL to the ‘parameters’ argument involves access to several global model detail variables and thus is not to be considered threadsafe
- Parameters:
sequence – RNA sequence
structure – A pointer to the character array where the secondary structure in dot-bracket notation will be written to
parameters – A data structure containing the pre-scaled energy contributions and the model details. (NULL may be passed, see OpenMP notes above)
is_constrained – Switch to indicate that a structure constraint is passed via the structure argument (0==off)
is_circular – Switch to (de-)activate post-processing steps in case RNA sequence is circular (0==off)
- Returns:
the minimum free energy (MFE) in kcal/mol
-
float fold(const char *sequence, char *structure)#
Compute minimum free energy and an appropriate secondary structure of an RNA sequence.
#include <ViennaRNA/fold.h>
This function essentially does the same thing as fold_par(). However, it takes its model details, i.e. temperature, dangles, tetra_loop, noGU, no_closingGU, fold_constrained, noLonelyPairs from the current global settings within the library
- Deprecated:
use vrna_fold(), or vrna_mfe() instead!
See also
- Parameters:
sequence – RNA sequence
structure – A pointer to the character array where the secondary structure in dot-bracket notation will be written to
- Returns:
the minimum free energy (MFE) in kcal/mol
-
float circfold(const char *sequence, char *structure)#
Compute minimum free energy and an appropriate secondary structure of a circular RNA sequence.
#include <ViennaRNA/fold.h>
This function essentially does the same thing as fold_par(). However, it takes its model details, i.e. temperature, dangles, tetra_loop, noGU, no_closingGU, fold_constrained, noLonelyPairs from the current global settings within the library
- Deprecated:
Use vrna_circfold(), or vrna_mfe() instead!
See also
- Parameters:
sequence – RNA sequence
structure – A pointer to the character array where the secondary structure in dot-bracket notation will be written to
- Returns:
the minimum free energy (MFE) in kcal/mol
-
void free_arrays(void)#
Free arrays for mfe folding.
#include <ViennaRNA/fold.h>
- Deprecated:
See vrna_fold(), vrna_circfold(), or vrna_mfe() and vrna_fold_compound_t for the usage of the new API!
-
void update_fold_params(void)#
Recalculate energy parameters.
#include <ViennaRNA/fold.h>
- Deprecated:
For non-default model settings use the new API with vrna_params_subst() and vrna_mfe() instead!
-
void update_fold_params_par(vrna_param_t *parameters)#
Recalculate energy parameters.
#include <ViennaRNA/fold.h>
- Deprecated:
For non-default model settings use the new API with vrna_params_subst() and vrna_mfe() instead!
-
void export_fold_arrays(int **f5_p, int **c_p, int **fML_p, int **fM1_p, int **indx_p, char **ptype_p)#
#include <ViennaRNA/fold.h>
- Deprecated:
See vrna_mfe() and vrna_fold_compound_t for the usage of the new API!
-
void export_fold_arrays_par(int **f5_p, int **c_p, int **fML_p, int **fM1_p, int **indx_p, char **ptype_p, vrna_param_t **P_p)#
#include <ViennaRNA/fold.h>
- Deprecated:
See vrna_mfe() and vrna_fold_compound_t for the usage of the new API!
-
void export_circfold_arrays(int *Fc_p, int *FcH_p, int *FcI_p, int *FcM_p, int **fM2_p, int **f5_p, int **c_p, int **fML_p, int **fM1_p, int **indx_p, char **ptype_p)#
#include <ViennaRNA/fold.h>
- Deprecated:
See vrna_mfe() and vrna_fold_compound_t for the usage of the new API!
-
void export_circfold_arrays_par(int *Fc_p, int *FcH_p, int *FcI_p, int *FcM_p, int **fM2_p, int **f5_p, int **c_p, int **fML_p, int **fM1_p, int **indx_p, char **ptype_p, vrna_param_t **P_p)#
#include <ViennaRNA/fold.h>
- Deprecated:
See vrna_mfe() and vrna_fold_compound_t for the usage of the new API!
-
int LoopEnergy(int n1, int n2, int type, int type_2, int si1, int sj1, int sp1, int sq1)#
#include <ViennaRNA/fold.h>
- Deprecated:
{This function is deprecated and will be removed soon. Use vrna_E_internal() instead!}
-
int HairpinE(int size, int type, int si1, int sj1, const char *string)#
#include <ViennaRNA/fold.h>
- Deprecated:
{This function is deprecated and will be removed soon. Use vrna_E_hairpin() instead!}
-
void initialize_fold(int length)#
#include <ViennaRNA/fold.h>
Allocate arrays for folding
- Deprecated:
See vrna_mfe() and vrna_fold_compound_t for the usage of the new API!
-
char *backtrack_fold_from_pair(char *sequence, int i, int j)#
#include <ViennaRNA/fold.h>
-
float alifold(const char **strings, char *structure)#
Functions
-
float Lfold(const char *string, const char *structure, int maxdist)#
The local analog to fold().
#include <ViennaRNA/Lfold.h>
Computes the minimum free energy structure including only base pairs with a span smaller than ‘maxdist’
- Deprecated:
Use vrna_mfe_window() instead!
-
float Lfoldz(const char *string, const char *structure, int maxdist, int zsc, double min_z)#
#include <ViennaRNA/Lfold.h>
- Deprecated:
Use vrna_mfe_window_zscore() instead!
-
float aliLfold(const char **AS, const char *structure, int maxdist)#
#include <ViennaRNA/Lfold.h>
-
float aliLfold_cb(const char **AS, int maxdist, vrna_mfe_window_f cb, void *data)#
#include <ViennaRNA/Lfold.h>
-
float Lfold(const char *string, const char *structure, int maxdist)#