RNAlib-2.1.9h
alifold.h
Go to the documentation of this file.
1 #ifndef __VIENNA_RNA_PACKAGE_ALIFOLD_H__
2 #define __VIENNA_RNA_PACKAGE_ALIFOLD_H__
3 
4 #include "data_structures.h"
5 
43 extern double cv_fact;
52 extern double nc_fact;
53 
54 /*
55 ##############################################
56 # MFE VARIANTS OF THE ALIFOLD IMPLEMENTATION #
57 ##############################################
58 */
59 
66 void update_alifold_params(void);
67 
68 
86 float alifold( const char **strings,
87  char *structure);
88 
89 
100 float circalifold( const char **strings,
101  char *structure);
102 
109 void free_alifold_arrays(void);
110 
122 int get_mpi(char *Alseq[],
123  int n_seq,
124  int length,
125  int *mini);
126 
133 float **readribosum(char *name);
134 
148 float energy_of_alistruct(const char **sequences,
149  const char *structure,
150  int n_seq,
151  float *energy);
152 
153 float energy_of_ali_gquad_structure(const char **sequences,
154  const char *structure,
155  int n_seq,
156  float *energy);
157 
158 /*
159 #############################################################
160 # some helper functions that might be useful in the library #
161 #############################################################
162 */
163 
180 void encode_ali_sequence( const char *sequence,
181  short *S,
182  short *s5,
183  short *s3,
184  char *ss,
185  unsigned short *as,
186  int circ);
187 
205 void alloc_sequence_arrays(const char **sequences,
206  short ***S,
207  short ***S5,
208  short ***S3,
209  unsigned short ***a2s,
210  char ***Ss,
211  int circ);
212 
229 void free_sequence_arrays( unsigned int n_seq,
230  short ***S,
231  short ***S5,
232  short ***S3,
233  unsigned short ***a2s,
234  char ***Ss);
235 
236 /*
237 #############################################################
238 # PARTITION FUNCTION VARIANTS OF THE ALIFOLD IMPLEMENTATION #
239 #############################################################
240 */
241 
242 
265 float alipf_fold_par( const char **sequences,
266  char *structure,
267  plist **pl,
268  pf_paramT *parameters,
269  int calculate_bppm,
270  int is_constrained,
271  int is_circular);
272 
289 float alipf_fold( const char **sequences,
290  char *structure,
291  plist **pl);
292 
303 float alipf_circ_fold(const char **sequences,
304  char *structure,
305  plist **pl);
306 
307 
319 FLT_OR_DBL *export_ali_bppm(void);
320 
327 void free_alipf_arrays(void);
328 
344 char *alipbacktrack(double *prob);
345 
346 
367 int get_alipf_arrays(short ***S_p,
368  short ***S5_p,
369  short ***S3_p,
370  unsigned short ***a2s_p,
371  char ***Ss_p,
372  FLT_OR_DBL **qb_p,
373  FLT_OR_DBL **qm_p,
374  FLT_OR_DBL **q1k_p,
375  FLT_OR_DBL **qln_p,
376  short **pscore);
377 
378 #endif
float alifold(const char **strings, char *structure)
Compute MFE and according consensus structure of an alignment of sequences.
double cv_fact
This variable controls the weight of the covariance term in the energy function of alignment folding ...
float alipf_fold(const char **sequences, char *structure, plist **pl)
The partition function version of alifold() works in analogy to pf_fold(). Pair probabilities and inf...
void alloc_sequence_arrays(const char **sequences, short ***S, short ***S5, short ***S3, unsigned short ***a2s, char ***Ss, int circ)
Allocate memory for sequence array used to deal with aligned sequences.
int circ
backward compatibility variable.. this does not effect anything
float alipf_fold_par(const char **sequences, char *structure, plist **pl, pf_paramT *parameters, int calculate_bppm, int is_constrained, int is_circular)
double nc_fact
This variable controls the magnitude of the penalty for non-compatible sequences in the covariance te...
The datastructure that contains temperature scaled Boltzmann weights of the energy parameters...
Definition: data_structures.h:203
float ** readribosum(char *name)
Read a ribosum or other user-defined scoring matrix.
int get_alipf_arrays(short ***S_p, short ***S5_p, short ***S3_p, unsigned short ***a2s_p, char ***Ss_p, double **qb_p, double **qm_p, double **q1k_p, double **qln_p, short **pscore)
Get pointers to (almost) all relavant arrays used in alifold's partition function computation...
void free_alifold_arrays(void)
Free the memory occupied by MFE alifold functions.
float circalifold(const char **strings, char *structure)
Compute MFE and according structure of an alignment of sequences assuming the sequences are circular ...
All datastructures and typedefs shared among the Vienna RNA Package can be found here.
char * alipbacktrack(double *prob)
Sample a consensus secondary structure from the Boltzmann ensemble according its probability ...
double * export_ali_bppm(void)
Get a pointer to the base pair probability array.
this datastructure is used as input parameter in functions of PS_dot.h and others ...
Definition: data_structures.h:48
float alipf_circ_fold(const char **sequences, char *structure, plist **pl)
void encode_ali_sequence(const char *sequence, short *S, short *s5, short *s3, char *ss, unsigned short *as, int circ)
Get arrays with encoded sequence of the alignment.
int get_mpi(char *Alseq[], int n_seq, int length, int *mini)
Get the mean pairwise identity in steps from ?to?(ident)
void free_sequence_arrays(unsigned int n_seq, short ***S, short ***S5, short ***S3, unsigned short ***a2s, char ***Ss)
Free the memory of the sequence arrays used to deal with aligned sequences.
float energy_of_alistruct(const char **sequences, const char *structure, int n_seq, float *energy)
Calculate the free energy of a consensus structure given a set of aligned sequences.
void update_alifold_params(void)
Update the energy parameters for alifold function.