structure_utils.h
Go to the documentation of this file.
#ifndef VIENNA_RNA_PACKAGE_STRUCT_UTILS_H
#define VIENNA_RNA_PACKAGE_STRUCT_UTILS_H
/* make this interface backward compatible with RNAlib < 2.2.0 */
#define VRNA_BACKWARD_COMPAT
#ifdef DEPRECATION_WARNINGS
# ifdef __GNUC__
# define DEPRECATED(func) func __attribute__ ((deprecated))
# else
# define DEPRECATED(func) func
# endif
#else
# define DEPRECATED(func) func
#endif
typedef struct vrna_hx_s vrna_hx_t;
#include <stdio.h>
#include <ViennaRNA/data_structures.h>
struct vrna_hx_s {
unsigned int start;
unsigned int end;
unsigned int length;
unsigned int up5;
unsigned int up3;
};
char *vrna_db_pack(const char *struc);
char *vrna_db_unpack(const char *packed);
short *vrna_ptable(const char *structure);
short *vrna_pt_pk_get(const char *structure);
short *vrna_ptable_copy(const short *pt);
short *vrna_pt_ali_get(const char *structure);
short *vrna_pt_snoop_get(const char *structure);
int *vrna_loopidx_from_ptable(const short *pt);
char *vrna_db_from_ptable(short *pt);
int vrna_bp_distance( const char *str1,
const char *str2);
unsigned int *vrna_refBPcnt_matrix(const short *reference_pt,
unsigned int turn);
unsigned int *vrna_refBPdist_matrix( const short *pt1,
const short *pt2,
unsigned int turn);
char *vrna_db_from_probs( const FLT_OR_DBL *pr,
unsigned int length);
char vrna_bpp_symbol(const float *x);
char *vrna_db_from_bp_stack(vrna_bp_stack_t *bp,
unsigned int length);
void vrna_letter_structure( char *structure,
vrna_bp_stack_t *bp,
unsigned int length);
vrna_plist_t *vrna_plist(const char *struc, float pr);
vrna_plist_t *vrna_plist_from_probs(vrna_fold_compound_t *vc, double cut_off);
char *vrna_db_from_plist(vrna_plist_t *pairs, unsigned int n);
vrna_hx_t *vrna_hx_from_ptable(short *pt);
vrna_hx_t *vrna_hx_merge(const vrna_hx_t *list, int maxdist);
#ifdef VRNA_BACKWARD_COMPAT
/*###########################################*/
/*# deprecated functions below #*/
/*###########################################*/
DEPRECATED(void assign_plist_from_db(vrna_plist_t **pl, const char *struc, float pr));
DEPRECATED(char *pack_structure(const char *struc));
DEPRECATED(char *unpack_structure(const char *packed));
DEPRECATED(short *make_pair_table(const char *structure));
DEPRECATED(short *make_pair_table_pk(const char *structure));
DEPRECATED(short *copy_pair_table(const short *pt));
DEPRECATED(short *alimake_pair_table(const char *structure));
DEPRECATED(short *make_pair_table_snoop(const char *structure));
DEPRECATED(int *make_loop_index_pt(short *pt));
DEPRECATED(int bp_distance(const char *str1, const char *str2));
DEPRECATED(unsigned int *make_referenceBP_array(short *reference_pt,
unsigned int turn));
DEPRECATED(unsigned int *compute_BPdifferences( short *pt1,
short *pt2,
unsigned int turn));
DEPRECATED(void assign_plist_from_pr( vrna_plist_t **pl,
FLT_OR_DBL *probs,
int length,
double cutoff));
DEPRECATED(void parenthesis_structure(char *structure,
vrna_bp_stack_t *bp,
int length));
DEPRECATED(void parenthesis_zuker(char *structure,
vrna_bp_stack_t *bp,
int length));
DEPRECATED(void letter_structure( char *structure,
vrna_bp_stack_t *bp,
int length));
DEPRECATED(void bppm_to_structure(char *structure, FLT_OR_DBL *pr, unsigned int length));
DEPRECATED(char bppm_symbol(const float *x));
#endif
#endif
vrna_bpp_symbol
char vrna_bpp_symbol(const float *x)
Get a pseudo dot bracket notation for a given probability information.
vrna_loopidx_from_ptable
int * vrna_loopidx_from_ptable(const short *pt)
Get a loop index representation of a structure.
vrna_bp_distance
int vrna_bp_distance(const char *str1, const char *str2)
Compute the "base pair" distance between two secondary structures s1 and s2.
vrna_plist
vrna_plist_t * vrna_plist(const char *struc, float pr)
Create a vrna_plist_t from a dot-bracket string.
vrna_db_from_plist
char * vrna_db_from_plist(vrna_plist_t *pairs, unsigned int n)
Convert a list of base pairs into dot-bracket notation.
vrna_db_from_bp_stack
char * vrna_db_from_bp_stack(vrna_bp_stack_t *bp, unsigned int length)
Create a dot-backet/parenthesis structure from backtracking stack.
bp_distance
int bp_distance(const char *str1, const char *str2)
Compute the "base pair" distance between two secondary structures s1 and s2.
vrna_db_pack
char * vrna_db_pack(const char *struc)
Pack secondary secondary structure, 5:1 compression using base 3 encoding.
FLT_OR_DBL
double FLT_OR_DBL
Typename for floating point number in partition function computations.
Definition: data_structures.h:39
vrna_plist_from_probs
vrna_plist_t * vrna_plist_from_probs(vrna_fold_compound_t *vc, double cut_off)
Create a vrna_plist_t from base pair probability matrix.
vrna_fc_s
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:390
vrna_ptable
short * vrna_ptable(const char *structure)
Create a pair table of a secondary structure.
vrna_db_from_probs
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.
parenthesis_zuker
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...
vrna_db_from_ptable
char * vrna_db_from_ptable(short *pt)
Convert a pair table into dot-parenthesis notation.
data_structures.h
vrna_pt_pk_get
short * vrna_pt_pk_get(const char *structure)
Create a pair table of a secondary structure (pseudo-knot version)
make_pair_table
short * make_pair_table(const char *structure)
Create a pair table of a secondary structure.
bppm_symbol
char bppm_symbol(const float *x)
Get a pseudo dot bracket notation for a given probability information.
compute_BPdifferences
unsigned int * compute_BPdifferences(short *pt1, short *pt2, unsigned int turn)
Make a reference base pair distance matrix.
vrna_refBPdist_matrix
unsigned int * vrna_refBPdist_matrix(const short *pt1, const short *pt2, unsigned int turn)
Make a reference base pair distance matrix.
vrna_hx_s
Definition: structure_utils.h:32
vrna_db_unpack
char * vrna_db_unpack(const char *packed)
Unpack secondary structure previously packed with vrna_db_pack()
copy_pair_table
short * copy_pair_table(const short *pt)
Get an exact copy of a pair table.
assign_plist_from_db
void assign_plist_from_db(vrna_plist_t **pl, const char *struc, float pr)
Create a vrna_plist_t from a dot-bracket string.
vrna_pt_ali_get
short * vrna_pt_ali_get(const char *structure)
Create a pair table of a secondary structure (snoop align version)
vrna_plist_s
this datastructure is used as input parameter in functions of PS_dot.h and others ...
Definition: data_structures.h:164
bppm_to_structure
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.
parenthesis_structure
void parenthesis_structure(char *structure, vrna_bp_stack_t *bp, int length)
Create a dot-backet/parenthesis structure from backtracking stack.
vrna_bp_stack_s
Base pair stack element.
Definition: data_structures.h:192
pr
FLT_OR_DBL * pr
A pointer to the base pair probability matrix.
unpack_structure
char * unpack_structure(const char *packed)
Unpack secondary structure previously packed with pack_structure()
pack_structure
char * pack_structure(const char *struc)
Pack secondary secondary structure, 5:1 compression using base 3 encoding.
alimake_pair_table
short * alimake_pair_table(const char *structure)
vrna_pt_snoop_get
short * vrna_pt_snoop_get(const char *structure)
Create a pair table of a secondary structure (snoop version)
make_pair_table_snoop
short * make_pair_table_snoop(const char *structure)
vrna_ptable_copy
short * vrna_ptable_copy(const short *pt)
Get an exact copy of a pair table.
assign_plist_from_pr
void assign_plist_from_pr(vrna_plist_t **pl, FLT_OR_DBL *probs, int length, double cutoff)
Create a vrna_plist_t from a probability matrix.
pairs
int pairs
contains the number of base pairs in the last parsed structure.
vrna_refBPcnt_matrix
unsigned int * vrna_refBPcnt_matrix(const short *reference_pt, unsigned int turn)
Make a reference base pair count matrix.
make_referenceBP_array
unsigned int * make_referenceBP_array(short *reference_pt, unsigned int turn)
Make a reference base pair count matrix.