RNAlib-2.2.5

Add and modify unstructured domains to the RNA folding grammar. More...

+ Collaboration diagram for Unstructured domains:

Files

file  unstructured_domains.h
 Functions to modify unstructured domains, e.g. to incorporate ligands binding to unpaired stretches.
 

Data Structures

struct  vrna_unstructured_domain_s
 Data structure to store all functionality for ligand binding. More...
 

Macros

#define VRNA_UNSTRUCTURED_DOMAIN_EXT_LOOP   1U
 Flag to indicate ligand bound to unpiared stretch in the exterior loop.
 
#define VRNA_UNSTRUCTURED_DOMAIN_HP_LOOP   2U
 Flag to indicate ligand bound to unpaired stretch in a hairpin loop.
 
#define VRNA_UNSTRUCTURED_DOMAIN_INT_LOOP   4U
 Flag to indicate ligand bound to unpiared stretch in an interior loop.
 
#define VRNA_UNSTRUCTURED_DOMAIN_ML_LOOP   8U
 Flag to indicate ligand bound to unpiared stretch in a multibranch loop.
 
#define VRNA_UNSTRUCTURED_DOMAIN_MOTIF   16U
 Flag to indicate ligand binding without additional unbound nucleotides (motif-only)
 
#define VRNA_UNSTRUCTURED_DOMAIN_ALL_LOOPS   (VRNA_UNSTRUCTURED_DOMAIN_EXT_LOOP | VRNA_UNSTRUCTURED_DOMAIN_HP_LOOP | VRNA_UNSTRUCTURED_DOMAIN_INT_LOOP | VRNA_UNSTRUCTURED_DOMAIN_ML_LOOP)
 Flag to indicate ligand bound to unpiared stretch in any loop (convenience macro)
 

Typedefs

typedef struct vrna_unstructured_domain_s vrna_ud_t
 Typename for the ligand binding extension data structure vrna_unstructured_domain_s.
 
typedef int( vrna_callback_ud_energy) (vrna_fold_compound_t *vc, int i, int j, unsigned int looptype, void *data)
 Callback to retrieve binding free energy of a ligand bound to an unpaired sequence segment.
 
typedef FLT_OR_DBLvrna_callback_ud_exp_energy) (vrna_fold_compound_t *vc, int i, int j, unsigned int looptype, void *data)
 Callback to retrieve Boltzmann factor of the binding free energy of a ligand bound to an unpaired sequence segment.
 
typedef void( vrna_callback_ud_production) (vrna_fold_compound_t *vc, void *data)
 Callback for pre-processing the production rule of the ligand binding to unpaired stretches feature.
 
typedef void( vrna_callback_ud_exp_production) (vrna_fold_compound_t *vc, void *data)
 Callback for pre-processing the production rule of the ligand binding to unpaired stretches feature (partition function variant)
 

Functions

void vrna_ud_add_motif (vrna_fold_compound_t *vc, const char *motif, double motif_en, unsigned int loop_type)
 Add a ligand binding motif. More...
 
void vrna_ud_remove (vrna_fold_compound_t *vc)
 Remove ligand binding to unpaired stretches. More...
 
void vrna_ud_set_data (vrna_fold_compound_t *vc, void *data, vrna_callback_free_auxdata *free)
 Attach an auxiliary data structure. More...
 
void vrna_ud_set_prod_rule (vrna_fold_compound_t *vc, vrna_callback_ud_production *rule)
 Attach production rule for free energies. More...
 
void vrna_ud_set_exp_prod_rule (vrna_fold_compound_t *vc, vrna_callback_ud_exp_production *rule)
 Attach production rule for partition function. More...
 
void vrna_ud_set_energy (vrna_fold_compound_t *vc, vrna_callback_ud_energy *e)
 Attach evaluation function for free energies. More...
 
void vrna_ud_set_exp_energy (vrna_fold_compound_t *vc, vrna_callback_ud_exp_energy *exp_e)
 Attach evaluation function for Boltzmann factors. More...
 

Detailed Description

Add and modify unstructured domains to the RNA folding grammar.

This module provides the tools to add and modify unstructured domains to the production rules of the RNA folding grammar. Usually this functionality is utilized for incorporating ligand binding to unpaired stretches of an RNA.

