RNAlib-2.4.3
fold_compound.h
Go to the documentation of this file.
1 #ifndef VIENNA_RNA_PACKAGE_FOLD_COMPOUND_H
2 #define VIENNA_RNA_PACKAGE_FOLD_COMPOUND_H
3 
27 
46 typedef void (vrna_callback_free_auxdata)(void *data);
47 
67 typedef void (vrna_callback_recursion_status)(unsigned char status,
68  void *data);
69 
76 #define VRNA_STATUS_MFE_PRE (unsigned char)1
77 
84 #define VRNA_STATUS_MFE_POST (unsigned char)2
85 
91 #define VRNA_STATUS_PF_PRE (unsigned char)3
92 
98 #define VRNA_STATUS_PF_POST (unsigned char)4
99 
100 
101 #include <ViennaRNA/model.h>
102 #include <ViennaRNA/params.h>
103 #include <ViennaRNA/dp_matrices.h>
104 #include <ViennaRNA/constraints.h>
105 #include <ViennaRNA/grammar.h>
108 
112 typedef enum {
116 
117 
130 struct vrna_fc_s {
142  unsigned int length;
143  int cutpoint;
147  unsigned int *strand_number;
157  int *iindx;
158  int *jindx;
171  void *auxdata;
186  /* data structure to adjust additional structural domains, such as G-quadruplexes */
189  /* data structure to adjust additional contributions to unpaired stretches, e.g. due to protein binding */
192  /* auxiliary (user-defined) extension to the folding grammar */
193  vrna_gr_aux_t *aux_grammar;
194 
199 #ifndef VRNA_DISABLE_C11_FEATURES
200  /* C11 support for unnamed unions/structs */
201  union {
202  struct {
203 #endif
204 
209  char *sequence;
216  short *sequence_encoding2;
217  char *ptype;
239 #ifndef VRNA_DISABLE_C11_FEATURES
240  /* C11 support for unnamed unions/structs */
241 };
242 struct {
243 #endif
244 
249  char **sequences;
253  unsigned int n_seq;
256  char *cons_seq;
259  short *S_cons;
262  short **S;
265  short **S5;
268  short **S3;
271  char **Ss;
272  unsigned int **a2s;
273  int *pscore;
276  int **pscore_local;
286  int oldAliEn;
287 
291 #ifndef VRNA_DISABLE_C11_FEATURES
292 };
293 };
294 #endif
295 
302  unsigned int maxD1;
303  unsigned int maxD2;
304  short *reference_pt1;
305  short *reference_pt2;
307  unsigned int *referenceBPs1;
308  unsigned int *referenceBPs2;
309  unsigned int *bpdist;
311  unsigned int *mm1;
312  unsigned int *mm2;
325  char **ptype_local;
329 };
330 
331 
332 /* the definitions below should be used for functions that return/receive/destroy fold compound data structures */
333 
337 #define VRNA_OPTION_DEFAULT 0U
338 
345 #define VRNA_OPTION_MFE 1U
346 
353 #define VRNA_OPTION_PF 2U
354 
358 #define VRNA_OPTION_HYBRID 4U
359 
369 #define VRNA_OPTION_EVAL_ONLY 8U
370 
374 #define VRNA_OPTION_WINDOW 16U
375 
416 vrna_fold_compound(const char *sequence,
417  vrna_md_t *md_p,
418  unsigned int options);
419 
420 
460  vrna_md_t *md_p,
461  unsigned int options);
462 
463 
465 vrna_fold_compound_TwoD(const char *sequence,
466  const char *s1,
467  const char *s2,
468  vrna_md_t *md_p,
469  unsigned int options);
470 
471 
472 int
473 vrna_fold_compound_prepare(vrna_fold_compound_t *vc,
474  unsigned int options);
475 
476 
484 void
486 
487 
506  void *data,
508 
509 
527 
528 
533 #endif
short ** S3
Sl[s][i] holds next base 3&#39; of i in sequence s.
Definition: fold_compound.h:268
short ** S
Numerical encoding of the sequences in the alignment.
Definition: fold_compound.h:262
void vrna_fold_compound_add_callback(vrna_fold_compound_t *vc, vrna_callback_recursion_status *f)
Add a recursion status callback to the vrna_fold_compound_t.
Definition: structured_domains.h:26
unsigned int * mm1
Maximum matching matrix, reference struct 1 disallowed.
Definition: fold_compound.h:311
Minimum Free Energy (MFE) Dynamic Programming (DP) matrices data structure required within the vrna_f...
Definition: dp_matrices.h:45
vrna_fold_compound_t * vrna_fold_compound_comparative(const char **sequences, vrna_md_t *md_p, unsigned int options)
Retrieve a vrna_fold_compound_t data structure for sequence alignments.
short * S_cons
Numerical encoding of the consensus sequence.
Definition: fold_compound.h:259
char * ptype
Pair type array.
Definition: fold_compound.h:217
Functions to deal with standard dynamic programming (DP) matrices.
short * sequence_encoding
Numerical encoding of the input sequence.
Definition: fold_compound.h:212
vrna_exp_param_t * exp_params
The precomputed free energy contributions as Boltzmann factors.
Definition: fold_compound.h:155
Data structure to store all functionality for ligand binding.
Definition: unstructured_domains.h:197
unsigned int * bpdist
Matrix containing base pair distance of reference structure 1 and 2 on interval [i,j].
Definition: fold_compound.h:309
short * reference_pt1
A pairtable of the first reference structure.
Definition: fold_compound.h:304
vrna_sc_t * sc
The soft constraints for usage in structure prediction and evaluation.
Definition: fold_compound.h:231
The most basic data structure required by many functions throughout the RNAlib.
Definition: fold_compound.h:130
char ** sequences
The aligned sequences.
Definition: fold_compound.h:249
The model details data structure and its corresponding modifiers.
void * auxdata
A pointer to auxiliary, user-defined data.
Definition: fold_compound.h:171
The datastructure that contains temperature scaled energy parameters.
Definition: params.h:57
short * pscore_pf_compat
Precomputed array of pair types expressed as pairing scores indexed via iindx.
Definition: fold_compound.h:279
vrna_sd_t * domains_struc
Additional structured domains.
Definition: fold_compound.h:187
void vrna_fold_compound_add_auxdata(vrna_fold_compound_t *vc, void *data, vrna_callback_free_auxdata *f)
Add auxiliary data to the vrna_fold_compound_t.
vrna_ud_t * domains_up
Additional unstructured domains.
Definition: fold_compound.h:190
char * cons_seq
The consensus sequence of the aligned sequences.
Definition: fold_compound.h:256
Definition: grammar.h:18
vrna_hc_t * hc
The hard constraints data structure used for structure prediction.
Definition: fold_compound.h:149
char * ptype_pf_compat
ptype array indexed via iindx
Definition: fold_compound.h:226
int * jindx
DP matrix accessor.
Definition: fold_compound.h:158
void vrna_fold_compound_free(vrna_fold_compound_t *vc)
Free memory occupied by a vrna_fold_compound_t.
vrna_fc_type_e
An enumerator that is used to specify the type of a vrna_fold_compound_t.
Definition: fold_compound.h:112
vrna_fold_compound_t * vrna_fold_compound(const char *sequence, vrna_md_t *md_p, unsigned int options)
Retrieve a vrna_fold_compound_t data structure for single sequences and hybridizing sequences...
The data structure that contains the complete model details used throughout the calculations.
Definition: model.h:189
The soft constraints data structure.
Definition: constraints_soft.h:154
short ** S5
S5[s][i] holds next base 5&#39; of i in sequence s.
Definition: fold_compound.h:265
Functions to deal with sets of energy parameters.
The data structure that contains temperature scaled Boltzmann weights of the energy parameters...
Definition: params.h:102
vrna_sc_t ** scs
A set of soft constraints (for each sequence in the alignment)
Definition: fold_compound.h:283
The hard constraints data structure.
Definition: constraints_hard.h:373
Definition: fold_compound.h:114
Functions to modify unstructured domains, e.g. to incorporate ligands binding to unpaired stretches...
unsigned int * strand_number
The strand number a particular nucleotide is associated with.
Definition: fold_compound.h:147
vrna_param_t * params
The precomputed free energy contributions for each type of loop.
Definition: fold_compound.h:154
int * pscore
Precomputed array of pair types expressed as pairing scores.
Definition: fold_compound.h:273
unsigned int n_seq
The number of sequences in the alignment.
Definition: fold_compound.h:253
unsigned int * referenceBPs2
Matrix containing number of basepairs of reference structure2 in interval [i,j].
Definition: fold_compound.h:308
char * sequence
The input sequence string.
Definition: fold_compound.h:209
vrna_mx_mfe_t * matrices
The MFE DP matrices.
Definition: fold_compound.h:151
Definition: fold_compound.h:113
void() vrna_callback_free_auxdata(void *data)
Callback to free memory allocated for auxiliary user-provided data.
Definition: fold_compound.h:46
vrna_callback_recursion_status * stat_cb
Recursion status callback (usually called just before, and after recursive computations in the librar...
Definition: fold_compound.h:166
int cutpoint
The position of the (cofold) cutpoint within the provided sequence. If there is no cutpoint...
Definition: fold_compound.h:143
int ** pscore_local
Precomputed array of pair types expressed as pairing scores.
Definition: fold_compound.h:276
vrna_callback_free_auxdata * free_auxdata
A callback to free auxiliary user data whenever the fold_compound itself is free&#39;d.
Definition: fold_compound.h:175
unsigned int length
The length of the sequence (or sequence alignment)
Definition: fold_compound.h:142
void() vrna_callback_recursion_status(unsigned char status, void *data)
Callback to perform specific user-defined actions before, or after recursive computations.
Definition: fold_compound.h:67
Functions and data structures for constraining secondary structure predictions and evaluation...
short * reference_pt2
A pairtable of the second reference structure.
Definition: fold_compound.h:305
This module provides interfaces that deal with additional structured domains in the folding grammar...
unsigned int maxD1
Maximum allowed base pair distance to first reference.
Definition: fold_compound.h:302
unsigned int * mm2
Maximum matching matrix, reference struct 2 disallowed.
Definition: fold_compound.h:312
unsigned int * referenceBPs1
Matrix containing number of basepairs of reference structure1 in interval [i,j].
Definition: fold_compound.h:307
Implementations for the RNA folding grammar.
vrna_fc_type_e type
The type of the vrna_fold_compound_t.
Definition: fold_compound.h:135
int window_size
window size for local folding sliding window approach
Definition: fold_compound.h:324
char ** ptype_local
Pair type array (for local folding)
Definition: fold_compound.h:325
int * iindx
DP matrix accessor.
Definition: fold_compound.h:157
Partition function (PF) Dynamic Programming (DP) matrices data structure required within the vrna_fol...
Definition: dp_matrices.h:203
unsigned int maxD2
Maximum allowed base pair distance to second reference.
Definition: fold_compound.h:303
vrna_mx_pf_t * exp_matrices
The PF DP matrices.
Definition: fold_compound.h:152