RNAlib-2.3.1
commands.h
Go to the documentation of this file.
1 #ifndef VIENNA_RNA_PACKAGE_COMMANDS_H
2 #define VIENNA_RNA_PACKAGE_COMMANDS_H
3 
17 typedef struct vrna_command_s vrna_cmd_t;
18 
19 
21 
26 #define VRNA_CMD_PARSE_HC 1U
27 
31 #define VRNA_CMD_PARSE_SC 2U
32 
36 #define VRNA_CMD_PARSE_UD 4U
37 
41 #define VRNA_CMD_PARSE_SD 8U
42 
46 #define VRNA_CMD_PARSE_DEFAULTS ( VRNA_CMD_PARSE_HC \
47  | VRNA_CMD_PARSE_SC \
48  | VRNA_CMD_PARSE_UD \
49  | VRNA_CMD_PARSE_SD \
50  )
51 
55 typedef enum {
56  VRNA_CMD_ERROR=-1,
57  VRNA_CMD_LAST=0,
58  VRNA_CMD_HC,
59  VRNA_CMD_SC,
60  VRNA_CMD_MOTIF,
61  VRNA_CMD_UD,
62  VRNA_CMD_SD
64 
70  vrna_command_e type;
71  void *data;
72 };
73 
87 vrna_cmd_t *vrna_file_commands_read(const char *filename,
88  unsigned int options);
89 
104  const char *filename,
105  unsigned int options);
106 
116  vrna_cmd_t *commands,
117  unsigned int options);
118 
125 void vrna_commands_free( vrna_cmd_t *commands);
126 
131 #endif
The most basic data structure required by many functions throughout the RNAlib.
Definition: data_structures.h:454
void vrna_commands_free(vrna_cmd_t *commands)
Free memory occupied by a list of commands.
List element for commands ready for application to a vrna_fold_compound_t.
Definition: commands.h:69
Various data structures and pre-processor macros.
vrna_command_e
Types of commands within a list of vrna_command_s structures.
Definition: commands.h:55
int vrna_file_commands_apply(vrna_fold_compound_t *vc, const char *filename, unsigned int options)
Apply a list of commands from a command file.
vrna_cmd_t * vrna_file_commands_read(const char *filename, unsigned int options)
Extract a list of commands from a command file.
int vrna_commands_apply(vrna_fold_compound_t *vc, vrna_cmd_t *commands, unsigned int options)
Apply a list of commands to a vrna_fold_compound_t.