1 /** @file RNAsnoop_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 RNASNOOP_CMDL_H
9 #define RNASNOOP_CMDL_H
11 /* If we use autoconf. */
16 #include <stdio.h> /* for FILE */
20 #endif /* __cplusplus */
22 #ifndef RNASNOOP_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define RNASNOOP_CMDLINE_PARSER_PACKAGE "RNAsnoop"
27 #ifndef RNASNOOP_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define RNASNOOP_CMDLINE_PARSER_PACKAGE_NAME "RNAsnoop"
32 #ifndef RNASNOOP_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define RNASNOOP_CMDLINE_PARSER_VERSION VERSION
37 /** @brief Where the command line options are stored */
38 struct RNAsnoop_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 int alignmentLength_arg; /**< @brief Limit the extent of the interactions to L nucleotides (default='25'). */
44 char * alignmentLength_orig; /**< @brief Limit the extent of the interactions to L nucleotides original value given at command line. */
45 const char *alignmentLength_help; /**< @brief Limit the extent of the interactions to L nucleotides help description. */
46 int constraint_flag; /**< @brief Calculate the stem structure subject to constraints.
48 const char *constraint_help; /**< @brief Calculate the stem structure subject to constraints.
50 char * query_arg; /**< @brief File containing the query sequence.
52 char * query_orig; /**< @brief File containing the query sequence.
53 original value given at command line. */
54 const char *query_help; /**< @brief File containing the query sequence.
56 char * target_arg; /**< @brief File containing the target sequence.
58 char * target_orig; /**< @brief File containing the target sequence.
59 original value given at command line. */
60 const char *target_help; /**< @brief File containing the target sequence.
62 char * suffix_arg; /**< @brief Specificy the suffix that was added by RNAup to the accessibility files
64 (default='_u1_to_30.out'). */
65 char * suffix_orig; /**< @brief Specificy the suffix that was added by RNAup to the accessibility files
67 original value given at command line. */
68 const char *suffix_help; /**< @brief Specificy the suffix that was added by RNAup to the accessibility files
71 char * from_RNAplfold_arg; /**< @brief Specify the directory where accessibility profile generated by RNAplfold are found
74 char * from_RNAplfold_orig; /**< @brief Specify the directory where accessibility profile generated by RNAplfold are found
76 original value given at command line. */
77 const char *from_RNAplfold_help; /**< @brief Specify the directory where accessibility profile generated by RNAplfold are found
80 int alignment_mode_flag; /**< @brief Specify if RNAsnoop gets alignments or single sequences as input
83 const char *alignment_mode_help; /**< @brief Specify if RNAsnoop gets alignments or single sequences as input
86 int fast_folding_arg; /**< @brief Speedup of the target search (default='1'). */
87 char * fast_folding_orig; /**< @brief Speedup of the target search original value given at command line. */
88 const char *fast_folding_help; /**< @brief Speedup of the target search help description. */
89 int extension_cost_arg; /**< @brief Cost to add to each nucleotide in a duplex (default='0'). */
90 char * extension_cost_orig; /**< @brief Cost to add to each nucleotide in a duplex original value given at command line. */
91 const char *extension_cost_help; /**< @brief Cost to add to each nucleotide in a duplex help description. */
92 int minimal_right_duplex_arg; /**< @brief Minimal Right Duplex Energy
95 char * minimal_right_duplex_orig; /**< @brief Minimal Right Duplex Energy
97 original value given at command line. */
98 const char *minimal_right_duplex_help; /**< @brief Minimal Right Duplex Energy
101 int minimal_loop_energy_arg; /**< @brief Minimal Right Duplex Energy
103 char * minimal_loop_energy_orig; /**< @brief Minimal Right Duplex Energy
104 original value given at command line. */
105 const char *minimal_loop_energy_help; /**< @brief Minimal Right Duplex Energy
107 int minimal_left_duplex_arg; /**< @brief Minimal Left Duplex Energy
110 char * minimal_left_duplex_orig; /**< @brief Minimal Left Duplex Energy
112 original value given at command line. */
113 const char *minimal_left_duplex_help; /**< @brief Minimal Left Duplex Energy
116 int minimal_duplex_arg; /**< @brief Minimal Duplex Energy
118 (default='-1090'). */
119 char * minimal_duplex_orig; /**< @brief Minimal Duplex Energy
121 original value given at command line. */
122 const char *minimal_duplex_help; /**< @brief Minimal Duplex Energy
125 int duplex_distance_arg; /**< @brief Distance between target 3' ends of two consecutive duplexes
127 char * duplex_distance_orig; /**< @brief Distance between target 3' ends of two consecutive duplexes
128 original value given at command line. */
129 const char *duplex_distance_help; /**< @brief Distance between target 3' ends of two consecutive duplexes
131 int minimal_stem_length_arg; /**< @brief Minimal snoRNA stem length
134 char * minimal_stem_length_orig; /**< @brief Minimal snoRNA stem length
136 original value given at command line. */
137 const char *minimal_stem_length_help; /**< @brief Minimal snoRNA stem length
140 int maximal_stem_length_arg; /**< @brief Maximal snoRNA stem length
143 char * maximal_stem_length_orig; /**< @brief Maximal snoRNA stem length
145 original value given at command line. */
146 const char *maximal_stem_length_help; /**< @brief Maximal snoRNA stem length
149 int minimal_duplex_box_length_arg; /**< @brief Minimal distance between the duplex end and the H/ACA box
152 char * minimal_duplex_box_length_orig; /**< @brief Minimal distance between the duplex end and the H/ACA box
154 original value given at command line. */
155 const char *minimal_duplex_box_length_help; /**< @brief Minimal distance between the duplex end and the H/ACA box
158 int maximal_duplex_box_length_arg; /**< @brief Maximal distance between the duplex end and the H/ACA box
161 char * maximal_duplex_box_length_orig; /**< @brief Maximal distance between the duplex end and the H/ACA box
163 original value given at command line. */
164 const char *maximal_duplex_box_length_help; /**< @brief Maximal distance between the duplex end and the H/ACA box
167 int minimal_snoRNA_stem_loop_length_arg; /**< @brief Minimal number of nucleotides between the beginning of stem loop and
168 beginning of the snoRNA sequence
171 char * minimal_snoRNA_stem_loop_length_orig; /**< @brief Minimal number of nucleotides between the beginning of stem loop and
172 beginning of the snoRNA sequence
174 original value given at command line. */
175 const char *minimal_snoRNA_stem_loop_length_help; /**< @brief Minimal number of nucleotides between the beginning of stem loop and
176 beginning of the snoRNA sequence
179 int maximal_snoRNA_stem_loop_length_arg; /**< @brief Maximal number of nucleotides between the beginning of stem loop and
180 beginning of the snoRNA sequence
182 (default='100000'). */
183 char * maximal_snoRNA_stem_loop_length_orig; /**< @brief Maximal number of nucleotides between the beginning of stem loop and
184 beginning of the snoRNA sequence
186 original value given at command line. */
187 const char *maximal_snoRNA_stem_loop_length_help; /**< @brief Maximal number of nucleotides between the beginning of stem loop and
188 beginning of the snoRNA sequence
191 int minimal_snoRNA_duplex_length_arg; /**< @brief Minimal distance between duplex start and snoRNA
194 char * minimal_snoRNA_duplex_length_orig; /**< @brief Minimal distance between duplex start and snoRNA
196 original value given at command line. */
197 const char *minimal_snoRNA_duplex_length_help; /**< @brief Minimal distance between duplex start and snoRNA
200 int maximal_snoRNA_duplex_length_arg; /**< @brief Maximal distance between duplex start and snoRNA
203 char * maximal_snoRNA_duplex_length_orig; /**< @brief Maximal distance between duplex start and snoRNA
205 original value given at command line. */
206 const char *maximal_snoRNA_duplex_length_help; /**< @brief Maximal distance between duplex start and snoRNA
209 int minimal_duplex_stem_energy_arg; /**< @brief Minimal duplex stem energy
211 (default='-1370'). */
212 char * minimal_duplex_stem_energy_orig; /**< @brief Minimal duplex stem energy
214 original value given at command line. */
215 const char *minimal_duplex_stem_energy_help; /**< @brief Minimal duplex stem energy
218 int minimal_total_energy_arg; /**< @brief Minimal total energy
220 (default='100000'). */
221 char * minimal_total_energy_orig; /**< @brief Minimal total energy
223 original value given at command line. */
224 const char *minimal_total_energy_help; /**< @brief Minimal total energy
227 int maximal_stem_asymmetry_arg; /**< @brief Maximal snoRNA stem asymmetry
230 char * maximal_stem_asymmetry_orig; /**< @brief Maximal snoRNA stem asymmetry
232 original value given at command line. */
233 const char *maximal_stem_asymmetry_help; /**< @brief Maximal snoRNA stem asymmetry
236 int minimal_lower_stem_energy_arg; /**< @brief Minimal lower stem energy
238 (default='100000'). */
239 char * minimal_lower_stem_energy_orig; /**< @brief Minimal lower stem energy
241 original value given at command line. */
242 const char *minimal_lower_stem_energy_help; /**< @brief Minimal lower stem energy
245 double energy_threshold_arg; /**< @brief Maximal energy difference between the mfe and the desired suboptimal
247 char * energy_threshold_orig; /**< @brief Maximal energy difference between the mfe and the desired suboptimal
248 original value given at command line. */
249 const char *energy_threshold_help; /**< @brief Maximal energy difference between the mfe and the desired suboptimal
251 int produce_ps_flag; /**< @brief Draw annotated 2D structures for a list of dot-bracket structures
253 const char *produce_ps_help; /**< @brief Draw annotated 2D structures for a list of dot-bracket structures
255 char * output_directory_arg; /**< @brief Set where the generated figures should be stored
258 char * output_directory_orig; /**< @brief Set where the generated figures should be stored
260 original value given at command line. */
261 const char *output_directory_help; /**< @brief Set where the generated figures should be stored
264 int direct_redraw_flag; /**< @brief Outputs 2D interactions concurrently with the interaction calculation for each suboptimal interaction. The -I option should be preferred.
267 const char *direct_redraw_help; /**< @brief Outputs 2D interactions concurrently with the interaction calculation for each suboptimal interaction. The -I option should be preferred.
270 char * from_RNAup_arg; /**< @brief Specify the directory where accessibility profiles generated by RNAup are found
273 char * from_RNAup_orig; /**< @brief Specify the directory where accessibility profiles generated by RNAup are found
275 original value given at command line. */
276 const char *from_RNAup_help; /**< @brief Specify the directory where accessibility profiles generated by RNAup are found
280 unsigned int help_given ; /**< @brief Whether help was given. */
281 unsigned int detailed_help_given ; /**< @brief Whether detailed-help was given. */
282 unsigned int version_given ; /**< @brief Whether version was given. */
283 unsigned int alignmentLength_given ; /**< @brief Whether alignmentLength was given. */
284 unsigned int constraint_given ; /**< @brief Whether constraint was given. */
285 unsigned int query_given ; /**< @brief Whether query was given. */
286 unsigned int target_given ; /**< @brief Whether target was given. */
287 unsigned int suffix_given ; /**< @brief Whether suffix was given. */
288 unsigned int from_RNAplfold_given ; /**< @brief Whether from-RNAplfold was given. */
289 unsigned int alignment_mode_given ; /**< @brief Whether alignment-mode was given. */
290 unsigned int fast_folding_given ; /**< @brief Whether fast-folding was given. */
291 unsigned int extension_cost_given ; /**< @brief Whether extension-cost was given. */
292 unsigned int minimal_right_duplex_given ; /**< @brief Whether minimal-right-duplex was given. */
293 unsigned int minimal_loop_energy_given ; /**< @brief Whether minimal-loop-energy was given. */
294 unsigned int minimal_left_duplex_given ; /**< @brief Whether minimal-left-duplex was given. */
295 unsigned int minimal_duplex_given ; /**< @brief Whether minimal-duplex was given. */
296 unsigned int duplex_distance_given ; /**< @brief Whether duplex-distance was given. */
297 unsigned int minimal_stem_length_given ; /**< @brief Whether minimal-stem-length was given. */
298 unsigned int maximal_stem_length_given ; /**< @brief Whether maximal-stem-length was given. */
299 unsigned int minimal_duplex_box_length_given ; /**< @brief Whether minimal-duplex-box-length was given. */
300 unsigned int maximal_duplex_box_length_given ; /**< @brief Whether maximal-duplex-box-length was given. */
301 unsigned int minimal_snoRNA_stem_loop_length_given ; /**< @brief Whether minimal-snoRNA-stem-loop-length was given. */
302 unsigned int maximal_snoRNA_stem_loop_length_given ; /**< @brief Whether maximal-snoRNA-stem-loop-length was given. */
303 unsigned int minimal_snoRNA_duplex_length_given ; /**< @brief Whether minimal-snoRNA-duplex-length was given. */
304 unsigned int maximal_snoRNA_duplex_length_given ; /**< @brief Whether maximal-snoRNA-duplex-length was given. */
305 unsigned int minimal_duplex_stem_energy_given ; /**< @brief Whether minimal-duplex-stem-energy was given. */
306 unsigned int minimal_total_energy_given ; /**< @brief Whether minimal-total-energy was given. */
307 unsigned int maximal_stem_asymmetry_given ; /**< @brief Whether maximal-stem-asymmetry was given. */
308 unsigned int minimal_lower_stem_energy_given ; /**< @brief Whether minimal-lower-stem-energy was given. */
309 unsigned int energy_threshold_given ; /**< @brief Whether energy-threshold was given. */
310 unsigned int produce_ps_given ; /**< @brief Whether produce-ps was given. */
311 unsigned int output_directory_given ; /**< @brief Whether output_directory was given. */
312 unsigned int direct_redraw_given ; /**< @brief Whether direct-redraw was given. */
313 unsigned int from_RNAup_given ; /**< @brief Whether from-RNAup was given. */
317 /** @brief The additional parameters to pass to parser functions */
318 struct RNAsnoop_cmdline_parser_params
320 int override; /**< @brief whether to override possibly already present options (default 0) */
321 int initialize; /**< @brief whether to initialize the option structure RNAsnoop_args_info (default 1) */
322 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
323 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure RNAsnoop_args_info (default 0) */
324 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
327 /** @brief the purpose string of the program */
328 extern const char *RNAsnoop_args_info_purpose;
329 /** @brief the usage string of the program */
330 extern const char *RNAsnoop_args_info_usage;
331 /** @brief all the lines making the help output */
332 extern const char *RNAsnoop_args_info_help[];
333 /** @brief all the lines making the detailed help output (including hidden options and details) */
334 extern const char *RNAsnoop_args_info_detailed_help[];
337 * The command line parser
338 * @param argc the number of command line options
339 * @param argv the command line options
340 * @param args_info the structure where option information will be stored
341 * @return 0 if everything went fine, NON 0 if an error took place
343 int RNAsnoop_cmdline_parser (int argc, char **argv,
344 struct RNAsnoop_args_info *args_info);
347 * The command line parser (version with additional parameters - deprecated)
348 * @param argc the number of command line options
349 * @param argv the command line options
350 * @param args_info the structure where option information will be stored
351 * @param override whether to override possibly already present options
352 * @param initialize whether to initialize the option structure my_args_info
353 * @param check_required whether to check that all required options were provided
354 * @return 0 if everything went fine, NON 0 if an error took place
355 * @deprecated use RNAsnoop_cmdline_parser_ext() instead
357 int RNAsnoop_cmdline_parser2 (int argc, char **argv,
358 struct RNAsnoop_args_info *args_info,
359 int override, int initialize, int check_required);
362 * The command line parser (version with additional parameters)
363 * @param argc the number of command line options
364 * @param argv the command line options
365 * @param args_info the structure where option information will be stored
366 * @param params additional parameters for the parser
367 * @return 0 if everything went fine, NON 0 if an error took place
369 int RNAsnoop_cmdline_parser_ext (int argc, char **argv,
370 struct RNAsnoop_args_info *args_info,
371 struct RNAsnoop_cmdline_parser_params *params);
374 * Save the contents of the option struct into an already open FILE stream.
375 * @param outfile the stream where to dump options
376 * @param args_info the option struct to dump
377 * @return 0 if everything went fine, NON 0 if an error took place
379 int RNAsnoop_cmdline_parser_dump(FILE *outfile,
380 struct RNAsnoop_args_info *args_info);
383 * Save the contents of the option struct into a (text) file.
384 * This file can be read by the config file parser (if generated by gengetopt)
385 * @param filename the file where to save
386 * @param args_info the option struct to save
387 * @return 0 if everything went fine, NON 0 if an error took place
389 int RNAsnoop_cmdline_parser_file_save(const char *filename,
390 struct RNAsnoop_args_info *args_info);
395 void RNAsnoop_cmdline_parser_print_help(void);
397 * Print the detailed help (including hidden options and details)
399 void RNAsnoop_cmdline_parser_print_detailed_help(void);
403 void RNAsnoop_cmdline_parser_print_version(void);
406 * Initializes all the fields a RNAsnoop_cmdline_parser_params structure
407 * to their default values
408 * @param params the structure to initialize
410 void RNAsnoop_cmdline_parser_params_init(struct RNAsnoop_cmdline_parser_params *params);
413 * Allocates dynamically a RNAsnoop_cmdline_parser_params structure and initializes
414 * all its fields to their default values
415 * @return the created and initialized RNAsnoop_cmdline_parser_params structure
417 struct RNAsnoop_cmdline_parser_params *RNAsnoop_cmdline_parser_params_create(void);
420 * Initializes the passed RNAsnoop_args_info structure's fields
421 * (also set default values for options that have a default)
422 * @param args_info the structure to initialize
424 void RNAsnoop_cmdline_parser_init (struct RNAsnoop_args_info *args_info);
426 * Deallocates the string fields of the RNAsnoop_args_info structure
427 * (but does not deallocate the structure itself)
428 * @param args_info the structure to deallocate
430 void RNAsnoop_cmdline_parser_free (struct RNAsnoop_args_info *args_info);
433 * Checks that all the required options were specified
434 * @param args_info the structure to check
435 * @param prog_name the name of the program that will be used to print
439 int RNAsnoop_cmdline_parser_required (struct RNAsnoop_args_info *args_info,
440 const char *prog_name);
445 #endif /* __cplusplus */
446 #endif /* RNASNOOP_CMDL_H */