RNAlib-2.2.9

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

Files | Data Structures | Typedefs | Functions
Soft Constraints
Constraining the Secondary Structure Predictions and Evaluations

Functions and data structures for secondary structure soft constraints. More...

Collaboration diagram for Soft Constraints:

## Files
file | constraints_soft.h
| Functions and data structures for secondary structure soft constraints.

## Data Structures
struct | vrna_sc_s
| The soft constraints data structure. More...

## Typedefs
typedef struct vrna_sc_s | vrna_sc_t
| Typename for the soft constraints data structure vrna_sc_s.
typedef int( | vrna_callback_sc_energy) (int i, int j, int k, int l, char d, void *data)
| Callback to retrieve pseudo energy contribution for soft constraint feature. More...
typedef FLT_OR_DBL( | vrna_callback_sc_exp_energy) (int i, int j, int k, int l, char d, void *data)
| Callback to retrieve pseudo energy contribution as Boltzmann Factors for soft constraint feature. More...
typedef vrna_basepair_t *( | vrna_callback_sc_backtrack) (int i, int j, int k, int l, char d, void *data)
| Callback to retrieve auxiliary base pairs for soft constraint feature. More...

## Functions
void | vrna_sc_init (vrna_fold_compound_t *vc)
| Initialize an empty soft constraints data structure within a vrna_fold_compound_t. More...
void | vrna_sc_add_bp (vrna_fold_compound_t *vc, const FLT_OR_DBL **constraints, unsigned int options)
| Add soft constraints for paired nucleotides. More...
void | vrna_sc_add_up (vrna_fold_compound_t *vc, const FLT_OR_DBL *constraints, unsigned int options)
| Add soft constraints for unpaired nucleotides. More...
void | vrna_sc_remove (vrna_fold_compound_t *vc)
| Remove soft constraints from vrna_fold_compound_t. More...
void | vrna_sc_free (vrna_sc_t *sc)
| Free memory occupied by a vrna_sc_t data structure. More...
void | vrna_sc_add_data (vrna_fold_compound_t *vc, void *data, vrna_callback_free_auxdata *free_data)
| Add an auxiliary data structure for the generic soft constraints callback function. More...
void | vrna_sc_add_f (vrna_fold_compound_t *vc, vrna_callback_sc_energy *f)
| Bind a function pointer for generic soft constraint feature (MFE version) More...
void | vrna_sc_add_bt (vrna_fold_compound_t *vc, vrna_callback_sc_backtrack *f)
| Bind a backtracking function pointer for generic soft constraint feature. More...
void | vrna_sc_add_exp_f (vrna_fold_compound_t *vc, vrna_callback_sc_exp_energy *exp_f)
| Bind a function pointer for generic soft constraint feature (PF version) More...

## Detailed Description

Functions and data structures for secondary structure soft constraints.

Soft-constraints are used to change position specific contributions in the recursions by adding bonuses/penalties in form of pseudo free energies to certain loop configurations.

## Data Structure Documentation

struct vrna_sc_s

The soft constraints data structure.

### Data Fields
int ** | energy_up
| Energy contribution for stretches of unpaired nucleotides.
int * | energy_bp
| Energy contribution for base pairs.
FLT_OR_DBL ** | exp_energy_up
| Boltzmann Factors of the energy contributions for unpaired sequence stretches.
FLT_OR_DBL * | exp_energy_bp
| Boltzmann Factors of the energy contribution for base pairs.
int * | energy_stack
| Pseudo Energy contribution per base pair involved in a stack.
FLT_OR_DBL * | exp_energy_stack
| Boltzmann weighted pseudo energy contribution per nucleotide involved in a stack.
vrna_callback_sc_energy * | f
| A function pointer used for pseudo energy contribution in MFE calculations. More...
vrna_callback_sc_backtrack * | bt
| A function pointer used to obtain backtraced base pairs in loop regions that were altered by soft constrained pseudo energy contributions. More...
vrna_callback_sc_exp_energy * | exp_f
| A function pointer used for pseudo energy contribution boltzmann factors in PF calculations. More...
void * | data
| A pointer to the data object provided for for pseudo energy contribution functions of the generic soft constraints feature.

