1 /** @file RNAPKplex_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 RNAPKPLEX_CMDL_H
9 #define RNAPKPLEX_CMDL_H
11 /* If we use autoconf. */
16 #include <stdio.h> /* for FILE */
20 #endif /* __cplusplus */
22 #ifndef PKPLEX_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define PKPLEX_CMDLINE_PARSER_PACKAGE "RNAPKplex"
27 #ifndef PKPLEX_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define PKPLEX_CMDLINE_PARSER_PACKAGE_NAME "RNAPKplex"
32 #ifndef PKPLEX_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define PKPLEX_CMDLINE_PARSER_VERSION VERSION
37 /** @brief Where the command line options are stored */
38 struct PKplex_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 float cutoff_arg; /**< @brief Report only base pairs with an average probability > cutoff in the dot plot
46 char * cutoff_orig; /**< @brief Report only base pairs with an average probability > cutoff in the dot plot
48 original value given at command line. */
49 const char *cutoff_help; /**< @brief Report only base pairs with an average probability > cutoff in the dot plot
52 double temp_arg; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
55 char * temp_orig; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
57 original value given at command line. */
58 const char *temp_help; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
61 int noTetra_flag; /**< @brief Do not include special stabilizing energies for certain tetra-loops. Mostly for testing.
64 const char *noTetra_help; /**< @brief Do not include special stabilizing energies for certain tetra-loops. Mostly for testing.
67 int noLP_flag; /**< @brief Produce structures without lonely pairs (helices of length 1).
69 const char *noLP_help; /**< @brief Produce structures without lonely pairs (helices of length 1).
71 int noGU_flag; /**< @brief Do not allow GU pairs
74 const char *noGU_help; /**< @brief Do not allow GU pairs
77 int noClosingGU_flag; /**< @brief Do not allow GU pairs at the end of helices
80 const char *noClosingGU_help; /**< @brief Do not allow GU pairs at the end of helices
83 int noconv_flag; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
86 const char *noconv_help; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
89 char * nsp_arg; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
91 char * nsp_orig; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
92 original value given at command line. */
93 const char *nsp_help; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
95 double energyCutoff_arg; /**< @brief Energy cutoff or pseudoknot initiation cost. Minimum energy gain of a pseudoknot interaction for it to be returned. Pseudoknots with smaller energy gains are rejected.
98 char * energyCutoff_orig; /**< @brief Energy cutoff or pseudoknot initiation cost. Minimum energy gain of a pseudoknot interaction for it to be returned. Pseudoknots with smaller energy gains are rejected.
100 original value given at command line. */
101 const char *energyCutoff_help; /**< @brief Energy cutoff or pseudoknot initiation cost. Minimum energy gain of a pseudoknot interaction for it to be returned. Pseudoknots with smaller energy gains are rejected.
104 char * paramFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
106 char * paramFile_orig; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
107 original value given at command line. */
108 const char *paramFile_help; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
110 int verbose_flag; /**< @brief print verbose output
112 const char *verbose_help; /**< @brief print verbose output
114 double subopts_arg; /**< @brief print suboptimal structures whose energy difference of the pseudoknot to the optimum pseudoknot is smaller than the given value.
116 char * subopts_orig; /**< @brief print suboptimal structures whose energy difference of the pseudoknot to the optimum pseudoknot is smaller than the given value.
117 original value given at command line. */
118 const char *subopts_help; /**< @brief print suboptimal structures whose energy difference of the pseudoknot to the optimum pseudoknot is smaller than the given value.
121 unsigned int help_given ; /**< @brief Whether help was given. */
122 unsigned int detailed_help_given ; /**< @brief Whether detailed-help was given. */
123 unsigned int version_given ; /**< @brief Whether version was given. */
124 unsigned int cutoff_given ; /**< @brief Whether cutoff was given. */
125 unsigned int temp_given ; /**< @brief Whether temp was given. */
126 unsigned int noTetra_given ; /**< @brief Whether noTetra was given. */
127 unsigned int noLP_given ; /**< @brief Whether noLP was given. */
128 unsigned int noGU_given ; /**< @brief Whether noGU was given. */
129 unsigned int noClosingGU_given ; /**< @brief Whether noClosingGU was given. */
130 unsigned int noconv_given ; /**< @brief Whether noconv was given. */
131 unsigned int nsp_given ; /**< @brief Whether nsp was given. */
132 unsigned int energyCutoff_given ; /**< @brief Whether energyCutoff was given. */
133 unsigned int paramFile_given ; /**< @brief Whether paramFile was given. */
134 unsigned int verbose_given ; /**< @brief Whether verbose was given. */
135 unsigned int subopts_given ; /**< @brief Whether subopts was given. */
139 /** @brief The additional parameters to pass to parser functions */
140 struct PKplex_cmdline_parser_params
142 int override; /**< @brief whether to override possibly already present options (default 0) */
143 int initialize; /**< @brief whether to initialize the option structure PKplex_args_info (default 1) */
144 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
145 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure PKplex_args_info (default 0) */
146 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
149 /** @brief the purpose string of the program */
150 extern const char *PKplex_args_info_purpose;
151 /** @brief the usage string of the program */
152 extern const char *PKplex_args_info_usage;
153 /** @brief all the lines making the help output */
154 extern const char *PKplex_args_info_help[];
155 /** @brief all the lines making the detailed help output (including hidden options and details) */
156 extern const char *PKplex_args_info_detailed_help[];
159 * The command line parser
160 * @param argc the number of command line options
161 * @param argv the command line options
162 * @param args_info the structure where option information will be stored
163 * @return 0 if everything went fine, NON 0 if an error took place
165 int PKplex_cmdline_parser (int argc, char **argv,
166 struct PKplex_args_info *args_info);
169 * The command line parser (version with additional parameters - deprecated)
170 * @param argc the number of command line options
171 * @param argv the command line options
172 * @param args_info the structure where option information will be stored
173 * @param override whether to override possibly already present options
174 * @param initialize whether to initialize the option structure my_args_info
175 * @param check_required whether to check that all required options were provided
176 * @return 0 if everything went fine, NON 0 if an error took place
177 * @deprecated use PKplex_cmdline_parser_ext() instead
179 int PKplex_cmdline_parser2 (int argc, char **argv,
180 struct PKplex_args_info *args_info,
181 int override, int initialize, int check_required);
184 * The command line parser (version with additional parameters)
185 * @param argc the number of command line options
186 * @param argv the command line options
187 * @param args_info the structure where option information will be stored
188 * @param params additional parameters for the parser
189 * @return 0 if everything went fine, NON 0 if an error took place
191 int PKplex_cmdline_parser_ext (int argc, char **argv,
192 struct PKplex_args_info *args_info,
193 struct PKplex_cmdline_parser_params *params);
196 * Save the contents of the option struct into an already open FILE stream.
197 * @param outfile the stream where to dump options
198 * @param args_info the option struct to dump
199 * @return 0 if everything went fine, NON 0 if an error took place
201 int PKplex_cmdline_parser_dump(FILE *outfile,
202 struct PKplex_args_info *args_info);
205 * Save the contents of the option struct into a (text) file.
206 * This file can be read by the config file parser (if generated by gengetopt)
207 * @param filename the file where to save
208 * @param args_info the option struct to save
209 * @return 0 if everything went fine, NON 0 if an error took place
211 int PKplex_cmdline_parser_file_save(const char *filename,
212 struct PKplex_args_info *args_info);
217 void PKplex_cmdline_parser_print_help(void);
219 * Print the detailed help (including hidden options and details)
221 void PKplex_cmdline_parser_print_detailed_help(void);
225 void PKplex_cmdline_parser_print_version(void);
228 * Initializes all the fields a PKplex_cmdline_parser_params structure
229 * to their default values
230 * @param params the structure to initialize
232 void PKplex_cmdline_parser_params_init(struct PKplex_cmdline_parser_params *params);
235 * Allocates dynamically a PKplex_cmdline_parser_params structure and initializes
236 * all its fields to their default values
237 * @return the created and initialized PKplex_cmdline_parser_params structure
239 struct PKplex_cmdline_parser_params *PKplex_cmdline_parser_params_create(void);
242 * Initializes the passed PKplex_args_info structure's fields
243 * (also set default values for options that have a default)
244 * @param args_info the structure to initialize
246 void PKplex_cmdline_parser_init (struct PKplex_args_info *args_info);
248 * Deallocates the string fields of the PKplex_args_info structure
249 * (but does not deallocate the structure itself)
250 * @param args_info the structure to deallocate
252 void PKplex_cmdline_parser_free (struct PKplex_args_info *args_info);
255 * Checks that all the required options were specified
256 * @param args_info the structure to check
257 * @param prog_name the name of the program that will be used to print
261 int PKplex_cmdline_parser_required (struct PKplex_args_info *args_info,
262 const char *prog_name);
267 #endif /* __cplusplus */
268 #endif /* RNAPKPLEX_CMDL_H */