1 /** @file RNAinverse_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 RNAINVERSE_CMDL_H
9 #define RNAINVERSE_CMDL_H
11 /* If we use autoconf. */
16 #include <stdio.h> /* for FILE */
20 #endif /* __cplusplus */
22 #ifndef RNAINVERSE_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define RNAINVERSE_CMDLINE_PARSER_PACKAGE "RNAinverse"
27 #ifndef RNAINVERSE_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define RNAINVERSE_CMDLINE_PARSER_PACKAGE_NAME "RNAinverse"
32 #ifndef RNAINVERSE_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define RNAINVERSE_CMDLINE_PARSER_VERSION VERSION
37 /** @brief Where the command line options are stored */
38 struct RNAinverse_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 repeat_arg; /**< @brief Search repeatedly for the same structure.
45 If an argument is supplied to this option it must follow the option flag immediately. E.g.: -R5
47 char * repeat_orig; /**< @brief Search repeatedly for the same structure.
48 If an argument is supplied to this option it must follow the option flag immediately. E.g.: -R5
49 original value given at command line. */
50 const char *repeat_help; /**< @brief Search repeatedly for the same structure.
51 If an argument is supplied to this option it must follow the option flag immediately. E.g.: -R5
53 char * alphabet_arg; /**< @brief Find sequences using only nucleotides from a given alphabet.
56 char * alphabet_orig; /**< @brief Find sequences using only nucleotides from a given alphabet.
58 original value given at command line. */
59 const char *alphabet_help; /**< @brief Find sequences using only nucleotides from a given alphabet.
62 int verbose_flag; /**< @brief In conjunction with a negative value supplied to -R, print the last subsequence and substructure for each unsuccessful search.
65 const char *verbose_help; /**< @brief In conjunction with a negative value supplied to -R, print the last subsequence and substructure for each unsuccessful search.
68 char * function_arg; /**< @brief Use minimum energy (-Fm), partition function folding (-Fp) or both (-Fmp).
70 char * function_orig; /**< @brief Use minimum energy (-Fm), partition function folding (-Fp) or both (-Fmp).
71 original value given at command line. */
72 const char *function_help; /**< @brief Use minimum energy (-Fm), partition function folding (-Fp) or both (-Fmp).
74 float final_arg; /**< @brief In combination with -Fp stop search when sequence is found with E(s)-F is smaller than final, where F=-kT*ln(Q).
77 char * final_orig; /**< @brief In combination with -Fp stop search when sequence is found with E(s)-F is smaller than final, where F=-kT*ln(Q).
79 original value given at command line. */
80 const char *final_help; /**< @brief In combination with -Fp stop search when sequence is found with E(s)-F is smaller than final, where F=-kT*ln(Q).
83 double temp_arg; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
86 char * temp_orig; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
88 original value given at command line. */
89 const char *temp_help; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
92 int noTetra_flag; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
95 const char *noTetra_help; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
98 int dangles_arg; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
100 char * dangles_orig; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
101 original value given at command line. */
102 const char *dangles_help; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
104 int noGU_flag; /**< @brief Do not allow GU pairs
107 const char *noGU_help; /**< @brief Do not allow GU pairs
110 int noClosingGU_flag; /**< @brief Do not allow GU pairs at the end of helices
113 const char *noClosingGU_help; /**< @brief Do not allow GU pairs at the end of helices
116 char * paramFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
118 char * paramFile_orig; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
119 original value given at command line. */
120 const char *paramFile_help; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
122 char * nsp_arg; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
124 char * nsp_orig; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
125 original value given at command line. */
126 const char *nsp_help; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
128 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.
131 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.
133 original value given at command line. */
134 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.
138 unsigned int help_given ; /**< @brief Whether help was given. */
139 unsigned int detailed_help_given ; /**< @brief Whether detailed-help was given. */
140 unsigned int full_help_given ; /**< @brief Whether full-help was given. */
141 unsigned int version_given ; /**< @brief Whether version was given. */
142 unsigned int repeat_given ; /**< @brief Whether repeat was given. */
143 unsigned int alphabet_given ; /**< @brief Whether alphabet was given. */
144 unsigned int verbose_given ; /**< @brief Whether verbose was given. */
145 unsigned int function_given ; /**< @brief Whether function was given. */
146 unsigned int final_given ; /**< @brief Whether final was given. */
147 unsigned int temp_given ; /**< @brief Whether temp was given. */
148 unsigned int noTetra_given ; /**< @brief Whether noTetra was given. */
149 unsigned int dangles_given ; /**< @brief Whether dangles was given. */
150 unsigned int noGU_given ; /**< @brief Whether noGU was given. */
151 unsigned int noClosingGU_given ; /**< @brief Whether noClosingGU was given. */
152 unsigned int paramFile_given ; /**< @brief Whether paramFile was given. */
153 unsigned int nsp_given ; /**< @brief Whether nsp was given. */
154 unsigned int energyModel_given ; /**< @brief Whether energyModel was given. */
158 /** @brief The additional parameters to pass to parser functions */
159 struct RNAinverse_cmdline_parser_params
161 int override; /**< @brief whether to override possibly already present options (default 0) */
162 int initialize; /**< @brief whether to initialize the option structure RNAinverse_args_info (default 1) */
163 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
164 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure RNAinverse_args_info (default 0) */
165 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
168 /** @brief the purpose string of the program */
169 extern const char *RNAinverse_args_info_purpose;
170 /** @brief the usage string of the program */
171 extern const char *RNAinverse_args_info_usage;
172 /** @brief all the lines making the help output */
173 extern const char *RNAinverse_args_info_help[];
174 /** @brief all the lines making the full help output (including hidden options) */
175 extern const char *RNAinverse_args_info_full_help[];
176 /** @brief all the lines making the detailed help output (including hidden options and details) */
177 extern const char *RNAinverse_args_info_detailed_help[];
180 * The command line parser
181 * @param argc the number of command line options
182 * @param argv the command line options
183 * @param args_info the structure where option information will be stored
184 * @return 0 if everything went fine, NON 0 if an error took place
186 int RNAinverse_cmdline_parser (int argc, char **argv,
187 struct RNAinverse_args_info *args_info);
190 * The command line parser (version with additional parameters - deprecated)
191 * @param argc the number of command line options
192 * @param argv the command line options
193 * @param args_info the structure where option information will be stored
194 * @param override whether to override possibly already present options
195 * @param initialize whether to initialize the option structure my_args_info
196 * @param check_required whether to check that all required options were provided
197 * @return 0 if everything went fine, NON 0 if an error took place
198 * @deprecated use RNAinverse_cmdline_parser_ext() instead
200 int RNAinverse_cmdline_parser2 (int argc, char **argv,
201 struct RNAinverse_args_info *args_info,
202 int override, int initialize, int check_required);
205 * The command line parser (version with additional parameters)
206 * @param argc the number of command line options
207 * @param argv the command line options
208 * @param args_info the structure where option information will be stored
209 * @param params additional parameters for the parser
210 * @return 0 if everything went fine, NON 0 if an error took place
212 int RNAinverse_cmdline_parser_ext (int argc, char **argv,
213 struct RNAinverse_args_info *args_info,
214 struct RNAinverse_cmdline_parser_params *params);
217 * Save the contents of the option struct into an already open FILE stream.
218 * @param outfile the stream where to dump options
219 * @param args_info the option struct to dump
220 * @return 0 if everything went fine, NON 0 if an error took place
222 int RNAinverse_cmdline_parser_dump(FILE *outfile,
223 struct RNAinverse_args_info *args_info);
226 * Save the contents of the option struct into a (text) file.
227 * This file can be read by the config file parser (if generated by gengetopt)
228 * @param filename the file where to save
229 * @param args_info the option struct to save
230 * @return 0 if everything went fine, NON 0 if an error took place
232 int RNAinverse_cmdline_parser_file_save(const char *filename,
233 struct RNAinverse_args_info *args_info);
238 void RNAinverse_cmdline_parser_print_help(void);
240 * Print the full help (including hidden options)
242 void RNAinverse_cmdline_parser_print_full_help(void);
244 * Print the detailed help (including hidden options and details)
246 void RNAinverse_cmdline_parser_print_detailed_help(void);
250 void RNAinverse_cmdline_parser_print_version(void);
253 * Initializes all the fields a RNAinverse_cmdline_parser_params structure
254 * to their default values
255 * @param params the structure to initialize
257 void RNAinverse_cmdline_parser_params_init(struct RNAinverse_cmdline_parser_params *params);
260 * Allocates dynamically a RNAinverse_cmdline_parser_params structure and initializes
261 * all its fields to their default values
262 * @return the created and initialized RNAinverse_cmdline_parser_params structure
264 struct RNAinverse_cmdline_parser_params *RNAinverse_cmdline_parser_params_create(void);
267 * Initializes the passed RNAinverse_args_info structure's fields
268 * (also set default values for options that have a default)
269 * @param args_info the structure to initialize
271 void RNAinverse_cmdline_parser_init (struct RNAinverse_args_info *args_info);
273 * Deallocates the string fields of the RNAinverse_args_info structure
274 * (but does not deallocate the structure itself)
275 * @param args_info the structure to deallocate
277 void RNAinverse_cmdline_parser_free (struct RNAinverse_args_info *args_info);
280 * Checks that all the required options were specified
281 * @param args_info the structure to check
282 * @param prog_name the name of the program that will be used to print
286 int RNAinverse_cmdline_parser_required (struct RNAinverse_args_info *args_info,
287 const char *prog_name);
292 #endif /* __cplusplus */
293 #endif /* RNAINVERSE_CMDL_H */