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 RNAUP_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define RNAUP_CMDLINE_PARSER_PACKAGE "RNAup"
27 #ifndef RNAUP_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define RNAUP_CMDLINE_PARSER_PACKAGE_NAME "RNAup"
32 #ifndef RNAUP_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define RNAUP_CMDLINE_PARSER_VERSION VERSION
37 /** @brief Where the command line options are stored */
38 struct RNAup_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 no_output_file_flag; /**< @brief Do not produce an output file
51 const char *no_output_file_help; /**< @brief Do not produce an output file
54 int no_header_flag; /**< @brief Do not produce a header with the command line parameters used in the outputfile
57 const char *no_header_help; /**< @brief Do not produce a header with the command line parameters used in the outputfile
60 int noconv_flag; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
63 const char *noconv_help; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
66 char ** ulength_arg; /**< @brief specifies the length of the unstructured region in the output.
68 char ** ulength_orig; /**< @brief specifies the length of the unstructured region in the output.
69 original value given at command line. */
70 unsigned int ulength_min; /**< @brief specifies the length of the unstructured region in the output.
71 's minimum occurreces */
72 unsigned int ulength_max; /**< @brief specifies the length of the unstructured region in the output.
73 's maximum occurreces */
74 const char *ulength_help; /**< @brief specifies the length of the unstructured region in the output.
76 char * contributions_arg; /**< @brief Specify the contributions listed in the output
78 char * contributions_orig; /**< @brief Specify the contributions listed in the output
79 original value given at command line. */
80 const char *contributions_help; /**< @brief Specify the contributions listed in the output
82 int window_arg; /**< @brief Determine the maximal length of the region of interaction
85 char * window_orig; /**< @brief Determine the maximal length of the region of interaction
87 original value given at command line. */
88 const char *window_help; /**< @brief Determine the maximal length of the region of interaction
91 int include_both_flag; /**< @brief Include the probability of unpaired regions in both (b) RNAs. By default
92 only the probability of being unpaired in the longer RNA (target) is used.
95 const char *include_both_help; /**< @brief Include the probability of unpaired regions in both (b) RNAs. By default
96 only the probability of being unpaired in the longer RNA (target) is used.
99 int extend5_arg; /**< @brief Extend the region of interaction in the target to some residues on the 5' side
101 char * extend5_orig; /**< @brief Extend the region of interaction in the target to some residues on the 5' side
102 original value given at command line. */
103 const char *extend5_help; /**< @brief Extend the region of interaction in the target to some residues on the 5' side
105 int extend3_arg; /**< @brief Extend the region of interaction in the target to some residues on the 3' side
107 char * extend3_orig; /**< @brief Extend the region of interaction in the target to some residues on the 3' side
108 original value given at command line. */
109 const char *extend3_help; /**< @brief Extend the region of interaction in the target to some residues on the 3' side
111 int interaction_pairwise_flag; /**< @brief Activate pairwise interaction mode
113 const char *interaction_pairwise_help; /**< @brief Activate pairwise interaction mode
115 int interaction_first_flag; /**< @brief Activate interaction mode using first sequence only
117 const char *interaction_first_help; /**< @brief Activate interaction mode using first sequence only
119 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). The default is 1.07, useful values are 1.0 to 1.2. Occasionally needed for long sequences.
120 You can also recompile the program to use double precision (see the README file).
123 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). The default is 1.07, useful values are 1.0 to 1.2. Occasionally needed for long sequences.
124 You can also recompile the program to use double precision (see the README file).
126 original value given at command line. */
127 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). The default is 1.07, useful values are 1.0 to 1.2. Occasionally needed for long sequences.
128 You can also recompile the program to use double precision (see the README file).
131 double temp_arg; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
134 char * temp_orig; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
136 original value given at command line. */
137 const char *temp_help; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
140 int noTetra_flag; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
143 const char *noTetra_help; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
146 int dangles_arg; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
148 char * dangles_orig; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
149 original value given at command line. */
150 const char *dangles_help; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
152 int noLP_flag; /**< @brief Produce structures without lonely pairs (helices of length 1).
154 const char *noLP_help; /**< @brief Produce structures without lonely pairs (helices of length 1).
156 int noGU_flag; /**< @brief Do not allow GU pairs
159 const char *noGU_help; /**< @brief Do not allow GU pairs
162 int noClosingGU_flag; /**< @brief Do not allow GU pairs at the end of helices
165 const char *noClosingGU_help; /**< @brief Do not allow GU pairs at the end of helices
168 char * paramFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
170 char * paramFile_orig; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
171 original value given at command line. */
172 const char *paramFile_help; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
174 char * nsp_arg; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
176 char * nsp_orig; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
177 original value given at command line. */
178 const char *nsp_help; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
180 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.
183 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.
185 original value given at command line. */
186 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.
190 unsigned int help_given ; /**< @brief Whether help was given. */
191 unsigned int detailed_help_given ; /**< @brief Whether detailed-help was given. */
192 unsigned int full_help_given ; /**< @brief Whether full-help was given. */
193 unsigned int version_given ; /**< @brief Whether version was given. */
194 unsigned int constraint_given ; /**< @brief Whether constraint was given. */
195 unsigned int no_output_file_given ; /**< @brief Whether no_output_file was given. */
196 unsigned int no_header_given ; /**< @brief Whether no_header was given. */
197 unsigned int noconv_given ; /**< @brief Whether noconv was given. */
198 unsigned int ulength_given ; /**< @brief Whether ulength was given. */
199 unsigned int contributions_given ; /**< @brief Whether contributions was given. */
200 unsigned int window_given ; /**< @brief Whether window was given. */
201 unsigned int include_both_given ; /**< @brief Whether include_both was given. */
202 unsigned int extend5_given ; /**< @brief Whether extend5 was given. */
203 unsigned int extend3_given ; /**< @brief Whether extend3 was given. */
204 unsigned int interaction_pairwise_given ; /**< @brief Whether interaction_pairwise was given. */
205 unsigned int interaction_first_given ; /**< @brief Whether interaction_first was given. */
206 unsigned int pfScale_given ; /**< @brief Whether pfScale was given. */
207 unsigned int temp_given ; /**< @brief Whether temp was given. */
208 unsigned int noTetra_given ; /**< @brief Whether noTetra was given. */
209 unsigned int dangles_given ; /**< @brief Whether dangles was given. */
210 unsigned int noLP_given ; /**< @brief Whether noLP was given. */
211 unsigned int noGU_given ; /**< @brief Whether noGU was given. */
212 unsigned int noClosingGU_given ; /**< @brief Whether noClosingGU was given. */
213 unsigned int paramFile_given ; /**< @brief Whether paramFile was given. */
214 unsigned int nsp_given ; /**< @brief Whether nsp was given. */
215 unsigned int energyModel_given ; /**< @brief Whether energyModel was given. */
219 /** @brief The additional parameters to pass to parser functions */
220 struct RNAup_cmdline_parser_params
222 int override; /**< @brief whether to override possibly already present options (default 0) */
223 int initialize; /**< @brief whether to initialize the option structure RNAup_args_info (default 1) */
224 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
225 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure RNAup_args_info (default 0) */
226 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
229 /** @brief the purpose string of the program */
230 extern const char *RNAup_args_info_purpose;
231 /** @brief the usage string of the program */
232 extern const char *RNAup_args_info_usage;
233 /** @brief all the lines making the help output */
234 extern const char *RNAup_args_info_help[];
235 /** @brief all the lines making the full help output (including hidden options) */
236 extern const char *RNAup_args_info_full_help[];
237 /** @brief all the lines making the detailed help output (including hidden options and details) */
238 extern const char *RNAup_args_info_detailed_help[];
241 * The command line parser
242 * @param argc the number of command line options
243 * @param argv the command line options
244 * @param args_info the structure where option information will be stored
245 * @return 0 if everything went fine, NON 0 if an error took place
247 int RNAup_cmdline_parser (int argc, char **argv,
248 struct RNAup_args_info *args_info);
251 * The command line parser (version with additional parameters - deprecated)
252 * @param argc the number of command line options
253 * @param argv the command line options
254 * @param args_info the structure where option information will be stored
255 * @param override whether to override possibly already present options
256 * @param initialize whether to initialize the option structure my_args_info
257 * @param check_required whether to check that all required options were provided
258 * @return 0 if everything went fine, NON 0 if an error took place
259 * @deprecated use RNAup_cmdline_parser_ext() instead
261 int RNAup_cmdline_parser2 (int argc, char **argv,
262 struct RNAup_args_info *args_info,
263 int override, int initialize, int check_required);
266 * The command line parser (version with additional parameters)
267 * @param argc the number of command line options
268 * @param argv the command line options
269 * @param args_info the structure where option information will be stored
270 * @param params additional parameters for the parser
271 * @return 0 if everything went fine, NON 0 if an error took place
273 int RNAup_cmdline_parser_ext (int argc, char **argv,
274 struct RNAup_args_info *args_info,
275 struct RNAup_cmdline_parser_params *params);
278 * Save the contents of the option struct into an already open FILE stream.
279 * @param outfile the stream where to dump options
280 * @param args_info the option struct to dump
281 * @return 0 if everything went fine, NON 0 if an error took place
283 int RNAup_cmdline_parser_dump(FILE *outfile,
284 struct RNAup_args_info *args_info);
287 * Save the contents of the option struct into a (text) file.
288 * This file can be read by the config file parser (if generated by gengetopt)
289 * @param filename the file where to save
290 * @param args_info the option struct to save
291 * @return 0 if everything went fine, NON 0 if an error took place
293 int RNAup_cmdline_parser_file_save(const char *filename,
294 struct RNAup_args_info *args_info);
299 void RNAup_cmdline_parser_print_help(void);
301 * Print the full help (including hidden options)
303 void RNAup_cmdline_parser_print_full_help(void);
305 * Print the detailed help (including hidden options and details)
307 void RNAup_cmdline_parser_print_detailed_help(void);
311 void RNAup_cmdline_parser_print_version(void);
314 * Initializes all the fields a RNAup_cmdline_parser_params structure
315 * to their default values
316 * @param params the structure to initialize
318 void RNAup_cmdline_parser_params_init(struct RNAup_cmdline_parser_params *params);
321 * Allocates dynamically a RNAup_cmdline_parser_params structure and initializes
322 * all its fields to their default values
323 * @return the created and initialized RNAup_cmdline_parser_params structure
325 struct RNAup_cmdline_parser_params *RNAup_cmdline_parser_params_create(void);
328 * Initializes the passed RNAup_args_info structure's fields
329 * (also set default values for options that have a default)
330 * @param args_info the structure to initialize
332 void RNAup_cmdline_parser_init (struct RNAup_args_info *args_info);
334 * Deallocates the string fields of the RNAup_args_info structure
335 * (but does not deallocate the structure itself)
336 * @param args_info the structure to deallocate
338 void RNAup_cmdline_parser_free (struct RNAup_args_info *args_info);
341 * Checks that all the required options were specified
342 * @param args_info the structure to check
343 * @param prog_name the name of the program that will be used to print
347 int RNAup_cmdline_parser_required (struct RNAup_args_info *args_info,
348 const char *prog_name);
353 #endif /* __cplusplus */
354 #endif /* RNAUP_CMDL_H */