1 /** @file RNApaln_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 RNAPALN_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define RNAPALN_CMDLINE_PARSER_PACKAGE "RNApaln"
27 #ifndef RNAPALN_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define RNAPALN_CMDLINE_PARSER_PACKAGE_NAME "RNApaln"
32 #ifndef RNAPALN_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define RNAPALN_CMDLINE_PARSER_VERSION VERSION
37 /** @brief Where the command line options are stored */
38 struct RNApaln_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 char * printAlignment_arg; /**< @brief Print an \"alignment\" with gaps of the profiles
45 The aligned structures are written to filename, if specified
46 Otherwise output is written to stdout, unless the -Xm option is set in which case \"backtrack.file\" is used.
47 (default='stdout'). */
48 char * printAlignment_orig; /**< @brief Print an \"alignment\" with gaps of the profiles
49 The aligned structures are written to filename, if specified
50 Otherwise output is written to stdout, unless the -Xm option is set in which case \"backtrack.file\" is used.
51 original value given at command line. */
52 const char *printAlignment_help; /**< @brief Print an \"alignment\" with gaps of the profiles
53 The aligned structures are written to filename, if specified
54 Otherwise output is written to stdout, unless the -Xm option is set in which case \"backtrack.file\" is used.
56 int noconv_flag; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
59 const char *noconv_help; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
62 char * mode_arg; /**< @brief Set the alignment mode to be used
64 char * mode_orig; /**< @brief Set the alignment mode to be used
65 original value given at command line. */
66 const char *mode_help; /**< @brief Set the alignment mode to be used
68 float gapo_arg; /**< @brief Set the gap open penalty
71 char * gapo_orig; /**< @brief Set the gap open penalty
73 original value given at command line. */
74 const char *gapo_help; /**< @brief Set the gap open penalty
77 float gape_arg; /**< @brief Set the gap extension penalty
80 char * gape_orig; /**< @brief Set the gap extension penalty
82 original value given at command line. */
83 const char *gape_help; /**< @brief Set the gap extension penalty
86 float seqw_arg; /**< @brief Set the weight of sequence (compared to structure) in the scoring function.
89 char * seqw_orig; /**< @brief Set the weight of sequence (compared to structure) in the scoring function.
91 original value given at command line. */
92 const char *seqw_help; /**< @brief Set the weight of sequence (compared to structure) in the scoring function.
95 int endgaps_flag; /**< @brief Use free end-gaps
98 const char *endgaps_help; /**< @brief Use free end-gaps
101 double temp_arg; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
104 char * temp_orig; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
106 original value given at command line. */
107 const char *temp_help; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
110 int noTetra_flag; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
113 const char *noTetra_help; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
116 int dangles_arg; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
118 char * dangles_orig; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
119 original value given at command line. */
120 const char *dangles_help; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
122 int noLP_flag; /**< @brief Produce structures without lonely pairs (helices of length 1).
124 const char *noLP_help; /**< @brief Produce structures without lonely pairs (helices of length 1).
126 int noGU_flag; /**< @brief Do not allow GU pairs
129 const char *noGU_help; /**< @brief Do not allow GU pairs
132 int noClosingGU_flag; /**< @brief Do not allow GU pairs at the end of helices
135 const char *noClosingGU_help; /**< @brief Do not allow GU pairs at the end of helices
138 char * paramFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
140 char * paramFile_orig; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
141 original value given at command line. */
142 const char *paramFile_help; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
144 char * nsp_arg; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
146 char * nsp_orig; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
147 original value given at command line. */
148 const char *nsp_help; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
150 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.
153 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.
155 original value given at command line. */
156 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.
160 unsigned int help_given ; /**< @brief Whether help was given. */
161 unsigned int detailed_help_given ; /**< @brief Whether detailed-help was given. */
162 unsigned int full_help_given ; /**< @brief Whether full-help was given. */
163 unsigned int version_given ; /**< @brief Whether version was given. */
164 unsigned int printAlignment_given ; /**< @brief Whether printAlignment was given. */
165 unsigned int noconv_given ; /**< @brief Whether noconv was given. */
166 unsigned int mode_given ; /**< @brief Whether mode was given. */
167 unsigned int gapo_given ; /**< @brief Whether gapo was given. */
168 unsigned int gape_given ; /**< @brief Whether gape was given. */
169 unsigned int seqw_given ; /**< @brief Whether seqw was given. */
170 unsigned int endgaps_given ; /**< @brief Whether endgaps was given. */
171 unsigned int temp_given ; /**< @brief Whether temp was given. */
172 unsigned int noTetra_given ; /**< @brief Whether noTetra was given. */
173 unsigned int dangles_given ; /**< @brief Whether dangles was given. */
174 unsigned int noLP_given ; /**< @brief Whether noLP was given. */
175 unsigned int noGU_given ; /**< @brief Whether noGU was given. */
176 unsigned int noClosingGU_given ; /**< @brief Whether noClosingGU was given. */
177 unsigned int paramFile_given ; /**< @brief Whether paramFile was given. */
178 unsigned int nsp_given ; /**< @brief Whether nsp was given. */
179 unsigned int energyModel_given ; /**< @brief Whether energyModel was given. */
183 /** @brief The additional parameters to pass to parser functions */
184 struct RNApaln_cmdline_parser_params
186 int override; /**< @brief whether to override possibly already present options (default 0) */
187 int initialize; /**< @brief whether to initialize the option structure RNApaln_args_info (default 1) */
188 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
189 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure RNApaln_args_info (default 0) */
190 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
193 /** @brief the purpose string of the program */
194 extern const char *RNApaln_args_info_purpose;
195 /** @brief the usage string of the program */
196 extern const char *RNApaln_args_info_usage;
197 /** @brief all the lines making the help output */
198 extern const char *RNApaln_args_info_help[];
199 /** @brief all the lines making the full help output (including hidden options) */
200 extern const char *RNApaln_args_info_full_help[];
201 /** @brief all the lines making the detailed help output (including hidden options and details) */
202 extern const char *RNApaln_args_info_detailed_help[];
205 * The command line parser
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 * @return 0 if everything went fine, NON 0 if an error took place
211 int RNApaln_cmdline_parser (int argc, char **argv,
212 struct RNApaln_args_info *args_info);
215 * The command line parser (version with additional parameters - deprecated)
216 * @param argc the number of command line options
217 * @param argv the command line options
218 * @param args_info the structure where option information will be stored
219 * @param override whether to override possibly already present options
220 * @param initialize whether to initialize the option structure my_args_info
221 * @param check_required whether to check that all required options were provided
222 * @return 0 if everything went fine, NON 0 if an error took place
223 * @deprecated use RNApaln_cmdline_parser_ext() instead
225 int RNApaln_cmdline_parser2 (int argc, char **argv,
226 struct RNApaln_args_info *args_info,
227 int override, int initialize, int check_required);
230 * The command line parser (version with additional parameters)
231 * @param argc the number of command line options
232 * @param argv the command line options
233 * @param args_info the structure where option information will be stored
234 * @param params additional parameters for the parser
235 * @return 0 if everything went fine, NON 0 if an error took place
237 int RNApaln_cmdline_parser_ext (int argc, char **argv,
238 struct RNApaln_args_info *args_info,
239 struct RNApaln_cmdline_parser_params *params);
242 * Save the contents of the option struct into an already open FILE stream.
243 * @param outfile the stream where to dump options
244 * @param args_info the option struct to dump
245 * @return 0 if everything went fine, NON 0 if an error took place
247 int RNApaln_cmdline_parser_dump(FILE *outfile,
248 struct RNApaln_args_info *args_info);
251 * Save the contents of the option struct into a (text) file.
252 * This file can be read by the config file parser (if generated by gengetopt)
253 * @param filename the file where to save
254 * @param args_info the option struct to save
255 * @return 0 if everything went fine, NON 0 if an error took place
257 int RNApaln_cmdline_parser_file_save(const char *filename,
258 struct RNApaln_args_info *args_info);
263 void RNApaln_cmdline_parser_print_help(void);
265 * Print the full help (including hidden options)
267 void RNApaln_cmdline_parser_print_full_help(void);
269 * Print the detailed help (including hidden options and details)
271 void RNApaln_cmdline_parser_print_detailed_help(void);
275 void RNApaln_cmdline_parser_print_version(void);
278 * Initializes all the fields a RNApaln_cmdline_parser_params structure
279 * to their default values
280 * @param params the structure to initialize
282 void RNApaln_cmdline_parser_params_init(struct RNApaln_cmdline_parser_params *params);
285 * Allocates dynamically a RNApaln_cmdline_parser_params structure and initializes
286 * all its fields to their default values
287 * @return the created and initialized RNApaln_cmdline_parser_params structure
289 struct RNApaln_cmdline_parser_params *RNApaln_cmdline_parser_params_create(void);
292 * Initializes the passed RNApaln_args_info structure's fields
293 * (also set default values for options that have a default)
294 * @param args_info the structure to initialize
296 void RNApaln_cmdline_parser_init (struct RNApaln_args_info *args_info);
298 * Deallocates the string fields of the RNApaln_args_info structure
299 * (but does not deallocate the structure itself)
300 * @param args_info the structure to deallocate
302 void RNApaln_cmdline_parser_free (struct RNApaln_args_info *args_info);
305 * Checks that all the required options were specified
306 * @param args_info the structure to check
307 * @param prog_name the name of the program that will be used to print
311 int RNApaln_cmdline_parser_required (struct RNApaln_args_info *args_info,
312 const char *prog_name);
317 #endif /* __cplusplus */
318 #endif /* RNAPALN_CMDL_H */