RNAlib-2.2.0-RC3
Constraining the Secondary Structure Recursions

This module covers all functions and variables related to the problem of incorporating secondary structure constraints into the folding recursions. More...

+ Collaboration diagram for Constraining the Secondary Structure Recursions:

Modules

 Hard Constraints
 
 Soft Constraints
 

Macros

#define VRNA_CONSTRAINT_DB_PIPE   1U
 Flag that is used to indicate the pipe '|' sign in pseudo dot-bracket notation of hard constraints. More...
 
#define VRNA_CONSTRAINT_DB_DOT   2U
 dot '.' switch for structure constraints (no constraint at all) More...
 
#define VRNA_CONSTRAINT_DB_X   4U
 'x' switch for structure constraint (base must not pair) More...
 
#define VRNA_CONSTRAINT_DB_ANG_BRACK   8U
 angle brackets '<', '>' switch for structure constraint (paired downstream/upstream) More...
 
#define VRNA_CONSTRAINT_DB_RND_BRACK   16U
 round brackets '(',')' switch for structure constraint (base i pairs base j) More...
 
#define VRNA_CONSTRAINT_DB_INTRAMOL   2048U
 Flag that is used to indicate the character 'l' in pseudo dot-bracket notation of hard constraints. More...
 
#define VRNA_CONSTRAINT_DB_INTERMOL   4096U
 Flag that is used to indicate the character 'e' in pseudo dot-bracket notation of hard constraints. More...
 
#define VRNA_CONSTRAINT_DB_GQUAD   8192U
 '+' switch for structure constraint (base is involved in a gquad) More...
 
#define VRNA_CONSTRAINT_DB_ENFORCE_BP   16384U
 Switch for dot-bracket structure constraint to enforce base pairs. More...
 
#define VRNA_CONSTRAINT_ALL   128U
 placeholder for all constraining characters
 
#define VRNA_CONSTRAINT_DB   256U
 Flag for vrna_add_constraints() to indicate that constraint is passed in pseudo dot-bracket notation. More...
 
#define VRNA_CONSTRAINT_FILE   512U
 Flag for vrna_add_constraints() to indicate that constraints are present in a text file. More...
 

Functions

void vrna_message_constraint_options (unsigned int option)
 Print a help message for pseudo dot-bracket structure constraint characters to stdout. (constraint support is specified by option parameter) More...
 
void vrna_message_constraints_all (void)
 Print structure constraint characters to stdout (full constraint support) More...
 
void vrna_add_constraints (vrna_fold_compound *vc, const char *constraint, unsigned int options)
 Add constraints to a vrna_fold_compound data structure. More...
 

Detailed Description

This module covers all functions and variables related to the problem of incorporating secondary structure constraints into the folding recursions.

This module provides general functions that allow for an easy control of constrained secondary structure prediction and evaluation. Secondary Structure constraints can be subdivided into two groups:

While Hard-Constraints directly influence the production rules used in the folding recursions by allowing, disallowing, or enforcing certain decomposition steps, Soft-constraints on the other hand are used to change position specific contributions in the recursions by adding bonuses/penalties in form of pseudo free energies to certain loop configurations.

Macro Definition Documentation

#define VRNA_CONSTRAINT_DB_PIPE   1U

Flag that is used to indicate the pipe '|' sign in pseudo dot-bracket notation of hard constraints.

Use this definition to indicate the pipe sign '|' (paired with another base)

See also
vrna_add_constraints(), vrna_message_constraint_options(), vrna_message_constraints_all()
#define VRNA_CONSTRAINT_DB_DOT   2U

dot '.' switch for structure constraints (no constraint at all)

See also
vrna_add_constraints(), vrna_message_constraint_options(), vrna_message_constraints_all()
#define VRNA_CONSTRAINT_DB_X   4U

'x' switch for structure constraint (base must not pair)

See also
vrna_add_constraints(), vrna_message_constraint_options(), vrna_message_constraints_all()
#define VRNA_CONSTRAINT_DB_ANG_BRACK   8U

angle brackets '<', '>' switch for structure constraint (paired downstream/upstream)

See also
vrna_add_constraints(), vrna_message_constraint_options(), vrna_message_constraints_all()
#define VRNA_CONSTRAINT_DB_RND_BRACK   16U

round brackets '(',')' switch for structure constraint (base i pairs base j)

See also
vrna_add_constraints(), vrna_message_constraint_options(), vrna_message_constraints_all()
#define VRNA_CONSTRAINT_DB_INTRAMOL   2048U

Flag that is used to indicate the character 'l' in pseudo dot-bracket notation of hard constraints.

Use this definition to indicate the usage of 'l' character (intramolecular pairs only)