Unstructured domains appear in the production rules of the RNA folding grammar whereever new unpaired nucleotides are attached to a growing substructure (see also [11]):

Crecursion.svg

The white boxes represent the stretch of RNA bound to the ligand and represented by a more or less specific sequence motif. The motif itself is considered unable to form basepairs. The additional production rule U is used to precompute the contribution of unpaired stretches possibly bound by one or more ligands. The auxiliary DP matrix for this production rule is filled right before processing the other (regular) production rules of the RNA folding grammar.

In a context with Structured domains the grammar is extended as follows:

GCrecursion.svg

A default implementation allows to readily use this feature by simply adding sequence motifs and correpsonding binding free energies with the function vrna_ud_add_motif() (see also Ligands binding to unstructured domains).

The grammar extension is realized using a callback function that

The callback is passed the segment positions, the loop context, and which of the two above mentioned evaluations are required. A second callback implements the pre-processing step that prepares the U DP matrix by evaluating all possible cases of the additional production rule. Both callbacks have a default implementation in RNAlib, but may be over-written by a user-implementation, making it fully user-customizable.


Data Structure Documentation

struct vrna_unstructured_domain_s

Data structure to store all functionality for ligand binding.

Data Fields

int motif_count
 Number of distinguished motifs.
 
char ** motif
 Motif sequences.
 
unsigned int * motif_size
 Motif lengths.
 
double * motif_en
 Ligand binding free energy contribution.
 
unsigned int * motif_type
 Type of motif, i.e. loop type the ligand binds to.
 
vrna_callback_ud_productionprod_cb
 Callback to ligand binding production rule, i.e. create/fill DP free energy matrices. More...
 
vrna_callback_ud_exp_productionexp_prod_cb
 Callback to ligand binding production rule, i.e. create/fill DP partition function matrices.
 
vrna_callback_ud_energyenergy_cb
 Callback to evaluate free energy of ligand binding to a particular unpaired stretch.
 
vrna_callback_ud_exp_energyexp_energy_cb
 Callback to evaluate Boltzmann factor of ligand binding to a particular unpaired stretch.
 
void * data
 Auxiliary data structure passed to energy evaluation callbacks.
 
vrna_callback_free_auxdatafree_data
 Callback to free auxiliary data structure.
 

Field Documentation

vrna_callback_ud_production* vrna_unstructured_domain_s::prod_cb

Callback to ligand binding production rule, i.e. create/fill DP free energy matrices.

This callback will be executed right before the actual secondary structure decompositions, and, therefore, any implementation must not interleave with the regular DP matrices.

Function Documentation

void vrna_ud_add_motif ( vrna_fold_compound_t vc,
const char *  motif,
double  motif_en,
unsigned int  loop_type 
)

#include <ViennaRNA/unstructured_domains.h>

Add a ligand binding motif.

This function adds a ligand binding motif and the associated binding free energy to the vrna_ud_t attribute of a vrna_fold_compound_t. The motif data will then be used in subsequent secondary structure predictions. Multiple calls to this function with different motifs append all additional data to a list of ligands, which all will be evaluated. Ligand motif data can be removed from the vrna_fold_compound_t again using the vrna_ud_remove() function. The loop type parameter allows one to limit the ligand binding to particular loop type, such as the exterior loop, hairpin loops, interior loops, or multibranch loops.

See also
VRNA_UNSTRUCTURED_DOMAIN_EXT_LOOP, VRNA_UNSTRUCTURED_DOMAIN_HP_LOOP, VRNA_UNSTRUCTURED_DOMAIN_INT_LOOP, VRNA_UNSTRUCTURED_DOMAIN_ML_LOOP, VRNA_UNSTRUCTURED_DOMAIN_ALL_LOOPS, vrna_ud_remove()
Parameters
vcThe vrna_fold_compound_t data structure the ligand motif should be bound to
motifThe sequence motif the ligand binds to
motif_enThe binding free energy of the ligand in kcal/mol
loop_typeThe loop type the ligand binds to
void vrna_ud_remove ( vrna_fold_compound_t vc)

#include <ViennaRNA/unstructured_domains.h>

