1 /** @file RNAplex_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 RNAPLEX_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define RNAPLEX_CMDLINE_PARSER_PACKAGE "RNAplex"
27 #ifndef RNAPLEX_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define RNAPLEX_CMDLINE_PARSER_PACKAGE_NAME "RNAplex"
32 #ifndef RNAPLEX_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define RNAPLEX_CMDLINE_PARSER_VERSION VERSION
37 /** @brief Where the command line options are stored */
38 struct RNAplex_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 *version_help; /**< @brief Print version and exit help description. */
43 char * query_arg; /**< @brief File containing the query sequence.
45 char * query_orig; /**< @brief File containing the query sequence.
46 original value given at command line. */
47 const char *query_help; /**< @brief File containing the query sequence.
49 char * target_arg; /**< @brief File containing the target sequence.
51 char * target_orig; /**< @brief File containing the target sequence.
52 original value given at command line. */
53 const char *target_help; /**< @brief File containing the target sequence.
55 char * accessibility_dir_arg; /**< @brief Location of the accessibility profiles.
57 char * accessibility_dir_orig; /**< @brief Location of the accessibility profiles.
58 original value given at command line. */
59 const char *accessibility_dir_help; /**< @brief Location of the accessibility profiles.
61 int binary_flag; /**< @brief Allow the reading and parsing of memory dumped opening energy file
63 const char *binary_help; /**< @brief Allow the reading and parsing of memory dumped opening energy file
65 char * paramFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
67 char * paramFile_orig; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
68 original value given at command line. */
69 const char *paramFile_help; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
71 double temp_arg; /**< @brief Rescale energy parameters to a temperature T. Default is 37C.
74 char * temp_orig; /**< @brief Rescale energy parameters to a temperature T. Default is 37C.
76 original value given at command line. */
77 const char *temp_help; /**< @brief Rescale energy parameters to a temperature T. Default is 37C.
80 int interaction_length_arg; /**< @brief Maximal length of an interaction
82 char * interaction_length_orig; /**< @brief Maximal length of an interaction
83 original value given at command line. */
84 const char *interaction_length_help; /**< @brief Maximal length of an interaction
86 int extension_cost_arg; /**< @brief Cost to add to each nucleotide in a duplex
88 char * extension_cost_orig; /**< @brief Cost to add to each nucleotide in a duplex
89 original value given at command line. */
90 const char *extension_cost_help; /**< @brief Cost to add to each nucleotide in a duplex
92 int probe_mode_flag; /**< @brief Compute Tm for probes (default=off). */
93 const char *probe_mode_help; /**< @brief Compute Tm for probes help description. */
94 double probe_concentration_arg; /**< @brief Set the probe concentration for the Tm computation
97 char * probe_concentration_orig; /**< @brief Set the probe concentration for the Tm computation
99 original value given at command line. */
100 const char *probe_concentration_help; /**< @brief Set the probe concentration for the Tm computation
103 double na_concentration_arg; /**< @brief Set the Na+ concentration for the Tm computation
106 char * na_concentration_orig; /**< @brief Set the Na+ concentration for the Tm computation
108 original value given at command line. */
109 const char *na_concentration_help; /**< @brief Set the Na+ concentration for the Tm computation
112 double mg_concentration_arg; /**< @brief Set the Mg2+ concentration for the Tm computation
115 char * mg_concentration_orig; /**< @brief Set the Mg2+ concentration for the Tm computation
117 original value given at command line. */
118 const char *mg_concentration_help; /**< @brief Set the Mg2+ concentration for the Tm computation
121 double k_concentration_arg; /**< @brief Set the K+ concentration for the Tm computation
124 char * k_concentration_orig; /**< @brief Set the K+ concentration for the Tm computation
126 original value given at command line. */
127 const char *k_concentration_help; /**< @brief Set the K+ concentration for the Tm computation
130 double tris_concentration_arg; /**< @brief Set the tris+ concentration for the Tm computation
133 char * tris_concentration_orig; /**< @brief Set the tris+ concentration for the Tm computation
135 original value given at command line. */
136 const char *tris_concentration_help; /**< @brief Set the tris+ concentration for the Tm computation
139 int fast_folding_arg; /**< @brief Speedup of the target search
141 char * fast_folding_orig; /**< @brief Speedup of the target search
142 original value given at command line. */
143 const char *fast_folding_help; /**< @brief Speedup of the target search
145 double scale_accessibility_arg; /**< @brief Rescale all opening energy by a factor V
147 char * scale_accessibility_orig; /**< @brief Rescale all opening energy by a factor V
148 original value given at command line. */
149 const char *scale_accessibility_help; /**< @brief Rescale all opening energy by a factor V
151 int constraint_flag; /**< @brief Calculate structures subject to constraints.
153 const char *constraint_help; /**< @brief Calculate structures subject to constraints.
155 int alignment_mode_flag; /**< @brief Tells RNAplex to compute interactions based on alignments
157 const char *alignment_mode_help; /**< @brief Tells RNAplex to compute interactions based on alignments
159 int convert_to_bin_flag; /**< @brief If set, RNAplex will convert all opening energy file in a directory set by the -a option into binary opening energy files
161 const char *convert_to_bin_help; /**< @brief If set, RNAplex will convert all opening energy file in a directory set by the -a option into binary opening energy files
163 int duplex_distance_arg; /**< @brief Distance between target 3' ends of two consecutive duplexes
165 char * duplex_distance_orig; /**< @brief Distance between target 3' ends of two consecutive duplexes
166 original value given at command line. */
167 const char *duplex_distance_help; /**< @brief Distance between target 3' ends of two consecutive duplexes
169 double energy_threshold_arg; /**< @brief Minimal energy for a duplex to be returned
170 (default='-100000'). */
171 char * energy_threshold_orig; /**< @brief Minimal energy for a duplex to be returned
172 original value given at command line. */
173 const char *energy_threshold_help; /**< @brief Minimal energy for a duplex to be returned
175 char * produce_ps_arg; /**< @brief Draw an alignment annotated interaction from RNAplex
177 char * produce_ps_orig; /**< @brief Draw an alignment annotated interaction from RNAplex
178 original value given at command line. */
179 const char *produce_ps_help; /**< @brief Draw an alignment annotated interaction from RNAplex
181 int WindowLength_arg; /**< @brief Tells how large the region around the target site should be for redrawing the alignment interaction
183 char * WindowLength_orig; /**< @brief Tells how large the region around the target site should be for redrawing the alignment interaction
184 original value given at command line. */
185 const char *WindowLength_help; /**< @brief Tells how large the region around the target site should be for redrawing the alignment interaction
188 unsigned int help_given ; /**< @brief Whether help was given. */
189 unsigned int detailed_help_given ; /**< @brief Whether detailed-help was given. */
190 unsigned int version_given ; /**< @brief Whether version was given. */
191 unsigned int query_given ; /**< @brief Whether query was given. */
192 unsigned int target_given ; /**< @brief Whether target was given. */
193 unsigned int accessibility_dir_given ; /**< @brief Whether accessibility-dir was given. */
194 unsigned int binary_given ; /**< @brief Whether binary was given. */
195 unsigned int paramFile_given ; /**< @brief Whether paramFile was given. */
196 unsigned int temp_given ; /**< @brief Whether temp was given. */
197 unsigned int interaction_length_given ; /**< @brief Whether interaction-length was given. */
198 unsigned int extension_cost_given ; /**< @brief Whether extension-cost was given. */
199 unsigned int probe_mode_given ; /**< @brief Whether probe-mode was given. */
200 unsigned int probe_concentration_given ; /**< @brief Whether probe-concentration was given. */
201 unsigned int na_concentration_given ; /**< @brief Whether na-concentration was given. */
202 unsigned int mg_concentration_given ; /**< @brief Whether mg-concentration was given. */
203 unsigned int k_concentration_given ; /**< @brief Whether k-concentration was given. */
204 unsigned int tris_concentration_given ; /**< @brief Whether tris-concentration was given. */
205 unsigned int fast_folding_given ; /**< @brief Whether fast-folding was given. */
206 unsigned int scale_accessibility_given ; /**< @brief Whether scale-accessibility was given. */
207 unsigned int constraint_given ; /**< @brief Whether constraint was given. */
208 unsigned int alignment_mode_given ; /**< @brief Whether alignment-mode was given. */
209 unsigned int convert_to_bin_given ; /**< @brief Whether convert-to-bin was given. */
210 unsigned int duplex_distance_given ; /**< @brief Whether duplex-distance was given. */
211 unsigned int energy_threshold_given ; /**< @brief Whether energy-threshold was given. */
212 unsigned int produce_ps_given ; /**< @brief Whether produce-ps was given. */
213 unsigned int WindowLength_given ; /**< @brief Whether WindowLength was given. */
217 /** @brief The additional parameters to pass to parser functions */
218 struct RNAplex_cmdline_parser_params
220 int override; /**< @brief whether to override possibly already present options (default 0) */
221 int initialize; /**< @brief whether to initialize the option structure RNAplex_args_info (default 1) */
222 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
223 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure RNAplex_args_info (default 0) */
224 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
227 /** @brief the purpose string of the program */
228 extern const char *RNAplex_args_info_purpose;
229 /** @brief the usage string of the program */
230 extern const char *RNAplex_args_info_usage;
231 /** @brief all the lines making the help output */
232 extern const char *RNAplex_args_info_help[];
233 /** @brief all the lines making the detailed help output (including hidden options and details) */
234 extern const char *RNAplex_args_info_detailed_help[];
237 * The command line parser
238 * @param argc the number of command line options
239 * @param argv the command line options
240 * @param args_info the structure where option information will be stored
241 * @return 0 if everything went fine, NON 0 if an error took place
243 int RNAplex_cmdline_parser (int argc, char **argv,
244 struct RNAplex_args_info *args_info);
247 * The command line parser (version with additional parameters - deprecated)
248 * @param argc the number of command line options
249 * @param argv the command line options
250 * @param args_info the structure where option information will be stored
251 * @param override whether to override possibly already present options
252 * @param initialize whether to initialize the option structure my_args_info
253 * @param check_required whether to check that all required options were provided
254 * @return 0 if everything went fine, NON 0 if an error took place
255 * @deprecated use RNAplex_cmdline_parser_ext() instead
257 int RNAplex_cmdline_parser2 (int argc, char **argv,
258 struct RNAplex_args_info *args_info,
259 int override, int initialize, int check_required);
262 * The command line parser (version with additional parameters)
263 * @param argc the number of command line options
264 * @param argv the command line options
265 * @param args_info the structure where option information will be stored
266 * @param params additional parameters for the parser
267 * @return 0 if everything went fine, NON 0 if an error took place
269 int RNAplex_cmdline_parser_ext (int argc, char **argv,
270 struct RNAplex_args_info *args_info,
271 struct RNAplex_cmdline_parser_params *params);
274 * Save the contents of the option struct into an already open FILE stream.
275 * @param outfile the stream where to dump options
276 * @param args_info the option struct to dump
277 * @return 0 if everything went fine, NON 0 if an error took place
279 int RNAplex_cmdline_parser_dump(FILE *outfile,
280 struct RNAplex_args_info *args_info);
283 * Save the contents of the option struct into a (text) file.
284 * This file can be read by the config file parser (if generated by gengetopt)
285 * @param filename the file where to save
286 * @param args_info the option struct to save
287 * @return 0 if everything went fine, NON 0 if an error took place
289 int RNAplex_cmdline_parser_file_save(const char *filename,
290 struct RNAplex_args_info *args_info);
295 void RNAplex_cmdline_parser_print_help(void);
297 * Print the detailed help (including hidden options and details)
299 void RNAplex_cmdline_parser_print_detailed_help(void);
303 void RNAplex_cmdline_parser_print_version(void);
306 * Initializes all the fields a RNAplex_cmdline_parser_params structure
307 * to their default values
308 * @param params the structure to initialize
310 void RNAplex_cmdline_parser_params_init(struct RNAplex_cmdline_parser_params *params);
313 * Allocates dynamically a RNAplex_cmdline_parser_params structure and initializes
314 * all its fields to their default values
315 * @return the created and initialized RNAplex_cmdline_parser_params structure
317 struct RNAplex_cmdline_parser_params *RNAplex_cmdline_parser_params_create(void);
320 * Initializes the passed RNAplex_args_info structure's fields
321 * (also set default values for options that have a default)
322 * @param args_info the structure to initialize
324 void RNAplex_cmdline_parser_init (struct RNAplex_args_info *args_info);
326 * Deallocates the string fields of the RNAplex_args_info structure
327 * (but does not deallocate the structure itself)
328 * @param args_info the structure to deallocate
330 void RNAplex_cmdline_parser_free (struct RNAplex_args_info *args_info);
333 * Checks that all the required options were specified
334 * @param args_info the structure to check
335 * @param prog_name the name of the program that will be used to print
339 int RNAplex_cmdline_parser_required (struct RNAplex_args_info *args_info,
340 const char *prog_name);
345 #endif /* __cplusplus */
346 #endif /* RNAPLEX_CMDL_H */