See also
vrna_add_constraints(), vrna_message_constraint_options(), vrna_message_constraints_all()
#define VRNA_CONSTRAINT_DB_INTERMOL   4096U

Flag that is used to indicate the character 'e' in pseudo dot-bracket notation of hard constraints.

Use this definition to indicate the usage of 'e' character (intermolecular pairs only)

See also
vrna_add_constraints(), vrna_message_constraint_options(), vrna_message_constraints_all()
#define VRNA_CONSTRAINT_DB_GQUAD   8192U

'+' switch for structure constraint (base is involved in a gquad)

See also
vrna_add_constraints(), vrna_message_constraint_options(), vrna_message_constraints_all()
Warning
This flag is for future purposes only! No implementation recognizes it yet.
#define VRNA_CONSTRAINT_DB_ENFORCE_BP   16384U

Switch for dot-bracket structure constraint to enforce base pairs.

This flag should be used to really enforce base pairs given in dot-bracket constraint rather than just weakly-enforcing them.

See also
vrna_add_constraints()
#define VRNA_CONSTRAINT_DB   256U

Flag for vrna_add_constraints() to indicate that constraint is passed in pseudo dot-bracket notation.

See also
vrna_add_constraints(), vrna_message_constraint_options(), vrna_message_constraints_all()
#define VRNA_CONSTRAINT_FILE   512U

Flag for vrna_add_constraints() to indicate that constraints are present in a text file.

See also
vrna_add_constraints()

Function Documentation

void vrna_message_constraint_options ( unsigned int  option)

Print a help message for pseudo dot-bracket structure constraint characters to stdout. (constraint support is specified by option parameter)

Currently available options are:
VRNA_CONSTRAINT_DB_PIPE (paired with another base)
VRNA_CONSTRAINT_DB_DOT (no constraint at all)
VRNA_CONSTRAINT_DB_X (base must not pair)
VRNA_CONSTRAINT_DB_ANG_BRACK (paired downstream/upstream)
VRNA_CONSTRAINT_DB_RND_BRACK (base i pairs base j)
pass a collection of options as one value like this:

vrna_message_constraints(option_1 | option_2 | option_n) 
See also
vrna_message_constraints_all(), vrna_add_constraints(), VRNA_CONSTRAINT_DB, VRNA_CONSTRAINT_DB_PIPE, VRNA_CONSTRAINT_DB_DOT, VRNA_CONSTRAINT_DB_X, VRNA_CONSTRAINT_DB_ANG_BRACK, VRNA_CONSTRAINT_DB_RND_BRACK, VRNA_CONSTRAINT_DB_INTERMOL, VRNA_CONSTRAINT_DB_INTRAMOL
Parameters
optionOption switch that tells which constraint help will be printed
void vrna_add_constraints ( vrna_fold_compound vc,
const char *  constraint,
unsigned int  options 
)

Add constraints to a vrna_fold_compound data structure.

Use this function to add/update the hard/soft constraints The function allows for passing a string 'constraint' that can either be a filename that points to a constraints definition file or it may be a pseudo dot-bracket notation indicating hard constraints. Depending on the type of the string the user has to pass VRNA_CONSTRAINT_FILE or VRNA_CONSTRAINT_DB in the option parameter, respectively. If none of these to options are passed, no action is performed, other than to guarantee that at least a hard constraints data structure of type vrna_hc_t with default values is present in 'vc'. Already existing hard constraints are not touched.

In case, a psuedo dot-bracket string is passed as the second argument, the user has to specify, which characters are allowed to be interpreted as constraints by passing the corresponding options via the third parameter.

See also
vrna_hc_init(), vrna_sc_init(), vrna_hc_add_up(), vrna_hc_add_bp(), vrna_sc_add_up(), vrna_sc_add_bp(), vrna_sc_SHAPE_add_deigan(), vrna_sc_SHAPE_add_zarringhalam(), vrna_hc_free(), vrna_sc_free(), VRNA_CONSTRAINT_FILE, VRNA_CONSTRAINT_DB, VRNA_CONSTRAINT_DB_PIPE, VRNA_CONSTRAINT_DB_DOT, VRNA_CONSTRAINT_DB_X, VRNA_CONSTRAINT_DB_ANG_BRACK, VRNA_CONSTRAINT_DB_RND_BRACK, VRNA_CONSTRAINT_DB_INTRAMOL, VRNA_CONSTRAINT_DB_INTERMOL, VRNA_CONSTRAINT_DB_GQUAD
Parameters
vcThe fold compound
constraintA string with either the filename of the constraint definitions or a pseudo dot-bracket notation of the hard constraint. May be NULL.
optionsThe option flags