# Secondary Structure Utilities

Functions to create, parse, convert, manipulate, and compare secondary structure representations.

Specialized Modules:

- Dot-Bracket Notation of Secondary Structures
- Washington University Secondary Structure (WUSS) notation
- Pair Table Representation of Secondary Structures
- Pair List Representation of Secondary Structures
- Abstract Shapes Representation of Secondary Structures
- Helix List Representation of Secondary Structures
- Tree Representation of Secondary Structures
- Distance measures between Secondary Structures
- Deprecated Interface for Secondary Structure Utilities

  Functions

  int *vrna_loopidx_from_ptable(const short *pt)
    #include <ViennaRNA/utils/structures.h>

    Get a loop index representation of a structure.

  unsigned int *vrna_refBPcnt_matrix(const short *reference_pt, unsigned int turn)
    #include <ViennaRNA/utils/structures.h>

    Make a reference base pair count matrix.

    Get an upper triangular matrix containing the number of basepairs of a reference structure for each interval [i,j] with i<j. Access it via iindx!!!

  unsigned int *vrna_refBPdist_matrix(const short *pt1, const short *pt2, unsigned int turn)
    #include <ViennaRNA/utils/structures.h>

    Make a reference base pair distance matrix.

    Get an upper triangular matrix containing the base pair distance of two reference structures for each interval [i,j] with i<j. Access it via iindx!!!

  char *vrna_db_from_probs(const FLT_OR_DBL *pr, unsigned int length)
    #include <ViennaRNA/utils/structures.h>

    Create a dot-bracket like structure string from base pair probability matrix.

    SWIG Wrapper Notes:

      This function is available as parameter-less method db_from_probs() bound to objects of type fold_compound. Parameters `pr` and `length` are implicitely taken from the fold_compound object the method is bound to. Upon missing base pair probabilities, this method returns an empty string. See, e.g. `RNA.db_from_probs()` in the Python API.

  char vrna_bpp_symbol(const float *x)
    #include <ViennaRNA/utils/structures.h>

    Get a pseudo dot bracket notation for a given probability information.

  char *vrna_db_from_bp_stack(vrna_bp_stack_t *bp, unsigned int length)
    #include <ViennaRNA/utils/structures.h>

    Create a dot-backet/parenthesis structure from backtracking stack.

    This function is capable to create dot-bracket structures from suboptimal structure prediction sensu M. Zuker

    Parameters:

      - bp – Base pair stack containing the traced base pairs

      - length – The length of the structure

    Returns:

      The secondary structure in dot-bracket notation as provided in the input

  void vrna_letter_structure(char *structure, vrna_bp_stack_t *bp, unsigned int length)
    #include <ViennaRNA/utils/structures.h>
  short *make_pair_table_pk(const char *structure)
    #include <ViennaRNA/utils/structures.h>
  int *make_loop_index_pt(short *pt)
    #include <ViennaRNA/utils/structures.h>
  void letter_structure(char *structure, vrna_bp_stack_t *bp, int length)
    #include <ViennaRNA/utils/structures.h>