H/RNAstruct.h File Reference
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.
|
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.
|
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.
|
char * | add_root (const char *structure) |
| Adds a root to an un-rooted tree in any except bracket notation.
|
char * | expand_Shapiro (const char *coarse) |
| Inserts missing 'S' identifiers in unweighted coarse grained structures as obtained from b2C().
|
char * | expand_Full (const char *structure) |
| Convert the full structure from bracket notation to the expanded notation including root.
|
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'.
|
char * | unweight (const char *wcoarse) |
| Strip weights from any weighted tree.
|
void | unexpand_aligned_F (char *align[2]) |
| Converts two aligned structures in expanded notation.
|
void | parse_structure (const char *structure) |
| Collects a statistic of structure elements of the full structure in bracket notation.
|
Variables |
int | loop_size [STRUC] |
| contains a list of all loop sizes.
|
int | helix_size [STRUC] |
| contains a list of all stack sizes.
|
int | loop_degree [STRUC] |
| 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)
*
Function Documentation
char* b2HIT |
( |
const char * |
structure |
) |
|
Converts the full structure from bracket notation to the HIT notation including root.
- Parameters:
-
- Returns:
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.
- Parameters:
-
- Returns:
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.
- Parameters:
-
- Returns:
char* add_root |
( |
const char * |
structure |
) |
|
Adds a root to an un-rooted tree in any except bracket notation.
- Parameters:
-
- Returns:
char* expand_Shapiro |
( |
const char * |
coarse |
) |
|
Inserts missing 'S' identifiers in unweighted coarse grained structures as obtained from b2C().
- Parameters:
-
- Returns:
char* expand_Full |
( |
const char * |
structure |
) |
|
Convert the full structure from bracket notation to the expanded notation including root.
- Parameters:
-
- Returns:
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'.
- Parameters:
-
- Returns:
char* unweight |
( |
const char * |
wcoarse |
) |
|
Strip weights from any weighted tree.
- Parameters:
-
- Returns:
void unexpand_aligned_F |
( |
char * |
align[2] |
) |
|
Converts two aligned structures in expanded notation.
Takes two aligned structures as produced by tree_edit_distance() function back to bracket notation with '_' as the gap character. The result overwrites the input.
- Parameters:
-
void parse_structure |
( |
const char * |
structure |
) |
|
Variable Documentation
contains a list of all loop sizes.
loop_size[0] contains the number of external bases.