RNAlib-2.4.14
Command Files

Functions to parse and interpret the content of Command Files. More...

Detailed Description

Functions to parse and interpret the content of Command Files.

+ Collaboration diagram for Command Files:

Files

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

Macros

#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...
 

Typedefs

typedef struct vrna_command_s * vrna_cmd_t
 A data structure that contains commands.
 

Functions

vrna_cmd_t vrna_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...
 

Macro Definition Documentation

#define VRNA_CMD_PARSE_HC   1U

#include <ViennaRNA/commands.h>

Command parse/apply flag indicating hard constraints.

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

#include <ViennaRNA/commands.h>

Command parse/apply flag indicating soft constraints.

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

#include <ViennaRNA/commands.h>

Command parse/apply flag indicating unstructured domains.

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

#include <ViennaRNA/commands.h>

Command parse/apply flag indicating structured domains.

See also
vrna_cmd_t, vrna_file_commands_read(), vrna_file_commands_apply(), vrna_commands_apply()
#define VRNA_CMD_PARSE_DEFAULTS

#include <ViennaRNA/commands.h>

Value:
)
#define VRNA_CMD_PARSE_UD
Command parse/apply flag indicating unstructured domains.
Definition: commands.h:37
#define VRNA_CMD_PARSE_SC
Command parse/apply flag indicating soft constraints.
Definition: commands.h:32
#define VRNA_CMD_PARSE_HC
Command parse/apply flag indicating hard constraints.
Definition: commands.h:27
#define VRNA_CMD_PARSE_SD
Command parse/apply flag indicating structured domains.
Definition: commands.h:42

Command parse/apply flag indicating default set of commands.

See also
vrna_cmd_t, 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 
)

#include <ViennaRNA/commands.h>

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 
)

#include <ViennaRNA/commands.h>

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;
struct vrna_command_s *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 
)

#include <ViennaRNA/commands.h>

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 commands to apply
optionsOptions to limit the type of commands read from the file
Returns
The number of commands successfully applied
void vrna_commands_free ( vrna_cmd_t  commands)

#include <ViennaRNA/commands.h>

Free memory occupied by a list of commands.

Release memory occupied by a list of commands

Parameters
commandsA pointer to a list of commands