1 /** @file RNAsubopt_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 */
8 #ifndef RNASUBOPT_CMDL_H
9 #define RNASUBOPT_CMDL_H
11 /* If we use autoconf. */
16 #include <stdio.h> /* for FILE */
20 #endif /* __cplusplus */
22 #ifndef RNASUBOPT_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define RNASUBOPT_CMDLINE_PARSER_PACKAGE "RNAsubopt"
27 #ifndef RNASUBOPT_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define RNASUBOPT_CMDLINE_PARSER_PACKAGE_NAME "RNAsubopt"
32 #ifndef RNASUBOPT_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define RNASUBOPT_CMDLINE_PARSER_VERSION VERSION
37 /** @brief Where the command line options are stored */
38 struct RNAsubopt_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 int constraint_flag; /**< @brief Calculate structures subject to constraints.
46 const char *constraint_help; /**< @brief Calculate structures subject to constraints.
48 int noconv_flag; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
51 const char *noconv_help; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
54 float deltaEnergy_arg; /**< @brief Compute suboptimal structures with energy in a certain range of the optimum (kcal/mol). Default is calculation of mfe structure only.
57 char * deltaEnergy_orig; /**< @brief Compute suboptimal structures with energy in a certain range of the optimum (kcal/mol). Default is calculation of mfe structure only.
59 original value given at command line. */
60 const char *deltaEnergy_help; /**< @brief Compute suboptimal structures with energy in a certain range of the optimum (kcal/mol). Default is calculation of mfe structure only.
63 float deltaEnergyPost_arg; /**< @brief Only print structures with energy within range of the mfe after post reevaluation of energies.
65 char * deltaEnergyPost_orig; /**< @brief Only print structures with energy within range of the mfe after post reevaluation of energies.
66 original value given at command line. */
67 const char *deltaEnergyPost_help; /**< @brief Only print structures with energy within range of the mfe after post reevaluation of energies.
69 int sorted_flag; /**< @brief Sort the suboptimal structures by energy.
71 const char *sorted_help; /**< @brief Sort the suboptimal structures by energy.
73 int stochBT_arg; /**< @brief Instead of producing all suboptimals in an energy range, produce a random sample of suboptimal structures, drawn with probabilities equal to their Boltzmann weights via stochastic backtracking in the partition function. The -e and -p options are mutually exclusive.
76 char * stochBT_orig; /**< @brief Instead of producing all suboptimals in an energy range, produce a random sample of suboptimal structures, drawn with probabilities equal to their Boltzmann weights via stochastic backtracking in the partition function. The -e and -p options are mutually exclusive.
78 original value given at command line. */
79 const char *stochBT_help; /**< @brief Instead of producing all suboptimals in an energy range, produce a random sample of suboptimal structures, drawn with probabilities equal to their Boltzmann weights via stochastic backtracking in the partition function. The -e and -p options are mutually exclusive.
82 double pfScale_arg; /**< @brief In the calculation of the pf use scale*mfe as an estimate for the ensemble free energy (used to avoid overflows). Needed by stochastic backtracking
84 char * pfScale_orig; /**< @brief In the calculation of the pf use scale*mfe as an estimate for the ensemble free energy (used to avoid overflows). Needed by stochastic backtracking
85 original value given at command line. */
86 const char *pfScale_help; /**< @brief In the calculation of the pf use scale*mfe as an estimate for the ensemble free energy (used to avoid overflows). Needed by stochastic backtracking
88 int circ_flag; /**< @brief Assume a circular (instead of linear) RNA molecule.
91 const char *circ_help; /**< @brief Assume a circular (instead of linear) RNA molecule.
94 int dos_flag; /**< @brief Compute density of states instead of secondary structures
96 const char *dos_help; /**< @brief Compute density of states instead of secondary structures
98 int zuker_flag; /**< @brief Compute Zuker suboptimals instead of all suboptimal structures within an engery band arround the MFE.
101 const char *zuker_help; /**< @brief Compute Zuker suboptimals instead of all suboptimal structures within an engery band arround the MFE.
104 double temp_arg; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
107 char * temp_orig; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
109 original value given at command line. */
110 const char *temp_help; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
113 int noTetra_flag; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
116 const char *noTetra_help; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
119 int dangles_arg; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
121 char * dangles_orig; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
122 original value given at command line. */
123 const char *dangles_help; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
125 int noLP_flag; /**< @brief Produce structures without lonely pairs (helices of length 1).
127 const char *noLP_help; /**< @brief Produce structures without lonely pairs (helices of length 1).
129 int noGU_flag; /**< @brief Do not allow GU pairs
132 const char *noGU_help; /**< @brief Do not allow GU pairs
135 int noClosingGU_flag; /**< @brief Do not allow GU pairs at the end of helices
138 const char *noClosingGU_help; /**< @brief Do not allow GU pairs at the end of helices
141 int logML_flag; /**< @brief Recalculate energies of structures using a logarithmic energy function for multi-loops before output. (default=off). */
142 const char *logML_help; /**< @brief Recalculate energies of structures using a logarithmic energy function for multi-loops before output. help description. */
143 double betaScale_arg; /**< @brief Set the scaling of the Boltzmann factors
145 char * betaScale_orig; /**< @brief Set the scaling of the Boltzmann factors
146 original value given at command line. */
147 const char *betaScale_help; /**< @brief Set the scaling of the Boltzmann factors
149 char * paramFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
151 char * paramFile_orig; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
152 original value given at command line. */
153 const char *paramFile_help; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
155 char * nsp_arg; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
157 char * nsp_orig; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
158 original value given at command line. */
159 const char *nsp_help; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
162 unsigned int help_given ; /**< @brief Whether help was given. */
163 unsigned int detailed_help_given ; /**< @brief Whether detailed-help was given. */
164 unsigned int full_help_given ; /**< @brief Whether full-help was given. */
165 unsigned int version_given ; /**< @brief Whether version was given. */
166 unsigned int constraint_given ; /**< @brief Whether constraint was given. */
167 unsigned int noconv_given ; /**< @brief Whether noconv was given. */
168 unsigned int deltaEnergy_given ; /**< @brief Whether deltaEnergy was given. */
169 unsigned int deltaEnergyPost_given ; /**< @brief Whether deltaEnergyPost was given. */
170 unsigned int sorted_given ; /**< @brief Whether sorted was given. */
171 unsigned int stochBT_given ; /**< @brief Whether stochBT was given. */
172 unsigned int pfScale_given ; /**< @brief Whether pfScale was given. */
173 unsigned int circ_given ; /**< @brief Whether circ was given. */
174 unsigned int dos_given ; /**< @brief Whether dos was given. */
175 unsigned int zuker_given ; /**< @brief Whether zuker was given. */
176 unsigned int temp_given ; /**< @brief Whether temp was given. */
177 unsigned int noTetra_given ; /**< @brief Whether noTetra was given. */
178 unsigned int dangles_given ; /**< @brief Whether dangles was given. */
179 unsigned int noLP_given ; /**< @brief Whether noLP was given. */
180 unsigned int noGU_given ; /**< @brief Whether noGU was given. */
181 unsigned int noClosingGU_given ; /**< @brief Whether noClosingGU was given. */
182 unsigned int logML_given ; /**< @brief Whether logML was given. */
183 unsigned int betaScale_given ; /**< @brief Whether betaScale was given. */
184 unsigned int paramFile_given ; /**< @brief Whether paramFile was given. */
185 unsigned int nsp_given ; /**< @brief Whether nsp was given. */
189 /** @brief The additional parameters to pass to parser functions */
190 struct RNAsubopt_cmdline_parser_params
192 int override; /**< @brief whether to override possibly already present options (default 0) */
193 int initialize; /**< @brief whether to initialize the option structure RNAsubopt_args_info (default 1) */
194 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
195 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure RNAsubopt_args_info (default 0) */
196 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
199 /** @brief the purpose string of the program */
200 extern const char *RNAsubopt_args_info_purpose;
201 /** @brief the usage string of the program */
202 extern const char *RNAsubopt_args_info_usage;
203 /** @brief all the lines making the help output */
204 extern const char *RNAsubopt_args_info_help[];
205 /** @brief all the lines making the full help output (including hidden options) */
206 extern const char *RNAsubopt_args_info_full_help[];
207 /** @brief all the lines making the detailed help output (including hidden options and details) */
208 extern const char *RNAsubopt_args_info_detailed_help[];
211 * The command line parser
212 * @param argc the number of command line options
213 * @param argv the command line options
214 * @param args_info the structure where option information will be stored
215 * @return 0 if everything went fine, NON 0 if an error took place
217 int RNAsubopt_cmdline_parser (int argc, char **argv,
218 struct RNAsubopt_args_info *args_info);
221 * The command line parser (version with additional parameters - deprecated)
222 * @param argc the number of command line options
223 * @param argv the command line options
224 * @param args_info the structure where option information will be stored
225 * @param override whether to override possibly already present options
226 * @param initialize whether to initialize the option structure my_args_info
227 * @param check_required whether to check that all required options were provided
228 * @return 0 if everything went fine, NON 0 if an error took place
229 * @deprecated use RNAsubopt_cmdline_parser_ext() instead
231 int RNAsubopt_cmdline_parser2 (int argc, char **argv,
232 struct RNAsubopt_args_info *args_info,
233 int override, int initialize, int check_required);
236 * The command line parser (version with additional parameters)
237 * @param argc the number of command line options
238 * @param argv the command line options
239 * @param args_info the structure where option information will be stored
240 * @param params additional parameters for the parser
241 * @return 0 if everything went fine, NON 0 if an error took place
243 int RNAsubopt_cmdline_parser_ext (int argc, char **argv,
244 struct RNAsubopt_args_info *args_info,
245 struct RNAsubopt_cmdline_parser_params *params);
248 * Save the contents of the option struct into an already open FILE stream.
249 * @param outfile the stream where to dump options
250 * @param args_info the option struct to dump
251 * @return 0 if everything went fine, NON 0 if an error took place
253 int RNAsubopt_cmdline_parser_dump(FILE *outfile,
254 struct RNAsubopt_args_info *args_info);
257 * Save the contents of the option struct into a (text) file.
258 * This file can be read by the config file parser (if generated by gengetopt)
259 * @param filename the file where to save
260 * @param args_info the option struct to save
261 * @return 0 if everything went fine, NON 0 if an error took place
263 int RNAsubopt_cmdline_parser_file_save(const char *filename,
264 struct RNAsubopt_args_info *args_info);
269 void RNAsubopt_cmdline_parser_print_help(void);
271 * Print the full help (including hidden options)
273 void RNAsubopt_cmdline_parser_print_full_help(void);
275 * Print the detailed help (including hidden options and details)
277 void RNAsubopt_cmdline_parser_print_detailed_help(void);
281 void RNAsubopt_cmdline_parser_print_version(void);
284 * Initializes all the fields a RNAsubopt_cmdline_parser_params structure
285 * to their default values
286 * @param params the structure to initialize
288 void RNAsubopt_cmdline_parser_params_init(struct RNAsubopt_cmdline_parser_params *params);
291 * Allocates dynamically a RNAsubopt_cmdline_parser_params structure and initializes
292 * all its fields to their default values
293 * @return the created and initialized RNAsubopt_cmdline_parser_params structure
295 struct RNAsubopt_cmdline_parser_params *RNAsubopt_cmdline_parser_params_create(void);
298 * Initializes the passed RNAsubopt_args_info structure's fields
299 * (also set default values for options that have a default)
300 * @param args_info the structure to initialize
302 void RNAsubopt_cmdline_parser_init (struct RNAsubopt_args_info *args_info);
304 * Deallocates the string fields of the RNAsubopt_args_info structure
305 * (but does not deallocate the structure itself)
306 * @param args_info the structure to deallocate
308 void RNAsubopt_cmdline_parser_free (struct RNAsubopt_args_info *args_info);
311 * Checks that all the required options were specified
312 * @param args_info the structure to check
313 * @param prog_name the name of the program that will be used to print
317 int RNAsubopt_cmdline_parser_required (struct RNAsubopt_args_info *args_info,
318 const char *prog_name);
323 #endif /* __cplusplus */
324 #endif /* RNASUBOPT_CMDL_H */