RNAlib-2.2.0RC0
constraints.h
1 #ifndef __VIENNA_RNA_PACKAGE_CONSTRAINTS_H__
2 #define __VIENNA_RNA_PACKAGE_CONSTRAINTS_H__
3 
5 
32 #define VRNA_CONSTRAINT_PIPE 1U
33 
40 #define VRNA_CONSTRAINT_DOT 2U
41 
47 #define VRNA_CONSTRAINT_X 4U
48 
54 #define VRNA_CONSTRAINT_ANG_BRACK 8U
55 
61 #define VRNA_CONSTRAINT_RND_BRACK 16U
62 
72 #define VRNA_CONSTRAINT_INTRAMOLECULAR 2048U
73 
83 #define VRNA_CONSTRAINT_INTERMOLECULAR 4096U
84 
91 #define VRNA_CONSTRAINT_MULTILINE 32U
92 
98 #define VRNA_CONSTRAINT_NO_HEADER 64U
99 
105 #define VRNA_CONSTRAINT_ALL 128U
106 
113 #define VRNA_CONSTRAINT_DB 256U
114 
121 #define VRNA_CONSTRAINT_FILE 512U
122 
129 #define VRNA_CONSTRAINT_IINDX 1024U
130 
137 #define VRNA_CONSTRAINT_SOFT_MFE 8192U
138 
145 #define VRNA_CONSTRAINT_SOFT_PF 16384U
146 
147 
154 #define VRNA_CONSTRAINT_SOFT_UP 32768U
155 
162 #define VRNA_CONSTRAINT_SOFT_BP 65536U
163 
170 #define VRNA_CONSTRAINT_UNGAP 131072U
171 
178 #define VRNA_HC_CONTEXT_EXT_LOOP (char)0x01
179 
185 #define VRNA_HC_CONTEXT_HP_LOOP (char)0x02
186 
192 #define VRNA_HC_CONTEXT_INT_LOOP (char)0x04
193 
199 #define VRNA_HC_CONTEXT_MB_LOOP (char)0x08
200 
206 #define VRNA_HC_CONTEXT_INT_LOOP_ENC (char)0x10
207 
213 #define VRNA_HC_CONTEXT_MB_LOOP_ENC (char)0x20
214 
215 #define VRNA_HC_CONTEXT_ALL_LOOPS VRNA_HC_CONTEXT_EXT_LOOP \
216  | VRNA_HC_CONTEXT_HP_LOOP \
217  | VRNA_HC_CONTEXT_INT_LOOP \
218  | VRNA_HC_CONTEXT_INT_LOOP_ENC \
219  | VRNA_HC_CONTEXT_MB_LOOP \
220  | VRNA_HC_CONTEXT_MB_LOOP_ENC
221 
222 #define VRNA_HC_CONTEXT_ENFORCE (char)0x40
223 
230 #define VRNA_DECOMP_PAIR_HP 1
231 
238 #define VRNA_DECOMP_PAIR_IL 2
239 
244 #define VRNA_DECOMP_PAIR_ML 3
245 
250 #define VRNA_DECOMP_ML_ML_ML 5
251 
256 #define VRNA_DECOMP_ML_UP_3 4
257 
262 #define VRNA_DECOMP_ML_UP_5 6
263 
268 #define VRNA_DECOMP_ML_UP 11
269 
274 #define VRNA_DECOMP_EXT_EXT 9
275 
280 #define VRNA_DECOMP_EXT_UP_3 7
281 
286 #define VRNA_DECOMP_EXT_UP_5 10
287 
292 #define VRNA_DECOMP_EXT_UP 8
293 
298 #define VRNA_DECOMP_EXT_STEM_UP 12
299 
319 void print_tty_constraint(unsigned int option);
320 
329 void print_tty_constraint_full(void);
330 
346 void constrain_ptypes(const char *constraint,
347  unsigned int length,
348  char *ptype,
349  int *BP,
350  int min_loop_size,
351  unsigned int idx_type);
352 
370 void getConstraint( char **cstruc,
371  const char **lines,
372  unsigned int option);
373 
397  const char *constraint,
398  unsigned int options);
399 
400 void vrna_hc_add_up(vrna_fold_compound *vc,
401  int i,
402  char option);
403 
404 void vrna_hc_add_bp(vrna_fold_compound *vc,
405  int i,
406  int j,
407  char option);
408 
421 
422 
434 
435 
448 int parse_soft_constraints_file(const char *file_name,
449  int length,
450  double default_value,
451  char *sequence,
452  double *values);
453 
454 
466 int convert_shape_reactivities_to_probabilities(const char *shape_conversion,
467  double *values,
468  int length,
469  double default_value);
470 
488 void vrna_sc_add( vrna_fold_compound *vc,
489  const double *constraints,
490  unsigned int options);
491 
492 void vrna_sc_add_ali( vrna_fold_compound *vc,
493  const double **constraints,
494  unsigned int options);
495 
496 int vrna_sc_add_deigan_ali(vrna_fold_compound *vc,
497  const char **shape_files,
498  const int *shape_file_association,
499  double m,
500  double b,
501  unsigned int options);
502 
503 void vrna_sc_add_bp(vrna_fold_compound *vc,
504  const double **constraints,
505  unsigned int options);
506 
507 void vrna_sc_add_bp_mfe(vrna_fold_compound *vc,
508  const double **constraints,
509  unsigned int options);
510 
511 void vrna_sc_add_bp_pf( vrna_fold_compound *vc,
512  const double **constraints,
513  unsigned int options);
514 
515 void vrna_sc_add_up(vrna_fold_compound *vc,
516  const double *constraints,
517  unsigned int options);
518 
519 void vrna_sc_add_up_mfe(vrna_fold_compound *vc,
520  const double *constraints,
521  unsigned int options);
522 
523 void vrna_sc_add_up_pf( vrna_fold_compound *vc,
524  const double *constraints,
525  unsigned int options);
526 
527 void vrna_sc_add_sp(vrna_fold_compound *vc,
528  const double *constraints,
529  unsigned int options);
530 
531 void vrna_sc_add_sp_mfe(vrna_fold_compound *vc,
532  const double *constraints,
533  unsigned int options);
534 
535 void vrna_sc_add_sp_pf( vrna_fold_compound *vc,
536  const double *constraints,
537  unsigned int options);
538 
539 
540 void vrna_sc_remove(vrna_fold_compound *vc);
541 
542 void vrna_sc_destroy(soft_constraintT *sc);
543 
544 int parse_soft_constraints_shape_method(const char *method_string,
545  char *method,
546  float *param_1,
547  float *param_2);
548 
549 #endif
The soft constraints data structure.
Definition: data_structures.h:323
void print_tty_constraint_full(void)
Print structure constraint characters to stdout (full constraint support)
void getConstraint(char **cstruc, const char **lines, unsigned int option)
Get a hard constraint from pseudo dot-bracket notation as specified in the ViennaRNA Package extensio...
The hard constraints data structure.
Definition: data_structures.h:300
void vrna_hc_reset(vrna_fold_compound *vc)
Reset hard constraints to default values.
void print_tty_constraint(unsigned int option)
Print structure constraint characters to stdout. (constraint support is specified by option parameter...
Definition: data_structures.h:359
All datastructures and typedefs shared among the Vienna RNA Package can be found here.
void vrna_hc_free(hard_constraintT *hc)
Free the memory allocated by a hard_constraintT data structure.
void constrain_ptypes(const char *constraint, unsigned int length, char *ptype, int *BP, int min_loop_size, unsigned int idx_type)
Insert constraining pair types according to constraint structure string.
void vrna_hc_add(vrna_fold_compound *vc, const char *constraint, unsigned int options)
Add hard constraints to a vrna_fold_compound data structure.