RNAlib-2.4.14
structures.h File Reference

Various utility- and helper-functions for secondary structure parsing, converting, etc. More...

+ Include dependency graph for structures.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vrna_elem_prob_s
 Data structure representing a single entry of an element probability list (e.g. list of pair probabilities) More...
 
struct  vrna_hx_s
 Data structure representing an entry of a helix list. More...
 

Macros

#define VRNA_BRACKETS_ALPHA   4U
 Bitflag to indicate secondary structure notations using uppercase/lowercase letters from the latin alphabet. More...
 
#define VRNA_BRACKETS_RND   8U
 Bitflag to indicate secondary structure notations using round brackets (parenthesis), () More...
 
#define VRNA_BRACKETS_CLY   16U
 Bitflag to indicate secondary structure notations using curly brackets, {} More...
 
#define VRNA_BRACKETS_ANG   32U
 Bitflag to indicate secondary structure notations using angular brackets, <> More...
 
#define VRNA_BRACKETS_SQR   64U
 Bitflag to indicate secondary structure notations using square brackets, [] More...
 
#define VRNA_BRACKETS_DEFAULT
 Default bitmask to indicate secondary structure notation using any pair of brackets. More...
 
#define VRNA_BRACKETS_ANY
 Bitmask to indicate secondary structure notation using any pair of brackets or uppercase/lowercase alphabet letters. More...
 
#define VRNA_PLIST_TYPE_BASEPAIR   0
 A Base Pair element.
 
#define VRNA_PLIST_TYPE_GQUAD   1
 A G-Quadruplex element.
 
#define VRNA_PLIST_TYPE_H_MOTIF   2
 A Hairpin loop motif element.
 
#define VRNA_PLIST_TYPE_I_MOTIF   3
 An Internal loop motif element.
 
#define VRNA_PLIST_TYPE_UD_MOTIF   4
 An Unstructured Domain motif element.
 
#define VRNA_PLIST_TYPE_STACK   5
 A Base Pair stack element.
 
#define VRNA_STRUCTURE_TREE_HIT   1U
 Homeomorphically Irreducible Tree (HIT) representation of a secondary structure. More...
 
#define VRNA_STRUCTURE_TREE_SHAPIRO_SHORT   2U
 (short) Coarse Grained representation of a secondary structure More...
 
#define VRNA_STRUCTURE_TREE_SHAPIRO   3U
 (full) Coarse Grained representation of a secondary structure More...
 
#define VRNA_STRUCTURE_TREE_SHAPIRO_EXT   4U
 (extended) Coarse Grained representation of a secondary structure More...
 
#define VRNA_STRUCTURE_TREE_SHAPIRO_WEIGHT   5U
 (weighted) Coarse Grained representation of a secondary structure More...
 
#define VRNA_STRUCTURE_TREE_EXPANDED   6U
 Expanded Tree representation of a secondary structure. More...
 

Typedefs

typedef struct vrna_hx_s vrna_hx_t
 Convenience typedef for data structure vrna_hx_s.
 
typedef struct vrna_elem_prob_s vrna_ep_t
 Convenience typedef for data structure vrna_elem_prob_s.
 

Functions

char * vrna_db_pack (const char *struc)
 Pack secondary secondary structure, 5:1 compression using base 3 encoding. More...
 
char * vrna_db_unpack (const char *packed)
 Unpack secondary structure previously packed with vrna_db_pack() More...
 
void vrna_db_flatten (char *structure, unsigned int options)
 Substitute pairs of brackets in a string with parenthesis. More...
 
void vrna_db_flatten_to (char *string, const char target[3], unsigned int options)
 Substitute pairs of brackets in a string with another type of pair characters. More...
 
char * vrna_db_from_ptable (short *pt)
 Convert a pair table into dot-parenthesis notation. More...
 
char * vrna_db_from_WUSS (const char *wuss)
 Convert a WUSS annotation string to dot-bracket format. More...
 
char * vrna_db_from_plist (vrna_ep_t *pairs, unsigned int n)
 Convert a list of base pairs into dot-bracket notation. More...
 
char * vrna_db_to_element_string (const char *structure)
 Convert a secondary structure in dot-bracket notation to a nucleotide annotation of loop contexts. More...
 
char * vrna_db_pk_remove (const char *structure, unsigned int options)
 Remove pseudo-knots from an input structure. More...
 
short * vrna_ptable (const char *structure)
 Create a pair table from a dot-bracket notation of a secondary structure. More...
 
