Calculating MFE representatives of a Distance Based Partitioning

Overview

Compute the minimum free energy (MFE) and secondary structures for a partitioning of the secondary structure space according to the base pair distance to two fixed reference structures basepair distance to two fixed reference structures. More…

// typedefs

typedef struct vrna_sol_TwoD_t vrna_sol_TwoD_t
typedef struct TwoDfold_vars TwoDfold_vars

// structs

struct TwoDfold_vars
struct vrna_sol_TwoD_t

// global functions

vrna_sol_TwoD_t* vrna_mfe_TwoD (
    vrna_fold_compound_t* vc,
    int distance1,
    int distance2
    )

char* vrna_backtrack5_TwoD (
    vrna_fold_compound_t* vc,
    int k,
    int l,
    unsigned int j
    )

TwoDfold_vars* get_TwoDfold_variables (
    const char* seq,
    const char* structure1,
    const char* structure2,
    int circ
    )

void destroy_TwoDfold_variables (TwoDfold_vars* our_variables)

vrna_sol_TwoD_t* TwoDfoldList (
    TwoDfold_vars* vars,
    int distance1,
    int distance2
    )

char* TwoDfold_backtrack_f5 (
    unsigned int j,
    int k,
    int l,
    TwoDfold_vars* vars
    )

vrna_sol_TwoD_t** TwoDfold (
    TwoDfold_vars* our_variables,
    int distance1,
    int distance2
    )

// macros

#define TwoDfold_solution

Detailed Documentation

Compute the minimum free energy (MFE) and secondary structures for a partitioning of the secondary structure space according to the base pair distance to two fixed reference structures basepair distance to two fixed reference structures.

See also:

For further details, we refer to Lorenz et al. 2009 [10]

Typedefs

typedef struct vrna_sol_TwoD_t vrna_sol_TwoD_t
Solution element returned from vrna_mfe_TwoD()

This element contains free energy and structure for the appropriate kappa (k), lambda (l) neighborhood The datastructure contains two integer attributes ‘k’ and ‘l’ as well as an attribute ‘en’ of type float representing the free energy in kcal/mol and an attribute ‘s’ of type char* containg the secondary structure representative,

A value of INF in k denotes the end of a list

See also:

vrna_mfe_TwoD()

typedef struct TwoDfold_vars TwoDfold_vars
Variables compound for 2Dfold MFE folding.
Deprecated This data structure will be removed from the library soon! Use vrna_fold_compound_t and the corresponding functions vrna_fold_compound_TwoD() , vrna_mfe_TwoD() , and vrna_fold_compound_free() instead!

Global Functions

vrna_sol_TwoD_t* vrna_mfe_TwoD (
    vrna_fold_compound_t* vc,
    int distance1,
    int distance2
    )
Compute MFE’s and representative for distance partitioning.

This function computes the minimum free energies and a representative secondary structure for each distance class according to the two references specified in the datastructure ‘vars’. The maximum basepair distance to each of both references may be set by the arguments ‘distance1’ and ‘distance2’, respectively. If both distance arguments are set to ‘-1’, no restriction is assumed and the calculation is performed for each distance class possible.

The returned list contains an entry for each distance class. If a maximum basepair distance to either of the references was passed, an entry with k=l=-1 will be appended in the list, denoting the class where all structures exceeding the maximum will be thrown into. The end of the list is denoted by an attribute value of INF in the k-attribute of the list entry.

Parameters:

vc The datastructure containing all precomputed folding attributes
distance1 maximum distance to reference1 (-1 means no restriction)
distance2 maximum distance to reference2 (-1 means no restriction)

Returns:

A list of minimum free energies (and corresponding structures) for each distance class

char* vrna_backtrack5_TwoD (
    vrna_fold_compound_t* vc,
    int k,
    int l,
    unsigned int j
    )
Backtrack a minimum free energy structure from a 5’ section of specified length.

This function allows one to backtrack a secondary structure beginning at the 5’ end, a specified length and residing in a specific distance class. If the argument ‘k’ gets a value of -1, the structure that is backtracked is assumed to reside in the distance class where all structures exceeding the maximum basepair distance specified in vrna_mfe_TwoD() belong to.

