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