short * vrna_ptable_from_string (const char *string, unsigned int options)
 Create a pair table for a secondary structure string. More...
 
short * vrna_pt_pk_get (const char *structure)
 Create a pair table of a secondary structure (pseudo-knot version) More...
 
short * vrna_ptable_copy (const short *pt)
 Get an exact copy of a pair table. More...
 
short * vrna_pt_ali_get (const char *structure)
 Create a pair table of a secondary structure (snoop align version)
 
short * vrna_pt_snoop_get (const char *structure)
 Create a pair table of a secondary structure (snoop version) More...
 
short * vrna_pt_pk_remove (const short *ptable, unsigned int options)
 Remove pseudo-knots from a pair table. More...
 
vrna_ep_tvrna_plist (const char *struc, float pr)
 Create a vrna_ep_t from a dot-bracket string. More...
 
vrna_ep_tvrna_plist_from_probs (vrna_fold_compound_t *vc, double cut_off)
 Create a vrna_ep_t from base pair probability matrix. More...
 
vrna_hx_tvrna_hx_from_ptable (short *pt)
 Convert a pair table representation of a secondary structure into a helix list. More...
 
vrna_hx_tvrna_hx_merge (const vrna_hx_t *list, int maxdist)
 Create a merged helix list from another helix list.
 
int * vrna_loopidx_from_ptable (const short *pt)
 Get a loop index representation of a structure.
 
int vrna_bp_distance (const char *str1, const char *str2)
 Compute the "base pair" distance between two secondary structures s1 and s2. More...
 
unsigned int * vrna_refBPcnt_matrix (const short *reference_pt, unsigned int turn)
 Make a reference base pair count matrix. More...
 
unsigned int * vrna_refBPdist_matrix (const short *pt1, const short *pt2, unsigned int turn)
 Make a reference base pair distance matrix. More...
 
char * vrna_db_from_probs (const FLT_OR_DBL *pr, unsigned int length)
 Create a dot-bracket like structure string from base pair probability matrix.
 
char vrna_bpp_symbol (const float *x)
 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)
 Create a dot-backet/parenthesis structure from backtracking stack. More...
 
char * vrna_db_to_tree_string (const char *structure, unsigned int type)
 Convert a Dot-Bracket structure string into tree string representation. More...
 
char * vrna_tree_string_unweight (const char *structure)
 Remove weights from a linear string tree representation of a secondary structure. More...
 
char * vrna_tree_string_to_db (const char *tree)
 Convert a linear tree string representation of a secondary structure back to Dot-Bracket notation. More...
 
void assign_plist_from_db (vrna_ep_t **pl, const char *struc, float pr)
 Create a vrna_ep_t from a dot-bracket string. More...
 
char * pack_structure (const char *struc)
 Pack secondary secondary structure, 5:1 compression using base 3 encoding. More...
 
char * unpack_structure (const char *packed)
 Unpack secondary structure previously packed with pack_structure() More...
 
short * make_pair_table (const char *structure)
 Create a pair table of a secondary structure. More...
 
short * copy_pair_table (const short *pt)
 Get an exact copy of a pair table. More...
 
short * alimake_pair_table (const char *structure)
 
short * make_pair_table_snoop (const char *structure)
 
int bp_distance (const char *str1, const char *str2)
 Compute the "base pair" distance between two secondary structures s1 and s2. More...
 
unsigned int * make_referenceBP_array (short *reference_pt, unsigned int turn)
 Make a reference base pair count matrix. More...
 
unsigned int * compute_BPdifferences (short *pt1, short *pt2, unsigned int turn)
 Make a reference base pair distance matrix. More...
 
void assign_plist_from_pr (vrna_ep_t **pl, FLT_OR_DBL *probs, int length, double cutoff)
 Create a vrna_ep_t from a probability matrix. More...
 
void parenthesis_structure (char *structure, vrna_bp_stack_t *bp, int length)
 Create a dot-backet/parenthesis structure from backtracking stack. More...
 
void parenthesis_zuker (char *structure, vrna_bp_stack_t *bp, int length)
 Create a dot-backet/parenthesis structure from backtracking stack obtained by zuker suboptimal calculation in cofold.c. More...
 
void bppm_to_structure (char *structure, FLT_OR_DBL *pr, unsigned int length)
 Create a dot-bracket like structure string from base pair probability matrix. More...
 
char bppm_symbol (const float *x)
 Get a pseudo dot bracket notation for a given probability information. More...
 

Detailed Description

Various utility- and helper-functions for secondary structure parsing, converting, etc.