Calculating MFE representatives of a Distance Based Partitioning
Distance based partitioning of the Secondary Structure Space | Calculating Minimum Free Energy (MFE) Structures

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...

Collaboration diagram for Calculating MFE representatives of a Distance Based Partitioning:

## Files

file | 2Dfold.h

## Functions

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. More...
void | destroy_TwoDfold_variables (TwoDfold_vars *our_variables)
| Destroy a TwoDfold_vars datastructure without memory loss. More...
TwoDfold_solution * | TwoDfoldList (TwoDfold_vars *vars, int distance1, int distance2)
| Compute MFE's and representative for distance partitioning. More...
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. More...

## Detailed Description

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.

## Function Documentation

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

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

See Also
  destroy_TwoDfold_variables(), TwoDfold(), TwoDfold_circ

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

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.

See Also
  get_TwoDfold_variables()

Parameters

  our_variables | A pointer to the datastructure to be destroyed

TwoDfold_solution* 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.

See Also
  get_TwoDfold_variables(), destroy_TwoDfold_variables(), TwoDfold_solution

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 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 TwoDfoldList() belong to.

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

See Also
  TwoDfoldList(), get_TwoDfold_variables(), destroy_TwoDfold_variables()

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