# /homes/fmmarquesmadeira/Projects/jabaws/binaries/src/ViennaRNA/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. loop_size[0] contains the number of external bases.
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:

  | structure |

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:

  | structure |

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:

  | structure |

Returns:

char* add_root | ( | const char * | structure | ) |

Adds a root to an un-rooted tree in any except bracket notation.

Parameters:

  | structure |

Returns:

char* expand_Shapiro | ( | const char * | coarse | ) |

Inserts missing 'S' identifiers in unweighted coarse grained structures as obtained from b2C().

Parameters:

  | coarse |

Returns:

char* expand_Full | ( | const char * | structure | ) |

Convert the full structure from bracket notation to the expanded notation including root.

Parameters:

  | structure |

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:

  | ffull |

Returns:

char* unweight | ( | const char * | wcoarse | ) |

Strip weights from any weighted tree.

Parameters:

  | wcoarse |

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:

  | align |

void parse_structure | ( | const char * | structure | ) |

Collects a statistic of structure elements of the full structure in bracket notation.

The function writes to the following global variables: loop_size, loop_degree, helix_size, loops, pairs, unpaired

Parameters:

  | structure |

Returns: