RNAlib-2.3.1

Parse and apply different commands that alter the behavior of secondary structure prediction and evaluation. More...

+ Include dependency graph for commands.h:

Go to the source code of this file.

Data Structures

struct  vrna_command_s
 List element for commands ready for application to a vrna_fold_compound_t. More...
 
#define VRNA_CMD_PARSE_HC   1U
 Command parse/apply flag indicating hard constraints. More...
 
#define VRNA_CMD_PARSE_SC   2U
 Command parse/apply flag indicating soft constraints. More...
 
#define VRNA_CMD_PARSE_UD   4U
 Command parse/apply flag indicating unstructured domains. More...
 
#define VRNA_CMD_PARSE_SD   8U
 Command parse/apply flag indicating structured domains. More...
 
#define VRNA_CMD_PARSE_DEFAULTS
 Command parse/apply flag indicating default set of commands. More...
 
typedef struct vrna_command_s vrna_cmd_t
 Typename for the command repesenting data structure vrna_command_s.
 
vrna_cmd_tvrna_file_commands_read (const char *filename, unsigned int options)
 Extract a list of commands from a command file. More...
 
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. More...
 
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. More...
 
void vrna_commands_free (vrna_cmd_t *commands)
 Free memory occupied by a list of commands. More...
 

Detailed Description

Parse and apply different commands that alter the behavior of secondary structure prediction and evaluation.

Macro Definition Documentation

#define VRNA_CMD_PARSE_HC   1U

Command parse/apply flag indicating hard constraints.

See also
vrna_command_s, vrna_file_commands_read(), vrna_file_commands_apply(), vrna_commands_apply()
#define VRNA_CMD_PARSE_SC   2U

Command parse/apply flag indicating soft constraints.

See also
vrna_command_s, vrna_file_commands_read(), vrna_file_commands_apply(), vrna_commands_apply()
#define VRNA_CMD_PARSE_UD   4U

Command parse/apply flag indicating unstructured domains.

See also
vrna_command_s, vrna_file_commands_read(), vrna_file_commands_apply(), vrna_commands_apply()
#define VRNA_CMD_PARSE_SD   8U

Command parse/apply flag indicating structured domains.

See also
vrna_command_s, vrna_file_commands_read(), vrna_file_commands_apply(), vrna_commands_apply()
#define VRNA_CMD_PARSE_DEFAULTS
Value:
)
#define VRNA_CMD_PARSE_SD
Command parse/apply flag indicating structured domains.
Definition: commands.h:41
#define VRNA_CMD_PARSE_SC
Command parse/apply flag indicating soft constraints.
Definition: commands.h:31
#define VRNA_CMD_PARSE_HC
Command parse/apply flag indicating hard constraints.
Definition: commands.h:26
#define VRNA_CMD_PARSE_UD
Command parse/apply flag indicating unstructured domains.
Definition: commands.h:36

Command parse/apply flag indicating default set of commands.

See also
vrna_command_s, vrna_file_commands_read(), vrna_file_commands_apply(), vrna_commands_apply()

Function Documentation

vrna_cmd_t* vrna_file_commands_read ( const char *  filename,
unsigned int  options 
)

Extract a list of commands from a command file.

Read a list of commands specified in the input file and return them as list of abstract commands

See also
vrna_commands_apply(), vrna_file_commands_apply(), vrna_commands_free()
Parameters
filenameThe filename
optionsOptions to limit the type of commands read from the file
Returns
A list of abstract commands
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.

This function is a shortcut to directly parse a commands file and apply all successfully parsed commands to a vrna_fold_compound_t data structure. It is the same as:

int r;
vrna_cmd_t *cmds;
cmds = vrna_file_commands_read(filename, options);
r = vrna_commands_apply(vc, cmds, options);
return r;
Parameters
vcThe vrna_fold_compound_t the command list will be applied to
filenameThe filename
optionsOptions to limit the type of commands read from the file
Returns
The number of commands successfully applied
SWIG Wrapper Notes:
This function is attached as method file_commands_apply() to objects of type fold_compound
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.

Parameters
vcThe vrna_fold_compound_t the command list will be applied to
commandsThe list of commands to apply
optionsOptions to limit the type of commands read from the file
Returns
The number of commands successfully applied
SWIG Wrapper Notes:
This function is attached as method commands_apply() to objects of type fold_compound
void vrna_commands_free ( vrna_cmd_t commands)

Free memory occupied by a list of commands.

Release memory occupied by a list of commands

Parameters
commandsA pointer to a list of commands