Command Files — ViennaRNA Package

# Command Files

  Functions to parse and interpret the content of constraint-formats-file.

  Defines

  VRNA_CMD_PARSE_HC

    Command parse/apply flag indicating hard constraints.

        #include <ViennaRNA/io/commands.h>

    See also

    vrna_cmd_t, vrna_file_commands_read(), vrna_file_commands_apply(), vrna_commands_apply()

  VRNA_CMD_PARSE_SC

    Command parse/apply flag indicating soft constraints.

        #include <ViennaRNA/io/commands.h>

    See also

    vrna_cmd_t, vrna_file_commands_read(), vrna_file_commands_apply(), vrna_commands_apply()

  VRNA_CMD_PARSE_UD

    Command parse/apply flag indicating unstructured domains.

        #include <ViennaRNA/io/commands.h>

    See also

    vrna_cmd_t, vrna_file_commands_read(), vrna_file_commands_apply(), vrna_commands_apply()

  VRNA_CMD_PARSE_SD

    Command parse/apply flag indicating structured domains.

        #include <ViennaRNA/io/commands.h>

    See also

    vrna_cmd_t, vrna_file_commands_read(), vrna_file_commands_apply(), vrna_commands_apply()

  VRNA_CMD_PARSE_DEFAULTS

    Command parse/apply flag indicating default set of commands.

        #include <ViennaRNA/io/commands.h>

    See also

    vrna_cmd_t, vrna_file_commands_read(), vrna_file_commands_apply(), vrna_commands_apply()

  VRNA_CMD_PARSE_SILENT

        #include <ViennaRNA/io/commands.h>

  Typedefs

  typedef struct vrna_command_s *vrna_cmd_t

    A data structure that contains commands.

        #include <ViennaRNA/io/commands.h>

  Functions

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

    Extract a list of commands from a command file.

        #include <ViennaRNA/io/commands.h>

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

    SWIG Wrapper Notes:

      This function is available as global function `file_commands_read()`. See, e.g. `RNA.file_commands_read()` in the Python API .

    See also

    vrna_commands_apply(), vrna_file_commands_apply(), vrna_commands_free()

    Parameters:

      - filename – The filename

      - options – Options 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 *fc, const char *filename, unsigned int options)

    Apply a list of commands from a command file.

        #include <ViennaRNA/io/commands.h>

    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:

    SWIG Wrapper Notes:

      This function is attached as method `file_commands_apply()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.file_commands_apply()` in the Python API .

    Parameters:

      - fc – The vrna_fold_compound_t the command list will be applied to

      - filename – The filename

      - options – Options to limit the type of commands read from the file

    Returns:

      The number of commands successfully applied

  int vrna_commands_apply(vrna_fold_compound_t *fc, vrna_cmd_t commands, unsigned int options)

    Apply a list of commands to a vrna_fold_compound_t.

        #include <ViennaRNA/io/commands.h>

    SWIG Wrapper Notes:

      This function is attached as method `commands_apply()` to objects of type `fold_compound`. See, e.g. `RNA.fold_compound.commands_apply()` in the Python API .

    Parameters:

      - fc – The vrna_fold_compound_t the command list will be applied to

      - commands – The commands to apply

      - options – Options 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)

    Free memory occupied by a list of commands.

        #include <ViennaRNA/io/commands.h>

    Release memory occupied by a list of commands

    Parameters:

      - commands – A pointer to a list of commands