1 #ifndef VIENNA_RNA_PACKAGE_STRUCT_UTILS_H 2 #define VIENNA_RNA_PACKAGE_STRUCT_UTILS_H 4 #ifdef VRNA_WARN_DEPRECATED 5 # if defined(__clang__) 6 # define DEPRECATED(func, msg) func __attribute__ ((deprecated("", msg))) 7 # elif defined(__GNUC__) 8 # define DEPRECATED(func, msg) func __attribute__ ((deprecated(msg))) 10 # define DEPRECATED(func, msg) func 13 # define DEPRECATED(func, msg) func 27 #define VRNA_PLIST_TYPE_BASEPAIR 0 28 #define VRNA_PLIST_TYPE_GQUAD 1 29 #define VRNA_PLIST_TYPE_H_MOTIF 2 30 #define VRNA_PLIST_TYPE_I_MOTIF 3 31 #define VRNA_PLIST_TYPE_UD_MOTIF 4 32 #define VRNA_PLIST_TYPE_STACK 5 39 #define VRNA_BRACKETS_ALPHA 4U 46 #define VRNA_BRACKETS_RND 8U 53 #define VRNA_BRACKETS_CLY 16U 60 #define VRNA_BRACKETS_ANG 32U 67 #define VRNA_BRACKETS_SQR 64U 74 #define VRNA_BRACKETS_DEFAULT \ 75 (VRNA_BRACKETS_RND | \ 180 unsigned int options);
247 unsigned int options);
271 const char target[3],
272 unsigned int options);
339 unsigned int length);
360 unsigned int length);
363 void vrna_letter_structure(
char *structure,
365 unsigned int length);
420 char *vrna_db_to_element_string(
const char *structure);
423 vrna_hx_t *vrna_hx_from_ptable(
short *pt);
430 #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY 456 "Use vrna_plist() instead");
471 "Use vrna_db_pack() instead");
484 "Use vrna_db_unpack() instead");
498 "Use vrna_ptable() instead");
500 DEPRECATED(
short *make_pair_table_pk(
const char *structure),
501 "Use vrna_ptable_from_string() instead");
512 "Use vrna_ptable_copy() instead");
520 "Use vrna_pt_ali_get() instead");
529 "Use vrna_pt_snoop_get() instead");
531 DEPRECATED(
int *make_loop_index_pt(
short *pt),
532 "Use vrna_loopidx_from_ptable() instead");
548 "Use vrna_bp_distance() instead");
560 "Use vrna_refBPcnt_matrix() instead");
573 "Use vrna_refBPdist_matrix() instead");
598 "Use vrna_plist_from_probs() instead");
610 "Use vrna_parenthesis_structure() instead");
623 "Use vrna_parenthesis_zuker() instead");
625 DEPRECATED(
void letter_structure(
char *structure,
628 "Use vrna_letter_structure() instead");
636 unsigned int length),
637 "Use vrna_db_from_probs() instead");
644 "Use vrna_bpp_symbol() instead");
short * vrna_ptable_from_string(const char *string, unsigned int options)
Create a pair table for a secondary structure string.
char vrna_bpp_symbol(const float *x)
Get a pseudo dot bracket notation for a given probability information.
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.
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.
Data structure representing a single entry of an element probability list (e.g. list of pair probabil...
Definition: structure_utils.h:114
char * vrna_db_from_bp_stack(vrna_bp_stack_t *bp, unsigned int length)
Create a dot-backet/parenthesis structure from backtracking stack.
int bp_distance(const char *str1, const char *str2)
Compute the "base pair" distance between two secondary structures s1 and s2.
char * vrna_db_pack(const char *struc)
Pack secondary secondary structure, 5:1 compression using base 3 encoding.
double FLT_OR_DBL
Typename for floating point number in partition function computations.
Definition: data_structures.h:43
The most basic data structure required by many functions throughout the RNAlib.
Definition: fold_compound.h:131
short * vrna_ptable(const char *structure)
Create a pair table of a secondary structure.
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.
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 calcul...
char * vrna_db_from_ptable(short *pt)
Convert a pair table into dot-parenthesis notation.
char * vrna_db_from_plist(vrna_ep_t *pairs, unsigned int n)
Convert a list of base pairs into dot-bracket notation.
vrna_ep_t * vrna_plist(const char *struc, float pr)
Create a vrna_ep_t from a dot-bracket string.
Various data structures and pre-processor macros.
short * vrna_pt_pk_get(const char *structure)
Create a pair table of a secondary structure (pseudo-knot version)
short * make_pair_table(const char *structure)
Create a pair table of a secondary structure.
char bppm_symbol(const float *x)
Get a pseudo dot bracket notation for a given probability information.
unsigned int * compute_BPdifferences(short *pt1, short *pt2, unsigned int turn)
Make a reference base pair distance matrix.
unsigned int * vrna_refBPdist_matrix(const short *pt1, const short *pt2, unsigned int turn)
Make a reference base pair distance matrix.
Data structure representing an entry of a helix list.
Definition: structure_utils.h:98
char * vrna_db_unpack(const char *packed)
Unpack secondary structure previously packed with vrna_db_pack()
short * copy_pair_table(const short *pt)
Get an exact copy of a pair table.
vrna_ep_t * vrna_plist_from_probs(vrna_fold_compound_t *vc, double cut_off)
Create a vrna_ep_t from base pair probability matrix.
short * vrna_pt_ali_get(const char *structure)
Create a pair table of a secondary structure (snoop align version)
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.
void vrna_db_flatten(char *structure, unsigned int options)
Substitute pairs of brackets in a string with parenthesis.
char * vrna_db_from_WUSS(const char *wuss)
Convert a WUSS annotation string to dot-bracket format.
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.
void parenthesis_structure(char *structure, vrna_bp_stack_t *bp, int length)
Create a dot-backet/parenthesis structure from backtracking stack.
Base pair stack element.
Definition: data_structures.h:141
FLT_OR_DBL * pr
A pointer to the base pair probability matrix.
char * unpack_structure(const char *packed)
Unpack secondary structure previously packed with pack_structure()
char * pack_structure(const char *struc)
Pack secondary secondary structure, 5:1 compression using base 3 encoding.
short * alimake_pair_table(const char *structure)
void assign_plist_from_db(vrna_ep_t **pl, const char *struc, float pr)
Create a vrna_ep_t from a dot-bracket string.
short * vrna_pt_snoop_get(const char *structure)
Create a pair table of a secondary structure (snoop version)
short * make_pair_table_snoop(const char *structure)
short * vrna_ptable_copy(const short *pt)
Get an exact copy of a pair table.
int pairs
contains the number of base pairs in the last parsed structure.
unsigned int * vrna_refBPcnt_matrix(const short *reference_pt, unsigned int turn)
Make a reference base pair count matrix.
unsigned int * make_referenceBP_array(short *reference_pt, unsigned int turn)
Make a reference base pair count matrix.