Evaluation of Structures — ViennaRNA Package

# Evaluation of Structures

Several different functions to evaluate the free energy of a full secondary structure under a particular set of parameters and the Nearest Neighbor Energy model are available in RNAlib.

For most of them, two different forms of representations for the secondary structure may be used:

- The Dot-Bracket string

- A pair table representation

Furthermore, the evaluation functions are divided into basic and simplified variants, where basic functions require the use of a `vrna_fold_compound_t` data structure holding the sequence string, and model configuration (settings and parameters).

The simplified functions, on the other hand, provide often used default model settings that may be called directly with only sequence and structure data.

Finally, verbose variants exist for some functions that allow one to print the (individual) free energy contributions to some `FILE` stream.

  Basic Energy Evaluation Interface with Dot-Bracket Structure String

  float vrna_eval_structure(vrna_fold_compound_t *fc, const char *structure)

    Calculate the free energy of an already folded RNA.

        #include <ViennaRNA/eval/structures.h>

    This function allows for energy evaluation of a given pair of structure and sequence (alignment). Model details, energy parameters, and possibly soft constraints are used as provided via the parameter ‘fc’. The vrna_fold_compound_t does not need to contain any DP matrices, but requires all most basic init values as one would get from a call like this:

        fc = vrna_fold_compound(sequence, NULL, VRNA_OPTION_EVAL_ONLY);

    SWIG Wrapper Notes:

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

    See also

    vrna_eval_structure_pt(), vrna_eval_structure_verbose(), vrna_eval_structure_pt_verbose(), vrna_fold_compound(), vrna_fold_compound_comparative(), vrna_eval_covar_structure()

    Note

    Accepts vrna_fold_compound_t of type VRNA_FC_TYPE_SINGLE and VRNA_FC_TYPE_COMPARATIVE

    Parameters:

      - fc – A vrna_fold_compound_t containing the energy parameters and model details

      - structure – Secondary structure in dot-bracket notation

    Returns:

      The free energy of the input structure given the input sequence in kcal/mol

  float vrna_eval_covar_structure(vrna_fold_compound_t *fc, const char *structure)

    Calculate the pseudo energy derived by the covariance scores of a set of aligned sequences.

        #include <ViennaRNA/eval/structures.h>

    Consensus structure prediction is driven by covariance scores of base pairs in rows of the provided alignment. This function allows one to retrieve the total amount of this covariance pseudo energy scores. The vrna_fold_compound_t does not need to contain any DP matrices, but requires all most basic init values as one would get from a call like this:

        fc = vrna_fold_compound_comparative(alignment, NULL, VRNA_OPTION_EVAL_ONLY);

    SWIG Wrapper Notes:

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

    See also

    vrna_fold_compound_comparative(), vrna_eval_structure()

    Note

    Accepts vrna_fold_compound_t of type VRNA_FC_TYPE_COMPARATIVE only!

    Parameters:

      - fc – A vrna_fold_compound_t containing the energy parameters and model details

      - structure – Secondary (consensus) structure in dot-bracket notation

    Returns:

      The covariance pseudo energy score of the input structure given the input sequence alignment in kcal/mol

  float vrna_eval_structure_verbose(vrna_fold_compound_t *fc, const char *structure, FILE *file)

    Calculate the free energy of an already folded RNA and print contributions on a per-loop base.

        #include <ViennaRNA/eval/structures.h>

    This function is a simplyfied version of vrna_eval_structure_v() that uses the default verbosity level.

    SWIG Wrapper Notes:

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

    See also

    vrna_eval_structure_pt(), vrna_eval_structure_verbose(), vrna_eval_structure_pt_verbose(),

    Parameters:

      - fc – A vrna_fold_compound_t containing the energy parameters and model details

      - structure – Secondary structure in dot-bracket notation

      - file – A file handle where this function should print to (may be NULL).

    Returns:

      The free energy of the input structure given the input sequence in kcal/mol

  float vrna_eval_structure_v(vrna_fold_compound_t *fc, const char *structure, int verbosity_level, FILE *file)

    Calculate the free energy of an already folded RNA and print contributions on a per-loop base.

        #include <ViennaRNA/eval/structures.h>

    This function allows for detailed energy evaluation of a given sequence/structure pair. In contrast to vrna_eval_structure() this function prints detailed energy contributions based on individual loops to a file handle. If NULL is passed as file handle, this function defaults to print to stdout. Any positive `verbosity_level` activates potential warning message of the energy evaluting functions, while values \( \ge 1 \) allow for detailed control of what data is printed. A negative parameter `verbosity_level` turns off printing all together.

    Model details, energy parameters, and possibly soft constraints are used as provided via the parameter ‘fc’. The fold_compound does not need to contain any DP matrices, but all the most basic init values as one would get from a call like this:

        fc = vrna_fold_compound(sequence, NULL, VRNA_OPTION_EVAL_ONLY);

    See also

    vrna_eval_structure_pt(), vrna_eval_structure_verbose(), vrna_eval_structure_pt_verbose(),

    Parameters:

      - fc – A vrna_fold_compound_t containing the energy parameters and model details

      - structure – Secondary structure in dot-bracket notation

      - verbosity_level – The level of verbosity of this function

      - file – A file handle where this function should print to (may be NULL).

    Returns:

      The free energy of the input structure given the input sequence in kcal/mol

  float vrna_eval_structure_cstr(vrna_fold_compound_t *fc, const char *structure, int verbosity_level, vrna_cstr_t output_stream)

        #include <ViennaRNA/eval/structures.h>

  Basic Energy Evaluation Interface with Structure Pair Table

  int vrna_eval_structure_pt(vrna_fold_compound_t *fc, const short *pt)

    Calculate the free energy of an already folded RNA.

        #include <ViennaRNA/eval/structures.h>

    This function allows for energy evaluation of a given sequence/structure pair where the structure is provided in pair_table format as obtained from vrna_ptable(). Model details, energy parameters, and possibly soft constraints are used as provided via the parameter ‘fc’. The fold_compound does not need to contain any DP matrices, but all the most basic init values as one would get from a call like this:

        fc = vrna_fold_compound(sequence, NULL, VRNA_OPTION_EVAL_ONLY);

    SWIG Wrapper Notes:

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

    See also

    vrna_ptable(), vrna_eval_structure(), vrna_eval_structure_pt_verbose()

    Parameters:

      - fc – A vrna_fold_compound_t containing the energy parameters and model details

      - pt – Secondary structure as pair_table

    Returns:

      The free energy of the input structure given the input sequence in 10cal/mol

  int vrna_eval_structure_pt_verbose(vrna_fold_compound_t *fc, const short *pt, FILE *file)

    Calculate the free energy of an already folded RNA.

        #include <ViennaRNA/eval/structures.h>

    This function is a simplyfied version of vrna_eval_structure_simple_v() that uses the default verbosity level.

    SWIG Wrapper Notes:

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

    See also

    vrna_eval_structure_pt_v(), vrna_ptable(), vrna_eval_structure_pt(), vrna_eval_structure_verbose()

    Parameters:

      - fc – A vrna_fold_compound_t containing the energy parameters and model details

      - pt – Secondary structure as pair_table

      - file – A file handle where this function should print to (may be NULL).

    Returns:

      The free energy of the input structure given the input sequence in 10cal/mol

  int vrna_eval_structure_pt_v(vrna_fold_compound_t *fc, const short *pt, int verbosity_level, FILE *file)

    Calculate the free energy of an already folded RNA.

        #include <ViennaRNA/eval/structures.h>

    This function allows for energy evaluation of a given sequence/structure pair where the structure is provided in pair_table format as obtained from vrna_ptable(). Model details, energy parameters, and possibly soft constraints are used as provided via the parameter ‘fc’. The fold_compound does not need to contain any DP matrices, but all the most basic init values as one would get from a call like this:

        fc = vrna_fold_compound(sequence, NULL, VRNA_OPTION_EVAL_ONLY);

    In contrast to vrna_eval_structure_pt() this function prints detailed energy contributions based on individual loops to a file handle. If NULL is passed as file handle, this function defaults to print to stdout. Any positive `verbosity_level` activates potential warning message of the energy evaluting functions, while values \( \ge 1 \) allow for detailed control of what data is printed. A negative parameter `verbosity_level` turns off printing all together.

    See also

    vrna_ptable(), vrna_eval_structure_pt(), vrna_eval_structure_verbose()

    Parameters:

      - fc – A vrna_fold_compound_t containing the energy parameters and model details

      - pt – Secondary structure as pair_table

      - verbosity_level – The level of verbosity of this function

      - file – A file handle where this function should print to (may be NULL).

    Returns:

      The free energy of the input structure given the input sequence in 10cal/mol

  Simplified Energy Evaluation with Sequence and Dot-Bracket Strings

  float vrna_eval_structure_simple(const char *string, const char *structure)

    Calculate the free energy of an already folded RNA.

        #include <ViennaRNA/eval/structures.h>

    This function allows for energy evaluation of a given sequence/structure pair. In contrast to vrna_eval_structure() this function assumes default model details and default energy parameters in order to evaluate the free energy of the secondary structure. Therefore, it serves as a simple interface function for energy evaluation for situations where no changes on the energy model are required.

    SWIG Wrapper Notes:

      In the target scripting language, this function serves as a wrapper for vrna_eval_structure_simple_v() and, thus, allows for two additional, optional arguments, the verbosity level and a file handle which default to VRNA_VERBOSITY_QUIET and `NULL`, respectively.. See, e.g. `RNA.eval_structure_simple()` in the Python API .

    See also

    vrna_eval_structure(), vrna_eval_structure_pt(), vrna_eval_structure_verbose(), vrna_eval_structure_pt_verbose(),

    Parameters:

      - string – RNA sequence in uppercase letters

      - structure – Secondary structure in dot-bracket notation

    Returns:

      The free energy of the input structure given the input sequence in kcal/mol

  float vrna_eval_circ_structure(const char *string, const char *structure)

    Evaluate the free energy of a sequence/structure pair where the sequence is circular.

        #include <ViennaRNA/eval/structures.h>

    SWIG Wrapper Notes:

      In the target scripting language, this function serves as a wrapper for vrna_eval_circ_structure_v() and, thus, allows for two additional, optional arguments, the verbosity level and a file handle which default to VRNA_VERBOSITY_QUIET and `NULL`, respectively.. See, e.g. `RNA.eval_circ_structure()` in the Python API .

    See also

    vrna_eval_structure_simple(), vrna_eval_gquad_structure(), vrna_eval_circ_consensus_structure(), vrna_eval_circ_structure_v(), vrna_eval_structure()

    Parameters:

      - string – RNA sequence in uppercase letters

      - structure – Secondary structure in dot-bracket notation

    Returns:

      The free energy of the structure given the circular input sequence in kcal/mol

  float vrna_eval_gquad_structure(const char *string, const char *structure)

    Evaluate the free energy of a sequence/structure pair where the structure may contain G-Quadruplexes.

        #include <ViennaRNA/eval/structures.h>

    G-Quadruplexes are annotated as plus signs (‘+’) for each G involved in the motif. Linker sequences must be denoted by dots (‘.’) as they are considered unpaired. Below is an example of a 2-layer G-quadruplex:

        GGAAGGAAAGGAGG
        ++..++...++.++

    SWIG Wrapper Notes:

      In the target scripting language, this function serves as a wrapper for vrna_eval_gquad_structure_v() and, thus, allows for two additional, optional arguments, the verbosity level and a file handle which default to VRNA_VERBOSITY_QUIET and `NULL`, respectively.. See, e.g. `RNA.eval_gquad_structure()` in the Python API .

    See also

    vrna_eval_structure_simple(), vrna_eval_circ_structure(), vrna_eval_gquad_consensus_structure(), vrna_eval_gquad_structure_v(), vrna_eval_structure()

    Parameters:

      - string – RNA sequence in uppercase letters

      - structure – Secondary structure in dot-bracket notation

    Returns:

      The free energy of the structure including contributions of G-quadruplexes in kcal/mol

  float vrna_eval_circ_gquad_structure(const char *string, const char *structure)

    Evaluate the free energy of a sequence/structure pair where the sequence is circular and the structure may contain G-Quadruplexes.

        #include <ViennaRNA/eval/structures.h>

    G-Quadruplexes are annotated as plus signs (‘+’) for each G involved in the motif. Linker sequences must be denoted by dots (‘.’) as they are considered unpaired. Below is an example of a 2-layer G-quadruplex:

        GGAAGGAAAGGAGG
        ++..++...++.++

    SWIG Wrapper Notes:

      In the target scripting language, this function serves as a wrapper for vrna_eval_circ_gquad_structure_v() and, thus, allows for two additional, optional arguments, the verbosity level and a file handle which default to VRNA_VERBOSITY_QUIET and `NULL`, respectively.. See, e.g. `RNA.eval_circ_gquad_structure()` in the Python API .

    See also

    vrna_eval_structure_simple(), vrna_eval_circ_gquad_consensus_structure(), vrna_eval_circ_gquad_structure_v(), vrna_eval_structure()

    Parameters:

      - string – RNA sequence in uppercase letters

      - structure – Secondary structure in dot-bracket notation

    Returns:

      The free energy of the structure including contributions of G-quadruplexes in kcal/mol

  float vrna_eval_structure_simple_verbose(const char *string, const char *structure, FILE *file)

    Calculate the free energy of an already folded RNA and print contributions per loop.

        #include <ViennaRNA/eval/structures.h>

    This function is a simplyfied version of vrna_eval_structure_simple_v() that uses the default verbosity level.

    See also

    vrna_eval_structure_simple_v(), vrna_eval_structure_verbose(), vrna_eval_structure_pt(), vrna_eval_structure_verbose(), vrna_eval_structure_pt_verbose()

    Parameters:

      - string – RNA sequence in uppercase letters

      - structure – Secondary structure in dot-bracket notation

      - file – A file handle where this function should print to (may be NULL).

    Returns:

      The free energy of the input structure given the input sequence in kcal/mol

  float vrna_eval_structure_simple_v(const char *string, const char *structure, int verbosity_level, FILE *file)

    Calculate the free energy of an already folded RNA and print contributions per loop.

        #include <ViennaRNA/eval/structures.h>

    This function allows for detailed energy evaluation of a given sequence/structure pair. In contrast to vrna_eval_structure() this function prints detailed energy contributions based on individual loops to a file handle. If NULL is passed as file handle, this function defaults to print to stdout. Any positive `verbosity_level` activates potential warning message of the energy evaluting functions, while values \( \ge 1 \) allow for detailed control of what data is printed. A negative parameter `verbosity_level` turns off printing all together.

    In contrast to vrna_eval_structure_verbose() this function assumes default model details and default energy parameters in order to evaluate the free energy of the secondary structure. Threefore, it serves as a simple interface function for energy evaluation for situations where no changes on the energy model are required.

    SWIG Wrapper Notes:

      This function is available through an overloaded version of vrna_eval_structure_simple(). The last two arguments for this function are optional and default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_structure_simple()` in the Python API .

    See also

    vrna_eval_structure_verbose(), vrna_eval_structure_pt(), vrna_eval_structure_pt_verbose(),

    Parameters:

      - string – RNA sequence in uppercase letters

      - structure – Secondary structure in dot-bracket notation

      - verbosity_level – The level of verbosity of this function

      - file – A file handle where this function should print to (may be NULL).

    Returns:

      The free energy of the input structure given the input sequence in kcal/mol

  float vrna_eval_circ_structure_v(const char *string, const char *structure, int verbosity_level, FILE *file)

    Evaluate free energy of a sequence/structure pair, assume sequence to be circular and print contributions per loop.

        #include <ViennaRNA/eval/structures.h>

    This function is the same as vrna_eval_structure_simple_v() but assumes the input sequence to be circularized.

    SWIG Wrapper Notes:

      This function is available through an overloaded version of vrna_eval_circ_structure(). The last two arguments for this function are optional and default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_circ_structure()` in the Python API .

    See also

    vrna_eval_structure_simple_v(), vrna_eval_circ_structure(), vrna_eval_structure_verbose()

    Parameters:

      - string – RNA sequence in uppercase letters

      - structure – Secondary structure in dot-bracket notation

      - verbosity_level – The level of verbosity of this function

      - file – A file handle where this function should print to (may be NULL).

    Returns:

      The free energy of the input structure given the input sequence in kcal/mol

  float vrna_eval_gquad_structure_v(const char *string, const char *structure, int verbosity_level, FILE *file)

    Evaluate free energy of a sequence/structure pair, allow for G-Quadruplexes in the structure and print contributions per loop.

        #include <ViennaRNA/eval/structures.h>

    This function is the same as vrna_eval_structure_simple_v() but allows for annotated G-Quadruplexes in the dot-bracket structure input.

    G-Quadruplexes are annotated as plus signs (‘+’) for each G involved in the motif. Linker sequences must be denoted by dots (‘.’) as they are considered unpaired. Below is an example of a 2-layer G-quadruplex:

        GGAAGGAAAGGAGG
        ++..++...++.++

    SWIG Wrapper Notes:

      This function is available through an overloaded version of vrna_eval_gquad_structure(). The last two arguments for this function are optional and default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_gquad_structure()` in the Python API .

    See also

    vrna_eval_structure_simple_v(), vrna_eval_gquad_structure(), vrna_eval_structure_verbose()

    Parameters:

      - string – RNA sequence in uppercase letters

      - structure – Secondary structure in dot-bracket notation

      - verbosity_level – The level of verbosity of this function

      - file – A file handle where this function should print to (may be NULL).

    Returns:

      The free energy of the input structure given the input sequence in kcal/mol

  float vrna_eval_circ_gquad_structure_v(const char *string, const char *structure, int verbosity_level, FILE *file)

    Evaluate free energy of a sequence/structure pair, assume sequence to be circular, allow for G-Quadruplexes in the structure, and print contributions per loop.

        #include <ViennaRNA/eval/structures.h>

    This function is the same as vrna_eval_structure_simple_v() but assumes the input sequence to be circular and allows for annotated G-Quadruplexes in the dot-bracket structure input.

    G-Quadruplexes are annotated as plus signs (‘+’) for each G involved in the motif. Linker sequences must be denoted by dots (‘.’) as they are considered unpaired. Below is an example of a 2-layer G-quadruplex:

        GGAAGGAAAGGAGG
        ++..++...++.++

    SWIG Wrapper Notes:

      This function is available through an overloaded version of vrna_eval_circ_gquad_structure(). The last two arguments for this function are optional and default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_circ_gquad_structure()` in the Python API .

    Parameters:

      - string – RNA sequence in uppercase letters

      - structure – Secondary structure in dot-bracket notation

      - verbosity_level – The level of verbosity of this function

      - file – A file handle where this function should print to (may be NULL).

    Returns:

      The free energy of the input structure given the input sequence in kcal/mol

  Simplified Energy Evaluation with Sequence Alignments and Consensus Structure Dot-Bracket String

  float vrna_eval_consensus_structure_simple(const char **alignment, const char *structure)

    Calculate the free energy of an already folded RNA sequence alignment.

        #include <ViennaRNA/eval/structures.h>

    This function allows for energy evaluation for a given multiple sequence alignment and consensus structure pair. In contrast to vrna_eval_structure() this function assumes default model details and default energy parameters in order to evaluate the free energy of the secondary structure. Therefore, it serves as a simple interface function for energy evaluation for situations where no changes on the energy model are required.

    SWIG Wrapper Notes:

      This function is available through an overloadeded version of vrna_eval_structure_simple(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. See, e.g. `RNA.eval_structure_simple()` in the Python API .

    See also

    vrna_eval_covar_structure(), vrna_eval_structure(), vrna_eval_structure_pt(), vrna_eval_structure_verbose(), vrna_eval_structure_pt_verbose()

    Note

    The free energy returned from this function already includes the covariation pseudo energies that is used fir comparative structure prediction within this library.

    Parameters:

      - alignment – RNA sequence alignment in uppercase letters and hyphen (‘-’) to denote gaps

      - structure – Consensus Secondary structure in dot-bracket notation

    Returns:

      The free energy of the consensus structure given the input alignment in kcal/mol

  float vrna_eval_circ_consensus_structure(const char **alignment, const char *structure)

    Evaluate the free energy of a multiple sequence alignment/consensus structure pair where the sequences are circular.

        #include <ViennaRNA/eval/structures.h>

    SWIG Wrapper Notes:

      This function is available through an overloadeded version of vrna_eval_circ_structure(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. See, e.g. `RNA.eval_circ_structure()` in the Python API .

    See also

    vrna_eval_covar_structure(), vrna_eval_consensus_structure_simple(), vrna_eval_gquad_consensus_structure(), vrna_eval_circ_structure(), vrna_eval_circ_consensus_structure_v(), vrna_eval_structure()

    Note

    The free energy returned from this function already includes the covariation pseudo energies that is used fir comparative structure prediction within this library.

    Parameters:

      - alignment – RNA sequence alignment in uppercase letters

      - structure – Consensus secondary structure in dot-bracket notation

    Returns:

      The free energy of the consensus structure given the circular input sequence in kcal/mol

  float vrna_eval_gquad_consensus_structure(const char **alignment, const char *structure)

    Evaluate the free energy of a multiple sequence alignment/consensus structure pair where the structure may contain G-Quadruplexes.

        #include <ViennaRNA/eval/structures.h>

    G-Quadruplexes are annotated as plus signs (‘+’) for each G involved in the motif. Linker sequences must be denoted by dots (‘.’) as they are considered unpaired. Below is an example of a 2-layer G-quadruplex:

        GGAAGGAAAGGAGG
        ++..++...++.++

    SWIG Wrapper Notes:

      This function is available through an overloadeded version of vrna_eval_gquad_structure(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. See, e.g. `RNA.eval_gquad_structure()` in the Python API .

    See also

    vrna_eval_covar_structure(), vrna_eval_consensus_structure_simple(), vrna_eval_circ_consensus_structure(), vrna_eval_gquad_structure(), vrna_eval_gquad_consensus_structure_v(), vrna_eval_structure()

    Note

    The free energy returned from this function already includes the covariation pseudo energies that is used fir comparative structure prediction within this library.

    Parameters:

      - alignment – RNA sequence alignment in uppercase letters

      - structure – Consensus secondary structure in dot-bracket notation

    Returns:

      The free energy of the consensus structure including contributions of G-quadruplexes in kcal/mol

  float vrna_eval_circ_gquad_consensus_structure(const char **alignment, const char *structure)

    Evaluate the free energy of a multiple sequence alignment/consensus structure pair where the sequence is circular and the structure may contain G-Quadruplexes.

        #include <ViennaRNA/eval/structures.h>

    G-Quadruplexes are annotated as plus signs (‘+’) for each G involved in the motif. Linker sequences must be denoted by dots (‘.’) as they are considered unpaired. Below is an example of a 2-layer G-quadruplex:

        GGAAGGAAAGGAGG
        ++..++...++.++

    SWIG Wrapper Notes:

      This function is available through an overloadeded version of vrna_eval_circ_gquad_structure(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. See, e.g. `RNA.eval_circ_gquad_structure()` in the Python API .

    See also

    vrna_eval_covar_structure(), vrna_eval_consensus_structure_simple(), vrna_eval_circ_consensus_structure(), vrna_eval_gquad_structure(), vrna_eval_circ_gquad_consensus_structure_v(), vrna_eval_structure()

    Note

    The free energy returned from this function already includes the covariation pseudo energies that is used fir comparative structure prediction within this library.

    Parameters:

      - alignment – RNA sequence alignment in uppercase letters

      - structure – Consensus secondary structure in dot-bracket notation

    Returns:

      The free energy of the consensus structure including contributions of G-quadruplexes in kcal/mol

  float vrna_eval_consensus_structure_simple_verbose(const char **alignment, const char *structure, FILE *file)

    Evaluate the free energy of a consensus structure for an RNA sequence alignment and print contributions per loop.

        #include <ViennaRNA/eval/structures.h>

    This function is a simplyfied version of vrna_eval_consensus_structure_simple_v() that uses the default verbosity level.

    See also

    vrna_eval_consensus_structure_simple_v(), vrna_eval_structure_verbose(), vrna_eval_structure_pt(), vrna_eval_structure_pt_verbose()

    Note

    The free energy returned from this function already includes the covariation pseudo energies that is used fir comparative structure prediction within this library.

    Parameters:

      - alignment – RNA sequence alignment in uppercase letters. Gaps are denoted by hyphens (‘-’)

      - structure – Consensus secondary structure in dot-bracket notation

      - file – A file handle where this function should print to (may be NULL).

    Returns:

      The free energy of the conensus structure given the aligned input sequences in kcal/mol

  float vrna_eval_consensus_structure_simple_v(const char **alignment, const char *structure, int verbosity_level, FILE *file)

    Evaluate the free energy of a consensus structure for an RNA sequence alignment and print contributions per loop.

        #include <ViennaRNA/eval/structures.h>

    This function allows for detailed energy evaluation of a given sequence alignment/consensus structure pair. In contrast to vrna_eval_consensus_structure_simple() this function prints detailed energy contributions based on individual loops to a file handle. If NULL is passed as file handle, this function defaults to print to stdout. Any positive `verbosity_level` activates potential warning message of the energy evaluting functions, while values \( \ge 1 \) allow for detailed control of what data is printed. A negative parameter `verbosity_level` turns off printing all together.

    SWIG Wrapper Notes:

      This function is available through an overloaded version of vrna_eval_structure_simple(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. The last two arguments are optional and default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_structure_simple()` in the Python API .

    See also

    vrna_eval_consensus_structure(), vrna_eval_structure()

    Note

    The free energy returned from this function already includes the covariation pseudo energies that is used fir comparative structure prediction within this library.

    Parameters:

      - alignment – RNA sequence alignment in uppercase letters. Gaps are denoted by hyphens (‘-’)

      - structure – Consensus secondary structure in dot-bracket notation

      - verbosity_level – The level of verbosity of this function

      - file – A file handle where this function should print to (may be NULL).

    Returns:

      The free energy of the consensus structure given the sequence alignment in kcal/mol

  float vrna_eval_circ_consensus_structure_v(const char **alignment, const char *structure, int verbosity_level, FILE *file)

    Evaluate the free energy of a consensus structure for an alignment of circular RNA sequences and print contributions per loop.

        #include <ViennaRNA/eval/structures.h>

    This function is identical with vrna_eval_consensus_structure_simple_v() but assumed the aligned sequences to be circular.

    SWIG Wrapper Notes:

      This function is available through an overloaded version of vrna_eval_circ_structure(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. The last two arguments are optional and default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_circ_structure()` in the Python API .

    See also

    vrna_eval_consensus_structure_simple_v(), vrna_eval_circ_consensus_structure(), vrna_eval_structure()

    Note

    The free energy returned from this function already includes the covariation pseudo energies that is used fir comparative structure prediction within this library.

    Parameters:

      - alignment – RNA sequence alignment in uppercase letters. Gaps are denoted by hyphens (‘-’)

      - structure – Consensus secondary structure in dot-bracket notation

      - verbosity_level – The level of verbosity of this function

      - file – A file handle where this function should print to (may be NULL).

    Returns:

      The free energy of the consensus structure given the sequence alignment in kcal/mol

  float vrna_eval_gquad_consensus_structure_v(const char **alignment, const char *structure, int verbosity_level, FILE *file)

    Evaluate the free energy of a consensus structure for an RNA sequence alignment, allow for annotated G-Quadruplexes in the structure and print contributions per loop.

        #include <ViennaRNA/eval/structures.h>

    This function is identical with vrna_eval_consensus_structure_simple_v() but allows for annotated G-Quadruplexes in the consensus structure.

    G-Quadruplexes are annotated as plus signs (‘+’) for each G involved in the motif. Linker sequences must be denoted by dots (‘.’) as they are considered unpaired. Below is an example of a 2-layer G-quadruplex:

        GGAAGGAAAGGAGG
        ++..++...++.++

    SWIG Wrapper Notes:

      This function is available through an overloaded version of vrna_eval_gquad_structure(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. The last two arguments are optional and default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_gquad_structure()` in the Python API .

    See also

    vrna_eval_consensus_structure_simple_v(), vrna_eval_gquad_consensus_structure(), vrna_eval_structure()

    Note

    The free energy returned from this function already includes the covariation pseudo energies that is used fir comparative structure prediction within this library.

    Parameters:

      - alignment – RNA sequence alignment in uppercase letters. Gaps are denoted by hyphens (‘-’)

      - structure – Consensus secondary structure in dot-bracket notation

      - verbosity_level – The level of verbosity of this function

      - file – A file handle where this function should print to (may be NULL).

    Returns:

      The free energy of the consensus structure given the sequence alignment in kcal/mol

  float vrna_eval_circ_gquad_consensus_structure_v(const char **alignment, const char *structure, int verbosity_level, FILE *file)

    Evaluate the free energy of a consensus structure for an alignment of circular RNA sequences, allow for annotated G-Quadruplexes in the structure and print contributions per loop.

        #include <ViennaRNA/eval/structures.h>

    This function is identical with vrna_eval_consensus_structure_simple_v() but assumes the sequences in the alignment to be circular and allows for annotated G-Quadruplexes in the consensus structure.

    G-Quadruplexes are annotated as plus signs (‘+’) for each G involved in the motif. Linker sequences must be denoted by dots (‘.’) as they are considered unpaired. Below is an example of a 2-layer G-quadruplex:

        GGAAGGAAAGGAGG
        ++..++...++.++

    SWIG Wrapper Notes:

      This function is available through an overloaded version of vrna_eval_circ_gquad_structure(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. The last two arguments are optional and default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_circ_gquad_structure()` in the Python API .

    See also

    vrna_eval_consensus_structure_simple_v(), vrna_eval_circ_gquad_consensus_structure(), vrna_eval_structure()

    Note

    The free energy returned from this function already includes the covariation pseudo energies that is used fir comparative structure prediction within this library.

    Parameters:

      - alignment – RNA sequence alignment in uppercase letters. Gaps are denoted by hyphens (‘-’)

      - structure – Consensus secondary structure in dot-bracket notation

      - verbosity_level – The level of verbosity of this function

      - file – A file handle where this function should print to (may be NULL).

    Returns:

      The free energy of the consensus structure given the sequence alignment in kcal/mol

  Simplified Energy Evaluation with Sequence String and Structure Pair Table

  int vrna_eval_structure_pt_simple(const char *string, const short *pt)

    Calculate the free energy of an already folded RNA.

        #include <ViennaRNA/eval/structures.h>

    In contrast to vrna_eval_structure_pt() this function assumes default model details and default energy parameters in order to evaluate the free energy of the secondary structure. Threefore, it serves as a simple interface function for energy evaluation for situations where no changes on the energy model are required.

    SWIG Wrapper Notes:

      In the target scripting language, this function serves as a wrapper for vrna_eval_structure_pt_v() and, thus, allows for two additional, optional arguments, the verbosity level and a file handle which default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_structure_pt_simple()` in the Python API .

    See also

    vrna_ptable(), vrna_eval_structure_simple(), vrna_eval_structure_pt()

    Parameters:

      - string – RNA sequence in uppercase letters

      - pt – Secondary structure as pair_table

    Returns:

      The free energy of the input structure given the input sequence in 10cal/mol

  int vrna_eval_structure_pt_simple_verbose(const char *string, const short *pt, FILE *file)

    Calculate the free energy of an already folded RNA.

        #include <ViennaRNA/eval/structures.h>

    This function is a simplyfied version of vrna_eval_structure_pt_simple_v() that uses the default verbosity level.

    See also

    vrna_eval_structure_pt_simple_v(), vrna_ptable(), vrna_eval_structure_pt_verbose(), vrna_eval_structure_simple()

    Parameters:

      - string – RNA sequence in uppercase letters

      - pt – Secondary structure as pair_table

      - file – A file handle where this function should print to (may be NULL).

    Returns:

      The free energy of the input structure given the input sequence in 10cal/mol

  int vrna_eval_structure_pt_simple_v(const char *string, const short *pt, int verbosity_level, FILE *file)

    Calculate the free energy of an already folded RNA.

        #include <ViennaRNA/eval/structures.h>

    This function allows for energy evaluation of a given sequence/structure pair where the structure is provided in pair_table format as obtained from vrna_ptable(). Model details, energy parameters, and possibly soft constraints are used as provided via the parameter ‘fc’. The fold_compound does not need to contain any DP matrices, but all the most basic init values as one would get from a call like this:

        fc = vrna_fold_compound(sequence, NULL, VRNA_OPTION_EVAL_ONLY);

    In contrast to vrna_eval_structure_pt_verbose() this function assumes default model details and default energy parameters in order to evaluate the free energy of the secondary structure. Threefore, it serves as a simple interface function for energy evaluation for situations where no changes on the energy model are required.

    See also

    vrna_ptable(), vrna_eval_structure_pt_v(), vrna_eval_structure_simple()

    Parameters:

      - string – RNA sequence in uppercase letters

      - pt – Secondary structure as pair_table

      - verbosity_level – The level of verbosity of this function

      - file – A file handle where this function should print to (may be NULL).

    Returns:

      The free energy of the input structure given the input sequence in 10cal/mol

  Simplified Energy Evaluation with Sequence Alignment and Consensus Structure Pair Table

  int vrna_eval_consensus_structure_pt_simple(const char **alignment, const short *pt)

    Evaluate the Free Energy of a Consensus Secondary Structure given a Sequence Alignment.

        #include <ViennaRNA/eval/structures.h>

    SWIG Wrapper Notes:

      This function is available through an overloadeded version of vrna_eval_structure_pt_simple(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. See, e.g. `RNA.eval_structure_pt_simple()` in the Python API .

    See also

    vrna_eval_consensus_structure_simple(), vrna_eval_structure_pt(), vrna_eval_structure(), vrna_eval_covar_structure()

    Note

    The free energy returned from this function already includes the covariation pseudo energies that is used fir comparative structure prediction within this library.

    Parameters:

      - alignment – RNA sequence alignment in uppercase letters. Gaps are denoted by hyphens (‘-’)

      - pt – Secondary structure in pair table format

    Returns:

      Free energy of the consensus structure in 10cal/mol

  int vrna_eval_consensus_structure_pt_simple_verbose(const char **alignment, const short *pt, FILE *file)

        #include <ViennaRNA/eval/structures.h>

  int vrna_eval_consensus_structure_pt_simple_v(const char **alignment, const short *pt, int verbosity_level, FILE *file)

        #include <ViennaRNA/eval/structures.h>

    SWIG Wrapper Notes:

      This function is available through an overloaded version of vrna_eval_structure_pt_simple(). Simply pass a sequence alignment as list of strings (including gaps) as first, and the consensus structure as second argument. The last two arguments are optional and default to VRNA_VERBOSITY_QUIET and `NULL`, respectively. See, e.g. `RNA.eval_structure_pt_simple()` in the Python API .

  Defines

  VRNA_VERBOSITY_QUIET

    Quiet level verbosity setting.

        #include <ViennaRNA/eval/basic.h>

  VRNA_VERBOSITY_DEFAULT

    Default level verbosity setting.

        #include <ViennaRNA/eval/basic.h>

  VRNA_EVAL_LOOP_DEFAULT

    Default options for loop evaluation.

        #include <ViennaRNA/eval/basic.h>

  VRNA_EVAL_LOOP_NO_HC

    Do not acknowledge hard constraints in loop evaluation.

        #include <ViennaRNA/eval/basic.h>

  VRNA_EVAL_LOOP_NO_SC

    Do not acknowledge soft constraints in loop evaluation.

        #include <ViennaRNA/eval/basic.h>

  VRNA_EVAL_LOOP_NO_CONSTRAINTS

    Do not acknowledge any constraints in loop evaluation.

        #include <ViennaRNA/eval/basic.h>