#### Field Documentation

vrna_callback_sc_energy* vrna_sc_s::f

A function pointer used for pseudo energy contribution in MFE calculations.

See also
  vrna_sc_add_f()

vrna_callback_sc_backtrack* vrna_sc_s::bt

A function pointer used to obtain backtraced base pairs in loop regions that were altered by soft constrained pseudo energy contributions.

See also
  vrna_sc_add_bt()

vrna_callback_sc_exp_energy* vrna_sc_s::exp_f

A function pointer used for pseudo energy contribution boltzmann factors in PF calculations.

See also
  vrna_sc_add_exp_f()

## Typedef Documentation

typedef int( vrna_callback_sc_energy) (int i, int j, int k, int l, char d, void *data)

`#include <ViennaRNA/constraints_soft.h>`

Callback to retrieve pseudo energy contribution for soft constraint feature.

This is the prototype for callback functions used by the folding recursions to evaluate generic soft constraints. The first four parameters passed indicate the delimiting nucleotide positions of the decomposition, and the parameter `denotes` the decomposition step. The last parameter `data` is the auxiliary data structure associated to the hard constraints via vrna_sc_add_data(), or NULL if no auxiliary data was added.

See also
  VRNA_DECOMP_PAIR_HP, VRNA_DECOMP_PAIR_IL, VRNA_DECOMP_PAIR_ML, VRNA_DECOMP_ML_ML_ML, VRNA_DECOMP_ML_STEM, VRNA_DECOMP_ML_ML, VRNA_DECOMP_ML_UP, VRNA_DECOMP_ML_ML_STEM, VRNA_DECOMP_ML_COAXIAL, VRNA_DECOMP_EXT_EXT, VRNA_DECOMP_EXT_UP, VRNA_DECOMP_EXT_STEM, VRNA_DECOMP_EXT_EXT_EXT, VRNA_DECOMP_EXT_STEM_EXT, VRNA_DECOMP_EXT_EXT_STEM, VRNA_DECOMP_EXT_EXT_STEM1, vrna_sc_add_f(), vrna_sc_add_exp_f(), vrna_sc_add_bt(), vrna_sc_add_data()