Remove ligand binding to unpaired stretches.

This function removes all ligand motifs that were bound to a vrna_fold_compound_t using the vrna_ud_add_motif() function.

Parameters
vcThe vrna_fold_compound_t data structure the ligand motif data should be removed from
void vrna_ud_set_data ( vrna_fold_compound_t vc,
void *  data,
vrna_callback_free_auxdata free 
)

#include <ViennaRNA/unstructured_domains.h>

Attach an auxiliary data structure.

This function binds an arbitrary, auxiliary data structure for user-implemented ligand binding. The optional callback free will be passed the bound data structure whenever the vrna_fold_compound_t is removed from memory to avoid memory leaks.

See also
vrna_ud_set_prod_rule(), vrna_ud_set_energy(), vrna_ud_set_exp_prod_rule(), vrna_ud_set_exp_energy(), vrna_ud_remove()
Parameters
vcThe vrna_fold_compound_t data structure the auxiliary data structure should be bound to
dataA pointer to the auxiliary data structure
freeA pointer to a callback function that free's memory occupied by data
void vrna_ud_set_prod_rule ( vrna_fold_compound_t vc,
vrna_callback_ud_production rule 
)

#include <ViennaRNA/unstructured_domains.h>

Attach production rule for free energies.

Use this function to supply a user-implemented production rule B. This callback will be executed as a pre-processing step right before the regular secondary structure rules. Usually one would use this callback to fill the dynamic processing matrices B and preparations of the auxiliary data structure vrna_unstructured_domain_s.data

B_prod_rule.svg
Parameters
vcThe vrna_fold_compound_t data structure the callback should be bound to
ruleA pointer to a callback function for the B production rule
void vrna_ud_set_exp_prod_rule ( vrna_fold_compound_t vc,
vrna_callback_ud_exp_production rule 
)

#include <ViennaRNA/unstructured_domains.h>

Attach production rule for partition function.

This function is the partition function companion of vrna_ud_set_prod_rule(). Use it to bind a callback to fill the B production rule dynamic programming matrices and/or prepare the vrna_unstructured_domain_s.data.

B_prod_rule.svg
Parameters
vcThe vrna_fold_compound_t data structure the callback should be bound to
ruleA pointer to a callback function for the B production rule
void vrna_ud_set_energy ( vrna_fold_compound_t vc,
vrna_callback_ud_energy e 
)

#include <ViennaRNA/unstructured_domains.h>

Attach evaluation function for free energies.

Use this function to bind a user-implemented binding free energy evaluation callback. The callback $f(i,j)$ has to evaluate the free energy contribution of the unpaired segment $[i,j]$ and is executed in each of the regular secondary structure production rules. Whenever the callback is passed the VRNA_UNSTRUCTURED_DOMAIN_MOTIF flag via its loop_type parameter the contribution of any ligand that consecutively binds from position $i$ to $j$ (the white box) is requested. Otherwise, the callback usually performs a lookup in the precomputed B matrices. Which B matrix is addressed will be indicated by the flags VRNA_UNSTRUCTURED_DOMAIN_EXT_LOOP, VRNA_UNSTRUCTURED_DOMAIN_HP_LOOP VRNA_UNSTRUCTURED_DOMAIN_INT_LOOP, and VRNA_UNSTRUCTURED_DOMAIN_ML_LOOP. As their names already imply, they specify exterior loops (F production rule), hairpin loops and interior loops (C production rule), and multibranch loops (M and M1 production rule).

ligands_up_callback.svg
Parameters
vcThe vrna_fold_compound_t data structure the callback should be bound to
eA pointer to a callback function for free energy evaluation
void vrna_ud_set_exp_energy ( vrna_fold_compound_t vc,
vrna_callback_ud_exp_energy exp_e 
)

#include <ViennaRNA/unstructured_domains.h>

Attach evaluation function for Boltzmann factors.

This is the partition function variant of vrna_ud_set_energy().

See also
vrna_ud_set_energy()
ligands_up_callback.svg
Parameters
vcThe vrna_fold_compound_t data structure the callback should be bound to
eA pointer to callback that compute the partition function for a segment $[i,j]$ that may be bound by one or more ligands.