Parameters:

vc The datastructure containing all precomputed folding attributes
j The length in nucleotides beginning from the 5’ end
k distance to reference1 (may be -1)
l distance to reference2

Note

The argument ‘vars’ must contain precalculated energy values in the energy matrices, i.e. a call to vrna_mfe_TwoD() preceding this function is mandatory!

See also:

vrna_mfe_TwoD()

TwoDfold_vars* get_TwoDfold_variables (
    const char* seq,
    const char* structure1,
    const char* structure2,
    int circ
    )
Get a structure of type TwoDfold_vars prefilled with current global settings.

This function returns a datastructure of type TwoDfold_vars . The data fields inside the TwoDfold_vars are prefilled by global settings and all memory allocations necessary to start a computation are already done for the convenience of the user

Deprecated Use the new API that relies on vrna_fold_compound_t and the corresponding functions vrna_fold_compound_TwoD() , vrna_mfe_TwoD() , and vrna_fold_compound_free() instead!

Parameters:

seq The RNA sequence
structure1 The first reference structure in dot-bracket notation
structure2 The second reference structure in dot-bracket notation
circ A switch to indicate the assumption to fold a circular instead of linear RNA (0=OFF, 1=ON)

Returns:

A datastructure prefilled with folding options and allocated memory

Note

Make sure that the reference structures are compatible with the sequence according to Watson-Crick- and Wobble-base pairing

void destroy_TwoDfold_variables (TwoDfold_vars* our_variables)
Destroy a TwoDfold_vars datastructure without memory loss.

This function free’s all allocated memory that depends on the datastructure given.

Deprecated Use the new API that relies on vrna_fold_compound_t and the corresponding functions vrna_fold_compound_TwoD() , vrna_mfe_TwoD() , and vrna_fold_compound_free() instead!

Parameters:

our_variables A pointer to the datastructure to be destroyed
vrna_sol_TwoD_t* TwoDfoldList (
    TwoDfold_vars* vars,
    int distance1,
    int distance2
    )
Compute MFE’s and representative for distance partitioning.

This function computes the minimum free energies and a representative secondary structure for each distance class according to the two references specified in the datastructure ‘vars’. The maximum basepair distance to each of both references may be set by the arguments ‘distance1’ and ‘distance2’, respectively. If both distance arguments are set to ‘-1’, no restriction is assumed and the calculation is performed for each distance class possible.

The returned list contains an entry for each distance class. If a maximum basepair distance to either of the references was passed, an entry with k=l=-1 will be appended in the list, denoting the class where all structures exceeding the maximum will be thrown into. The end of the list is denoted by an attribute value of INF in the k-attribute of the list entry.

Deprecated Use the new API that relies on vrna_fold_compound_t and the corresponding functions vrna_fold_compound_TwoD() , vrna_mfe_TwoD() , and vrna_fold_compound_free() instead!

Parameters:

vars the datastructure containing all predefined folding attributes
distance1 maximum distance to reference1 (-1 means no restriction)
distance2 maximum distance to reference2 (-1 means no restriction)
char* TwoDfold_backtrack_f5 (
    unsigned int j,
    int k,
    int l,
    TwoDfold_vars* vars
    )
Backtrack a minimum free energy structure from a 5’ section of specified length.

This function allows one to backtrack a secondary structure beginning at the 5’ end, a specified length and residing in a specific distance class. If the argument ‘k’ gets a value of -1, the structure that is backtracked is assumed to reside in the distance class where all structures exceeding the maximum basepair distance specified in TwoDfold() belong to. Deprecated Use the new API that relies on vrna_fold_compound_t and the corresponding functions vrna_fold_compound_TwoD() , vrna_mfe_TwoD() , vrna_backtrack5_TwoD() , and vrna_fold_compound_free() instead!

Parameters:

j The length in nucleotides beginning from the 5’ end
k distance to reference1 (may be -1)
l distance to reference2
vars the datastructure containing all predefined folding attributes

Note

The argument ‘vars’ must contain precalculated energy values in the energy matrices, i.e. a call to TwoDfold() preceding this function is mandatory!