1 #ifndef __VIENNA_RNA_PACKAGE_CONVERT_EPARS_H__
2 #define __VIENNA_RNA_PACKAGE_CONVERT_EPARS_H__
5 * \addtogroup energy_parameters_convert
6 * \brief Convert energy parameter files into the latest format
8 * To preserve some backward compatibility the RNAlib also provides
9 * functions to convert energy parameter files from the format used
10 * in version 1.4-1.8 into the new format used since version 2.0
13 * \file convert_epars.h
14 * \brief Functions and definitions for energy parameter file format conversion
17 /** Flag to indicate printing of a complete parameter set */
18 #define VRNA_CONVERT_OUTPUT_ALL 1U
19 /** Flag to indicate printing of hairpin contributions */
20 #define VRNA_CONVERT_OUTPUT_HP 2U
21 /** Flag to indicate printing of base pair stack contributions */
22 #define VRNA_CONVERT_OUTPUT_STACK 4U
23 /** Flag to indicate printing of hairpin mismatch contribution */
24 #define VRNA_CONVERT_OUTPUT_MM_HP 8U
25 /** Flag to indicate printing of interior loop mismatch contribution */
26 #define VRNA_CONVERT_OUTPUT_MM_INT 16U
27 /** Flag to indicate printing of 1:n interior loop mismatch contribution */
28 #define VRNA_CONVERT_OUTPUT_MM_INT_1N 32U
29 /** Flag to indicate printing of 2:3 interior loop mismatch contribution */
30 #define VRNA_CONVERT_OUTPUT_MM_INT_23 64U
31 /** Flag to indicate printing of multi loop mismatch contribution */
32 #define VRNA_CONVERT_OUTPUT_MM_MULTI 128U
33 /** Flag to indicate printing of exterior loop mismatch contribution */
34 #define VRNA_CONVERT_OUTPUT_MM_EXT 256U
35 /** Flag to indicate printing of 5' dangle conctribution */
36 #define VRNA_CONVERT_OUTPUT_DANGLE5 512U
37 /** Flag to indicate printing of 3' dangle contribution */
38 #define VRNA_CONVERT_OUTPUT_DANGLE3 1024U
39 /** Flag to indicate printing of 1:1 interior loop contribution */
40 #define VRNA_CONVERT_OUTPUT_INT_11 2048U
41 /** Flag to indicate printing of 2:1 interior loop contribution */
42 #define VRNA_CONVERT_OUTPUT_INT_21 4096U
43 /** Flag to indicate printing of 2:2 interior loop contribution */
44 #define VRNA_CONVERT_OUTPUT_INT_22 8192U
45 /** Flag to indicate printing of bulge loop contribution */
46 #define VRNA_CONVERT_OUTPUT_BULGE 16384U
47 /** Flag to indicate printing of interior loop contribution */
48 #define VRNA_CONVERT_OUTPUT_INT 32768U
49 /** Flag to indicate printing of multi loop contribution */
50 #define VRNA_CONVERT_OUTPUT_ML 65536U
51 /** Flag to indicate printing of misc contributions (such as terminalAU) */
52 #define VRNA_CONVERT_OUTPUT_MISC 131072U
53 /** Flag to indicate printing of special hairpin contributions (tri-, tetra-, hexa-loops) */
54 #define VRNA_CONVERT_OUTPUT_SPECIAL_HP 262144U
55 /** Flag to indicate printing of given parameters only\n\note This option overrides all other output options, except #VRNA_CONVERT_OUTPUT_DUMP ! */
56 #define VRNA_CONVERT_OUTPUT_VANILLA 524288U
57 /** Flag to indicate printing of interior loop asymmetry contribution */
58 #define VRNA_CONVERT_OUTPUT_NINIO 1048576U
59 /** Flag to indicate dumping the energy contributions from the library instead of an input file */
60 #define VRNA_CONVERT_OUTPUT_DUMP 2097152U
63 * Convert/dump a Vienna 1.8.4 formatted energy parameter file
65 * The options argument allows to control the different output modes.\n
66 * Currently available options are:\n
67 * #VRNA_CONVERT_OUTPUT_ALL, #VRNA_CONVERT_OUTPUT_HP, #VRNA_CONVERT_OUTPUT_STACK\n
68 * #VRNA_CONVERT_OUTPUT_MM_HP, #VRNA_CONVERT_OUTPUT_MM_INT, #VRNA_CONVERT_OUTPUT_MM_INT_1N\n
69 * #VRNA_CONVERT_OUTPUT_MM_INT_23, #VRNA_CONVERT_OUTPUT_MM_MULTI, #VRNA_CONVERT_OUTPUT_MM_EXT\n
70 * #VRNA_CONVERT_OUTPUT_DANGLE5, #VRNA_CONVERT_OUTPUT_DANGLE3, #VRNA_CONVERT_OUTPUT_INT_11\n
71 * #VRNA_CONVERT_OUTPUT_INT_21, #VRNA_CONVERT_OUTPUT_INT_22, #VRNA_CONVERT_OUTPUT_BULGE\n
72 * #VRNA_CONVERT_OUTPUT_INT, #VRNA_CONVERT_OUTPUT_ML, #VRNA_CONVERT_OUTPUT_MISC\n
73 * #VRNA_CONVERT_OUTPUT_SPECIAL_HP, #VRNA_CONVERT_OUTPUT_VANILLA, #VRNA_CONVERT_OUTPUT_NINIO\n
74 * #VRNA_CONVERT_OUTPUT_DUMP
76 * The defined options are fine for bitwise compare- and assignment-operations,
77 * e. g.: pass a collection of options as a single value like this:
78 * \verbatim convert_parameter_file(ifile, ofile, option_1 | option_2 | option_n) \endverbatim
80 * \param iname The input file name (If NULL input is read from stdin)
81 * \param oname The output file name (If NULL output is written to stdout)
82 * \param options The options (as described above)
84 void convert_parameter_file(const char *iname,
86 unsigned int options);