RNAlib-2.2.0RC0
|
Data Structures | |
struct | hard_constraintT |
The hard constraints data structure. More... | |
Macros | |
#define | VRNA_CONSTRAINT_PIPE 1U |
Flag that is used to indicate the pipe '|' sign in pseudo dot-bracket notation of hard constraints. More... | |
#define | VRNA_CONSTRAINT_DOT 2U |
dot '.' switch for structure constraints (no constraint at all) | |
#define | VRNA_CONSTRAINT_X 4U |
'x' switch for structure constraint (base must not pair) | |
#define | VRNA_CONSTRAINT_ANG_BRACK 8U |
angle brackets '<', '>' switch for structure constraint (paired downstream/upstream) | |
#define | VRNA_CONSTRAINT_RND_BRACK 16U |
round brackets '(',')' switch for structure constraint (base i pairs base j) | |
#define | VRNA_CONSTRAINT_INTRAMOLECULAR 2048U |
Flag that is used to indicate the character 'l' in pseudo dot-bracket notation of hard constraints. More... | |
#define | VRNA_CONSTRAINT_INTERMOLECULAR 4096U |
Flag that is used to indicate the character 'e' in pseudo dot-bracket notation of hard constraints. More... | |
#define | VRNA_CONSTRAINT_MULTILINE 32U |
constraint may span over several lines | |
#define | VRNA_CONSTRAINT_NO_HEADER 64U |
do not print the header information line | |
#define | VRNA_CONSTRAINT_ALL 128U |
placeholder for all constraining characters | |
#define | VRNA_HC_CONTEXT_EXT_LOOP (char)0x01 |
Hard constraints flag, base pair in the exterior loop. | |
#define | VRNA_HC_CONTEXT_HP_LOOP (char)0x02 |
Hard constraints flag, base pair encloses hairpin loop. | |
#define | VRNA_HC_CONTEXT_INT_LOOP (char)0x04 |
Hard constraints flag, base pair encloses an interior loop. | |
#define | VRNA_HC_CONTEXT_MB_LOOP (char)0x08 |
Hard constraints flag, base pair is enclosed in an interior loop. | |
#define | VRNA_HC_CONTEXT_INT_LOOP_ENC (char)0x10 |
Hard constraints flag, base pair encloses a multi branch loop. | |
#define | VRNA_HC_CONTEXT_MB_LOOP_ENC (char)0x20 |
Hard constraints flag, base pair is enclosed in a multi branch loop. | |
Functions | |
void | print_tty_constraint (unsigned int option) |
Print structure constraint characters to stdout. (constraint support is specified by option parameter) More... | |
void | print_tty_constraint_full (void) |
Print structure constraint characters to stdout (full constraint support) | |
void | constrain_ptypes (const char *constraint, unsigned int length, char *ptype, int *BP, int min_loop_size, unsigned int idx_type) |
Insert constraining pair types according to constraint structure string. More... | |
void | getConstraint (char **cstruc, const char **lines, unsigned int option) |
Get a hard constraint from pseudo dot-bracket notation as specified in the ViennaRNA Package extension of the FASTA format. More... | |
void | vrna_hc_add (vrna_fold_compound *vc, const char *constraint, unsigned int options) |
Add hard constraints to a vrna_fold_compound data structure. More... | |
void | vrna_hc_reset (vrna_fold_compound *vc) |
Reset hard constraints to default values. More... | |
void | vrna_hc_free (hard_constraintT *hc) |
Free the memory allocated by a hard_constraintT data structure. More... | |
#define VRNA_CONSTRAINT_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)
#define VRNA_CONSTRAINT_INTRAMOLECULAR 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)
#define VRNA_CONSTRAINT_INTERMOLECULAR 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)
void print_tty_constraint | ( | unsigned int | option | ) |
Print structure constraint characters to stdout. (constraint support is specified by option parameter)
Currently available options are:
VRNA_CONSTRAINT_PIPE (paired with another base)
VRNA_CONSTRAINT_DOT (no constraint at all)
VRNA_CONSTRAINT_X (base must not pair)
VRNA_CONSTRAINT_ANG_BRACK (paired downstream/upstream)
VRNA_CONSTRAINT_RND_BRACK (base i pairs base j)
pass a collection of options as one value like this:
print_tty_constraint(option_1 | option_2 | option_n)
option | Option switch that tells which constraint help will be printed |
void constrain_ptypes | ( | const char * | constraint, |
unsigned int | length, | ||
char * | ptype, | ||
int * | BP, | ||
int | min_loop_size, | ||
unsigned int | idx_type | ||
) |
Insert constraining pair types according to constraint structure string.
constraint | The structure constraint string |
length | The actual length of the sequence (constraint may be shorter) |
ptype | A pointer to the basepair type array |
BP | (not used anymore) |
min_loop_size | The minimal loop size (usually TURN ) |
idx_type | Define the access type for base pair type array (0 = indx, 1 = iindx) |
void getConstraint | ( | char ** | cstruc, |
const char ** | lines, | ||
unsigned int | option | ||
) |
Get a hard constraint from pseudo dot-bracket notation as specified in the ViennaRNA Package extension of the FASTA format.
cstruc | A pointer to a character array that is used as pseudo dot-bracket output |
lines | A 2-dimensional character array with the extension lines from the FASTA input |
option | The option flags that define the behavior and recognition pattern of this function |
void vrna_hc_add | ( | vrna_fold_compound * | vc, |
const char * | constraint, | ||
unsigned int | options | ||
) |
Add hard constraints to a vrna_fold_compound data structure.
Use this function to add a data structure of type #hard_constraintsT that specifies which decomposition steps are allowed/enforced during the recursions. The function allows for passing a string 'constraint' that can either be a filename that points to a hard constraints definition file or it may be a pseudo dot-bracket notation indicating the hard constraint. 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 further hard constraints then the ones induced by canonical base pairing (as supplied with the ptype argument) are applied.
vc | The fold compound |
constraint | A string with either the filename of the hard constraint definitions or a pseudo dot-bracket notation of the hard constraint. May be NULL. |
options | The option flags |
void vrna_hc_reset | ( | vrna_fold_compound * | vc | ) |
Reset hard constraints to default values.
This function resets the hard constraints to its default values, i.e. all positions may be unpaired in all contexts, and base pairs are allowed in all contexts, if they resemble canonical pairs
vc | The fold compound |
void vrna_hc_free | ( | hard_constraintT * | hc | ) |
Free the memory allocated by a hard_constraintT data structure.
Use this function to free all memory that was allocated for a data structure of type hard_constraintT .