Parameters

  i | Left (5') delimiter position of substructure
  j | Right (3') delimiter position of substructure
  k | Left delimiter of decomposition
  l | Right delimiter of decomposition
  d | Decomposition step indicator
  data | Auxiliary data

Returns
  Pseudo energy contribution in deka-kalories per mol

typedef FLT_OR_DBL( vrna_callback_sc_exp_energy) (int i, int j, int k, int l, char d, void *data)

`#include <ViennaRNA/constraints_soft.h>`

Callback to retrieve pseudo energy contribution as Boltzmann Factors for soft constraint feature.

This is the prototype for callback functions used by the partition function recursions to evaluate generic soft constraints. The first four parameters passed indicate the delimiting nucleotide positions of the decomposition, and the parameter `denotes` the decomposition step. The last parameter `data` is the auxiliary data structure associated to the hard constraints via vrna_sc_add_data(), or NULL if no auxiliary data was added.

See also
  VRNA_DECOMP_PAIR_HP, VRNA_DECOMP_PAIR_IL, VRNA_DECOMP_PAIR_ML, VRNA_DECOMP_ML_ML_ML, VRNA_DECOMP_ML_STEM, VRNA_DECOMP_ML_ML, VRNA_DECOMP_ML_UP, VRNA_DECOMP_ML_ML_STEM, VRNA_DECOMP_ML_COAXIAL, VRNA_DECOMP_EXT_EXT, VRNA_DECOMP_EXT_UP, VRNA_DECOMP_EXT_STEM, VRNA_DECOMP_EXT_EXT_EXT, VRNA_DECOMP_EXT_STEM_EXT, VRNA_DECOMP_EXT_EXT_STEM, VRNA_DECOMP_EXT_EXT_STEM1, vrna_sc_add_exp_f(), vrna_sc_add_f(), vrna_sc_add_bt(), vrna_sc_add_data()

Parameters

  i | Left (5') delimiter position of substructure
  j | Right (3') delimiter position of substructure
  k | Left delimiter of decomposition
  l | Right delimiter of decomposition
  d | Decomposition step indicator
  data | Auxiliary data

Returns
  Pseudo energy contribution in deka-kalories per mol

typedef vrna_basepair_t*( vrna_callback_sc_backtrack) (int i, int j, int k, int l, char d, void *data)

`#include <ViennaRNA/constraints_soft.h>`

Callback to retrieve auxiliary base pairs for soft constraint feature.

See also
  VRNA_DECOMP_PAIR_HP, VRNA_DECOMP_PAIR_IL, VRNA_DECOMP_PAIR_ML, VRNA_DECOMP_ML_ML_ML, VRNA_DECOMP_ML_STEM, VRNA_DECOMP_ML_ML, VRNA_DECOMP_ML_UP, VRNA_DECOMP_ML_ML_STEM, VRNA_DECOMP_ML_COAXIAL, VRNA_DECOMP_EXT_EXT, VRNA_DECOMP_EXT_UP, VRNA_DECOMP_EXT_STEM, VRNA_DECOMP_EXT_EXT_EXT, VRNA_DECOMP_EXT_STEM_EXT, VRNA_DECOMP_EXT_EXT_STEM, VRNA_DECOMP_EXT_EXT_STEM1, vrna_sc_add_bt(), vrna_sc_add_f(), vrna_sc_add_exp_f(), vrna_sc_add_data()

Parameters

  i | Left (5') delimiter position of substructure
  j | Right (3') delimiter position of substructure
  k | Left delimiter of decomposition
  l | Right delimiter of decomposition
  d | Decomposition step indicator
  data | Auxiliary data

Returns
  List of additional base pairs

## Function Documentation

void vrna_sc_init | ( | vrna_fold_compound_t * | vc | ) |

`#include <ViennaRNA/constraints_soft.h>`

Initialize an empty soft constraints data structure within a vrna_fold_compound_t.

This function adds a proper soft constraints data structure to the vrna_fold_compound_t data structure. If soft constraints already exist within the fold compound, they are removed.

Note
  Accepts vrna_fold_compound_t of type VRNA_VC_TYPE_SINGLE and VRNA_VC_TYPE_ALIGNMENT

See also
  vrna_sc_add_bp(), vrna_sc_add_up(), vrna_sc_add_SHAPE_deigan(), vrna_sc_add_SHAPE_zarringhalam(), vrna_sc_remove(), vrna_sc_add_f(), vrna_sc_add_exp_f(), vrna_sc_add_pre(), vrna_sc_add_post()

Parameters

  vc | The vrna_fold_compound_t where an empty soft constraint feature is to be added to

void vrna_sc_add_bp | ( | vrna_fold_compound_t * | vc,
|  | const FLT_OR_DBL ** | constraints,
|  | unsigned int | options
| ) |  |

`#include <ViennaRNA/constraints_soft.h>`

Add soft constraints for paired nucleotides.

Parameters

  vc | The vrna_fold_compound_t the soft constraints are associated with
  constraints | A two-dimensional array of pseudo free energies in
  options | The options flag indicating how/where to store the soft constraints

void vrna_sc_add_up | ( | vrna_fold_compound_t * | vc,
|  | const FLT_OR_DBL * | constraints,
|  | unsigned int | options
| ) |  |

`#include <ViennaRNA/constraints_soft.h>`

Add soft constraints for unpaired nucleotides.

Parameters

  vc | The vrna_fold_compound_t the soft constraints are associated with
  constraints | A vector of pseudo free energies in
  options | The options flag indicating how/where to store the soft constraints

void vrna_sc_remove | ( | vrna_fold_compound_t * | vc | ) |

`#include <ViennaRNA/constraints_soft.h>`

Remove soft constraints from vrna_fold_compound_t.

Note
  Accepts vrna_fold_compound_t of type VRNA_VC_TYPE_SINGLE and VRNA_VC_TYPE_ALIGNMENT

Parameters

  vc | The vrna_fold_compound_t possibly containing soft constraints

void vrna_sc_free | ( | vrna_sc_t * | sc | ) |

`#include <ViennaRNA/constraints_soft.h>`

Free memory occupied by a vrna_sc_t data structure.

Parameters

  sc | The data structure to free from memory

void vrna_sc_add_data | ( | vrna_fold_compound_t * | vc,
|  | void * | data,
|  | vrna_callback_free_auxdata * | free_data
| ) |  |

`#include <ViennaRNA/constraints_soft.h>`

Add an auxiliary data structure for the generic soft constraints callback function.

See also
  vrna_sc_add_f(), vrna_sc_add_exp_f(), vrna_sc_add_bt()

Parameters

  vc | The fold compound the generic soft constraint function should be bound to
  data | A pointer to the data structure that holds required data for function 'f'
  free_data | A pointer to a function that free's the memory occupied by `data` (Maybe NULL)

void vrna_sc_add_f | ( | vrna_fold_compound_t * | vc,
|  | vrna_callback_sc_energy * | f
| ) |  |

`#include <ViennaRNA/constraints_soft.h>`

Bind a function pointer for generic soft constraint feature (MFE version)

This function allows one to easily bind a function pointer and corresponding data structure to the soft constraint part vrna_sc_t of the vrna_fold_compound_t. The function for evaluating the generic soft constraint feature has to return a pseudo free energy in , where .

See also
  vrna_sc_add_data(), vrna_sc_add_bt(), vrna_sc_add_exp_f()

Parameters

  vc | The fold compound the generic soft constraint function should be bound to
  f | A pointer to the function that evaluates the generic soft constraint feature

void vrna_sc_add_bt | ( | vrna_fold_compound_t * | vc,
|  | vrna_callback_sc_backtrack * | f
| ) |  |

`#include <ViennaRNA/constraints_soft.h>`

Bind a backtracking function pointer for generic soft constraint feature.

This function allows one to easily bind a function pointer to the soft constraint part vrna_sc_t of the vrna_fold_compound_t. The provided function should be used for backtracking purposes in loop regions that were altered via the generic soft constraint feature. It has to return an array of vrna_basepair_t data structures, were the last element in the list is indicated by a value of -1 in it's i position.

See also
  vrna_sc_add_data(), vrna_sc_add_f(), vrna_sc_add_exp_f()

Parameters

  vc | The fold compound the generic soft constraint function should be bound to
  f | A pointer to the function that returns additional base pairs

void vrna_sc_add_exp_f | ( | vrna_fold_compound_t * | vc,
|  | vrna_callback_sc_exp_energy * | exp_f
| ) |  |

`#include <ViennaRNA/constraints_soft.h>`

Bind a function pointer for generic soft constraint feature (PF version)

This function allows one to easily bind a function pointer and corresponding data structure to the soft constraint part vrna_sc_t of the vrna_fold_compound_t. The function for evaluating the generic soft constraint feature has to return a pseudo free energy as Boltzmann factor, i.e. . The required unit for is .

See also
  vrna_sc_add_bt(), vrna_sc_add_f(), vrna_sc_add_data()

Parameters

  vc | The fold compound the generic soft constraint function should be bound to
  exp_f | A pointer to the function that evaluates the generic soft constraint feature