RNAlib-2.4.14

Parsing and Coarse Graining of Structures. More...

Go to the source code of this file.

Functions

char * b2HIT (const char *structure)
 Converts the full structure from bracket notation to the HIT notation including root. More...
 
char * b2C (const char *structure)
 Converts the full structure from bracket notation to the a coarse grained notation using the 'H' 'B' 'I' 'M' and 'R' identifiers. More...
 
char * b2Shapiro (const char *structure)
 Converts the full structure from bracket notation to the weighted coarse grained notation using the 'H' 'B' 'I' 'M' 'S' 'E' and 'R' identifiers. More...
 
char * add_root (const char *structure)
 Adds a root to an un-rooted tree in any except bracket notation. More...
 
char * expand_Shapiro (const char *coarse)
 Inserts missing 'S' identifiers in unweighted coarse grained structures as obtained from b2C(). More...
 
char * expand_Full (const char *structure)
 Convert the full structure from bracket notation to the expanded notation including root. More...
 
char * unexpand_Full (const char *ffull)
 Restores the bracket notation from an expanded full or HIT tree, that is any tree using only identifiers 'U' 'P' and 'R'. More...
 
char * unweight (const char *wcoarse)
 Strip weights from any weighted tree. More...
 
void unexpand_aligned_F (char *align[2])
 Converts two aligned structures in expanded notation. More...
 
void parse_structure (const char *structure)
 Collects a statistic of structure elements of the full structure in bracket notation. More...
 

Variables

int loop_size [2000]
 contains a list of all loop sizes. loop_size[0] contains the number of external bases.
 
int helix_size [2000]
 contains a list of all stack sizes.
 
int loop_degree [2000]
 contains the corresponding list of loop degrees.
 
int loops
 contains the number of loops ( and therefore of stacks ).
 
int unpaired
 contains the number of unpaired bases.
 
int pairs
 contains the number of base pairs in the last parsed structure.
 

Detailed Description

Parsing and Coarse Graining of Structures.

Example:

*   .((..(((...)))..((..)))).   is the bracket or full tree
*   becomes expanded:   - expand_Full() -
*   ((U)(((U)(U)((((U)(U)(U)P)P)P)(U)(U)(((U)(U)P)P)P)P)(U)R)
*   HIT:                - b2HIT() -
*   ((U1)((U2)((U3)P3)(U2)((U2)P2)P2)(U1)R)
*   Coarse:             - b2C() -
*   ((H)((H)M)R)
*   becomes expanded:   - expand_Shapiro() -
*   (((((H)S)((H)S)M)S)R)
*   weighted Shapiro:   - b2Shapiro() -
*   ((((((H3)S3)((H2)S2)M4)S2)E2)R)
*