1 /** @file RNAheat_cmdl.h
2 * @brief The header file for the command line option parser
3 * generated by GNU Gengetopt version 2.22.5
4 * http://www.gnu.org/software/gengetopt.
5 * DO NOT modify this file, since it can be overwritten
6 * @author GNU Gengetopt by Lorenzo Bettini */
11 /* If we use autoconf. */
16 #include <stdio.h> /* for FILE */
20 #endif /* __cplusplus */
22 #ifndef RNAHEAT_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define RNAHEAT_CMDLINE_PARSER_PACKAGE "RNAheat"
27 #ifndef RNAHEAT_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define RNAHEAT_CMDLINE_PARSER_PACKAGE_NAME "RNAheat"
32 #ifndef RNAHEAT_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define RNAHEAT_CMDLINE_PARSER_VERSION VERSION
37 /** @brief Where the command line options are stored */
38 struct RNAheat_args_info
40 const char *help_help; /**< @brief Print help and exit help description. */
41 const char *detailed_help_help; /**< @brief Print help, including all details and hidden options, and exit help description. */
42 const char *full_help_help; /**< @brief Print help, including hidden options, and exit help description. */
43 const char *version_help; /**< @brief Print version and exit help description. */
44 float Tmin_arg; /**< @brief Lowest temperature
47 char * Tmin_orig; /**< @brief Lowest temperature
49 original value given at command line. */
50 const char *Tmin_help; /**< @brief Lowest temperature
53 float Tmax_arg; /**< @brief Highest temperature
56 char * Tmax_orig; /**< @brief Highest temperature
58 original value given at command line. */
59 const char *Tmax_help; /**< @brief Highest temperature
62 float stepsize_arg; /**< @brief Calculate partition function every stepsize degrees C
65 char * stepsize_orig; /**< @brief Calculate partition function every stepsize degrees C
67 original value given at command line. */
68 const char *stepsize_help; /**< @brief Calculate partition function every stepsize degrees C
71 int ipoints_arg; /**< @brief The program fits a parabola to 2*ipoints+1 data points to calculate 2nd derivatives. Increasing this parameter produces a smoother curve
74 char * ipoints_orig; /**< @brief The program fits a parabola to 2*ipoints+1 data points to calculate 2nd derivatives. Increasing this parameter produces a smoother curve
76 original value given at command line. */
77 const char *ipoints_help; /**< @brief The program fits a parabola to 2*ipoints+1 data points to calculate 2nd derivatives. Increasing this parameter produces a smoother curve
80 int noconv_flag; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
83 const char *noconv_help; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
86 int noTetra_flag; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
89 const char *noTetra_help; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
92 int dangles_arg; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
94 char * dangles_orig; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
95 original value given at command line. */
96 const char *dangles_help; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
98 int noLP_flag; /**< @brief Produce structures without lonely pairs (helices of length 1).
100 const char *noLP_help; /**< @brief Produce structures without lonely pairs (helices of length 1).
102 int noGU_flag; /**< @brief Do not allow GU pairs
104 const char *noGU_help; /**< @brief Do not allow GU pairs
106 int noClosingGU_flag; /**< @brief Do not allow GU pairs at the end of helices
109 const char *noClosingGU_help; /**< @brief Do not allow GU pairs at the end of helices
112 char * paramFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
114 char * paramFile_orig; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
115 original value given at command line. */
116 const char *paramFile_help; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
118 char * nsp_arg; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
120 char * nsp_orig; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
121 original value given at command line. */
122 const char *nsp_help; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
124 int energyModel_arg; /**< @brief Rarely used option to fold sequences from the artificial ABCD... alphabet, where A pairs B, C-D etc. Use the energy parameters for GC (-e 1) or AU (-e 2) pairs.
127 char * energyModel_orig; /**< @brief Rarely used option to fold sequences from the artificial ABCD... alphabet, where A pairs B, C-D etc. Use the energy parameters for GC (-e 1) or AU (-e 2) pairs.
129 original value given at command line. */
130 const char *energyModel_help; /**< @brief Rarely used option to fold sequences from the artificial ABCD... alphabet, where A pairs B, C-D etc. Use the energy parameters for GC (-e 1) or AU (-e 2) pairs.
134 unsigned int help_given ; /**< @brief Whether help was given. */
135 unsigned int detailed_help_given ; /**< @brief Whether detailed-help was given. */
136 unsigned int full_help_given ; /**< @brief Whether full-help was given. */
137 unsigned int version_given ; /**< @brief Whether version was given. */
138 unsigned int Tmin_given ; /**< @brief Whether Tmin was given. */
139 unsigned int Tmax_given ; /**< @brief Whether Tmax was given. */
140 unsigned int stepsize_given ; /**< @brief Whether stepsize was given. */
141 unsigned int ipoints_given ; /**< @brief Whether ipoints was given. */
142 unsigned int noconv_given ; /**< @brief Whether noconv was given. */
143 unsigned int noTetra_given ; /**< @brief Whether noTetra was given. */
144 unsigned int dangles_given ; /**< @brief Whether dangles was given. */
145 unsigned int noLP_given ; /**< @brief Whether noLP was given. */
146 unsigned int noGU_given ; /**< @brief Whether noGU was given. */
147 unsigned int noClosingGU_given ; /**< @brief Whether noClosingGU was given. */
148 unsigned int paramFile_given ; /**< @brief Whether paramFile was given. */
149 unsigned int nsp_given ; /**< @brief Whether nsp was given. */
150 unsigned int energyModel_given ; /**< @brief Whether energyModel was given. */
154 /** @brief The additional parameters to pass to parser functions */
155 struct RNAheat_cmdline_parser_params
157 int override; /**< @brief whether to override possibly already present options (default 0) */
158 int initialize; /**< @brief whether to initialize the option structure RNAheat_args_info (default 1) */
159 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
160 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure RNAheat_args_info (default 0) */
161 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
164 /** @brief the purpose string of the program */
165 extern const char *RNAheat_args_info_purpose;
166 /** @brief the usage string of the program */
167 extern const char *RNAheat_args_info_usage;
168 /** @brief all the lines making the help output */
169 extern const char *RNAheat_args_info_help[];
170 /** @brief all the lines making the full help output (including hidden options) */
171 extern const char *RNAheat_args_info_full_help[];
172 /** @brief all the lines making the detailed help output (including hidden options and details) */
173 extern const char *RNAheat_args_info_detailed_help[];
176 * The command line parser
177 * @param argc the number of command line options
178 * @param argv the command line options
179 * @param args_info the structure where option information will be stored
180 * @return 0 if everything went fine, NON 0 if an error took place
182 int RNAheat_cmdline_parser (int argc, char **argv,
183 struct RNAheat_args_info *args_info);
186 * The command line parser (version with additional parameters - deprecated)
187 * @param argc the number of command line options
188 * @param argv the command line options
189 * @param args_info the structure where option information will be stored
190 * @param override whether to override possibly already present options
191 * @param initialize whether to initialize the option structure my_args_info
192 * @param check_required whether to check that all required options were provided
193 * @return 0 if everything went fine, NON 0 if an error took place
194 * @deprecated use RNAheat_cmdline_parser_ext() instead
196 int RNAheat_cmdline_parser2 (int argc, char **argv,
197 struct RNAheat_args_info *args_info,
198 int override, int initialize, int check_required);
201 * The command line parser (version with additional parameters)
202 * @param argc the number of command line options
203 * @param argv the command line options
204 * @param args_info the structure where option information will be stored
205 * @param params additional parameters for the parser
206 * @return 0 if everything went fine, NON 0 if an error took place
208 int RNAheat_cmdline_parser_ext (int argc, char **argv,
209 struct RNAheat_args_info *args_info,
210 struct RNAheat_cmdline_parser_params *params);
213 * Save the contents of the option struct into an already open FILE stream.
214 * @param outfile the stream where to dump options
215 * @param args_info the option struct to dump
216 * @return 0 if everything went fine, NON 0 if an error took place
218 int RNAheat_cmdline_parser_dump(FILE *outfile,
219 struct RNAheat_args_info *args_info);
222 * Save the contents of the option struct into a (text) file.
223 * This file can be read by the config file parser (if generated by gengetopt)
224 * @param filename the file where to save
225 * @param args_info the option struct to save
226 * @return 0 if everything went fine, NON 0 if an error took place
228 int RNAheat_cmdline_parser_file_save(const char *filename,
229 struct RNAheat_args_info *args_info);
234 void RNAheat_cmdline_parser_print_help(void);
236 * Print the full help (including hidden options)
238 void RNAheat_cmdline_parser_print_full_help(void);
240 * Print the detailed help (including hidden options and details)
242 void RNAheat_cmdline_parser_print_detailed_help(void);
246 void RNAheat_cmdline_parser_print_version(void);
249 * Initializes all the fields a RNAheat_cmdline_parser_params structure
250 * to their default values
251 * @param params the structure to initialize
253 void RNAheat_cmdline_parser_params_init(struct RNAheat_cmdline_parser_params *params);
256 * Allocates dynamically a RNAheat_cmdline_parser_params structure and initializes
257 * all its fields to their default values
258 * @return the created and initialized RNAheat_cmdline_parser_params structure
260 struct RNAheat_cmdline_parser_params *RNAheat_cmdline_parser_params_create(void);
263 * Initializes the passed RNAheat_args_info structure's fields
264 * (also set default values for options that have a default)
265 * @param args_info the structure to initialize
267 void RNAheat_cmdline_parser_init (struct RNAheat_args_info *args_info);
269 * Deallocates the string fields of the RNAheat_args_info structure
270 * (but does not deallocate the structure itself)
271 * @param args_info the structure to deallocate
273 void RNAheat_cmdline_parser_free (struct RNAheat_args_info *args_info);
276 * Checks that all the required options were specified
277 * @param args_info the structure to check
278 * @param prog_name the name of the program that will be used to print
282 int RNAheat_cmdline_parser_required (struct RNAheat_args_info *args_info,
283 const char *prog_name);
288 #endif /* __cplusplus */
289 #endif /* RNAHEAT_CMDL_H */