1 /** @file RNALfold_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 RNALFOLD_CMDL_H
9 #define RNALFOLD_CMDL_H
11 /* If we use autoconf. */
16 #include <stdio.h> /* for FILE */
20 #endif /* __cplusplus */
22 #ifndef RNALFOLD_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define RNALFOLD_CMDLINE_PARSER_PACKAGE "RNALfold"
27 #ifndef RNALFOLD_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define RNALFOLD_CMDLINE_PARSER_PACKAGE_NAME "RNALfold"
32 #ifndef RNALFOLD_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define RNALFOLD_CMDLINE_PARSER_VERSION VERSION
37 /** @brief Where the command line options are stored */
38 struct RNALfold_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 span_arg; /**< @brief Set the maximum allowed separation of a base pair to span. I.e. no pairs (i,j) with j-i>span will be allowed.
47 char * span_orig; /**< @brief Set the maximum allowed separation of a base pair to span. I.e. no pairs (i,j) with j-i>span will be allowed.
49 original value given at command line. */
50 const char *span_help; /**< @brief Set the maximum allowed separation of a base pair to span. I.e. no pairs (i,j) with j-i>span will be allowed.
53 int noconv_flag; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
56 const char *noconv_help; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
59 double zscore_arg; /**< @brief Activate z-score computation. An optional argument may be supplied to set the threshold
60 Due to parsing the commandline parameters a negative value should be given immediately after \"z\" without spaces e.g. -z-4.9
63 char * zscore_orig; /**< @brief Activate z-score computation. An optional argument may be supplied to set the threshold
64 Due to parsing the commandline parameters a negative value should be given immediately after \"z\" without spaces e.g. -z-4.9
66 original value given at command line. */
67 const char *zscore_help; /**< @brief Activate z-score computation. An optional argument may be supplied to set the threshold
68 Due to parsing the commandline parameters a negative value should be given immediately after \"z\" without spaces e.g. -z-4.9
71 int gquad_flag; /**< @brief Incoorporate G-Quadruplex formation into the structure prediction algorithm
73 const char *gquad_help; /**< @brief Incoorporate G-Quadruplex formation into the structure prediction algorithm
75 double temp_arg; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
78 char * temp_orig; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
80 original value given at command line. */
81 const char *temp_help; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
84 int noTetra_flag; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
87 const char *noTetra_help; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
90 int dangles_arg; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
92 char * dangles_orig; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
93 original value given at command line. */
94 const char *dangles_help; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
96 int noLP_flag; /**< @brief Produce structures without lonely pairs (helices of length 1).
98 const char *noLP_help; /**< @brief Produce structures without lonely pairs (helices of length 1).
100 int noGU_flag; /**< @brief Do not allow GU pairs
103 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 span_given ; /**< @brief Whether span was given. */
139 unsigned int noconv_given ; /**< @brief Whether noconv was given. */
140 unsigned int zscore_given ; /**< @brief Whether zscore was given. */
141 unsigned int gquad_given ; /**< @brief Whether gquad was given. */
142 unsigned int temp_given ; /**< @brief Whether temp 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 RNALfold_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 RNALfold_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 RNALfold_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 *RNALfold_args_info_purpose;
166 /** @brief the usage string of the program */
167 extern const char *RNALfold_args_info_usage;
168 /** @brief all the lines making the help output */
169 extern const char *RNALfold_args_info_help[];
170 /** @brief all the lines making the full help output (including hidden options) */
171 extern const char *RNALfold_args_info_full_help[];
172 /** @brief all the lines making the detailed help output (including hidden options and details) */
173 extern const char *RNALfold_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 RNALfold_cmdline_parser (int argc, char **argv,
183 struct RNALfold_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 RNALfold_cmdline_parser_ext() instead
196 int RNALfold_cmdline_parser2 (int argc, char **argv,
197 struct RNALfold_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 RNALfold_cmdline_parser_ext (int argc, char **argv,
209 struct RNALfold_args_info *args_info,
210 struct RNALfold_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 RNALfold_cmdline_parser_dump(FILE *outfile,
219 struct RNALfold_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 RNALfold_cmdline_parser_file_save(const char *filename,
229 struct RNALfold_args_info *args_info);
234 void RNALfold_cmdline_parser_print_help(void);
236 * Print the full help (including hidden options)
238 void RNALfold_cmdline_parser_print_full_help(void);
240 * Print the detailed help (including hidden options and details)
242 void RNALfold_cmdline_parser_print_detailed_help(void);
246 void RNALfold_cmdline_parser_print_version(void);
249 * Initializes all the fields a RNALfold_cmdline_parser_params structure
250 * to their default values
251 * @param params the structure to initialize
253 void RNALfold_cmdline_parser_params_init(struct RNALfold_cmdline_parser_params *params);
256 * Allocates dynamically a RNALfold_cmdline_parser_params structure and initializes
257 * all its fields to their default values
258 * @return the created and initialized RNALfold_cmdline_parser_params structure
260 struct RNALfold_cmdline_parser_params *RNALfold_cmdline_parser_params_create(void);
263 * Initializes the passed RNALfold_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 RNALfold_cmdline_parser_init (struct RNALfold_args_info *args_info);
269 * Deallocates the string fields of the RNALfold_args_info structure
270 * (but does not deallocate the structure itself)
271 * @param args_info the structure to deallocate
273 void RNALfold_cmdline_parser_free (struct RNALfold_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 RNALfold_cmdline_parser_required (struct RNALfold_args_info *args_info,
283 const char *prog_name);
288 #endif /* __cplusplus */
289 #endif /* RNALFOLD_CMDL_H */