1 /** @file RNAplfold_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 RNAPLFOLD_CMDL_H
9 #define RNAPLFOLD_CMDL_H
11 /* If we use autoconf. */
16 #include <stdio.h> /* for FILE */
20 #endif /* __cplusplus */
22 #ifndef RNAPLFOLD_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define RNAPLFOLD_CMDLINE_PARSER_PACKAGE "RNAplfold"
27 #ifndef RNAPLFOLD_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define RNAPLFOLD_CMDLINE_PARSER_PACKAGE_NAME "RNAplfold"
32 #ifndef RNAPLFOLD_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define RNAPLFOLD_CMDLINE_PARSER_VERSION VERSION
37 /** @brief Where the command line options are stored */
38 struct RNAplfold_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 winsize_arg; /**< @brief Average the pair probabilities over windows of given size
47 char * winsize_orig; /**< @brief Average the pair probabilities over windows of given size
49 original value given at command line. */
50 const char *winsize_help; /**< @brief Average the pair probabilities over windows of given size
53 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. Defaults to winsize if parameter is omitted
56 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. Defaults to winsize if parameter is omitted
58 original value given at command line. */
59 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. Defaults to winsize if parameter is omitted
62 float cutoff_arg; /**< @brief Report only base pairs with an average probability > cutoff in the dot plot
65 char * cutoff_orig; /**< @brief Report only base pairs with an average probability > cutoff in the dot plot
67 original value given at command line. */
68 const char *cutoff_help; /**< @brief Report only base pairs with an average probability > cutoff in the dot plot
71 int print_onthefly_flag; /**< @brief Save memory by printing out everything during computation.
72 NOTE: activated per default for sequences over 1M bp.
75 const char *print_onthefly_help; /**< @brief Save memory by printing out everything during computation.
76 NOTE: activated per default for sequences over 1M bp.
79 int ulength_arg; /**< @brief Compute the mean probability that regions of length 1 to a given length are unpaired. Output is saved in a _lunp file.
82 char * ulength_orig; /**< @brief Compute the mean probability that regions of length 1 to a given length are unpaired. Output is saved in a _lunp file.
84 original value given at command line. */
85 const char *ulength_help; /**< @brief Compute the mean probability that regions of length 1 to a given length are unpaired. Output is saved in a _lunp file.
88 int opening_energies_flag; /**< @brief Switch output from probabilities to their logarithms, which are NOT exactly the mean energies needed to the respective stretch of bases!
89 NOTE: This actives -u option.
92 const char *opening_energies_help; /**< @brief Switch output from probabilities to their logarithms, which are NOT exactly the mean energies needed to the respective stretch of bases!
93 NOTE: This actives -u option.
96 int plex_output_flag; /**< @brief Create additional output files for RNAplex.
99 const char *plex_output_help; /**< @brief Create additional output files for RNAplex.
102 int noconv_flag; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
105 const char *noconv_help; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
108 double temp_arg; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
111 char * temp_orig; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
113 original value given at command line. */
114 const char *temp_help; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
117 int noTetra_flag; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
120 const char *noTetra_help; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
123 int dangles_arg; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
125 char * dangles_orig; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
126 original value given at command line. */
127 const char *dangles_help; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
129 int noLP_flag; /**< @brief Produce structures without lonely pairs (helices of length 1).
131 const char *noLP_help; /**< @brief Produce structures without lonely pairs (helices of length 1).
133 int noGU_flag; /**< @brief Do not allow GU pairs
136 const char *noGU_help; /**< @brief Do not allow GU pairs
139 int noClosingGU_flag; /**< @brief Do not allow GU pairs at the end of helices
142 const char *noClosingGU_help; /**< @brief Do not allow GU pairs at the end of helices
145 char * paramFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
147 char * paramFile_orig; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
148 original value given at command line. */
149 const char *paramFile_help; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
151 int binaries_flag; /**< @brief Output accessibility profiles in binary format
153 const char *binaries_help; /**< @brief Output accessibility profiles in binary format
154 . help description. */
155 char * nsp_arg; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
157 char * nsp_orig; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
158 original value given at command line. */
159 const char *nsp_help; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
161 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.
164 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.
166 original value given at command line. */
167 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.
170 double betaScale_arg; /**< @brief Set the scaling of the Boltzmann factors
172 char * betaScale_orig; /**< @brief Set the scaling of the Boltzmann factors
173 original value given at command line. */
174 const char *betaScale_help; /**< @brief Set the scaling of the Boltzmann factors
177 unsigned int help_given ; /**< @brief Whether help was given. */
178 unsigned int detailed_help_given ; /**< @brief Whether detailed-help was given. */
179 unsigned int full_help_given ; /**< @brief Whether full-help was given. */
180 unsigned int version_given ; /**< @brief Whether version was given. */
181 unsigned int winsize_given ; /**< @brief Whether winsize was given. */
182 unsigned int span_given ; /**< @brief Whether span was given. */
183 unsigned int cutoff_given ; /**< @brief Whether cutoff was given. */
184 unsigned int print_onthefly_given ; /**< @brief Whether print_onthefly was given. */
185 unsigned int ulength_given ; /**< @brief Whether ulength was given. */
186 unsigned int opening_energies_given ; /**< @brief Whether opening_energies was given. */
187 unsigned int plex_output_given ; /**< @brief Whether plex_output was given. */
188 unsigned int noconv_given ; /**< @brief Whether noconv was given. */
189 unsigned int temp_given ; /**< @brief Whether temp was given. */
190 unsigned int noTetra_given ; /**< @brief Whether noTetra was given. */
191 unsigned int dangles_given ; /**< @brief Whether dangles was given. */
192 unsigned int noLP_given ; /**< @brief Whether noLP was given. */
193 unsigned int noGU_given ; /**< @brief Whether noGU was given. */
194 unsigned int noClosingGU_given ; /**< @brief Whether noClosingGU was given. */
195 unsigned int paramFile_given ; /**< @brief Whether paramFile was given. */
196 unsigned int binaries_given ; /**< @brief Whether binaries was given. */
197 unsigned int nsp_given ; /**< @brief Whether nsp was given. */
198 unsigned int energyModel_given ; /**< @brief Whether energyModel was given. */
199 unsigned int betaScale_given ; /**< @brief Whether betaScale was given. */
203 /** @brief The additional parameters to pass to parser functions */
204 struct RNAplfold_cmdline_parser_params
206 int override; /**< @brief whether to override possibly already present options (default 0) */
207 int initialize; /**< @brief whether to initialize the option structure RNAplfold_args_info (default 1) */
208 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
209 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure RNAplfold_args_info (default 0) */
210 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
213 /** @brief the purpose string of the program */
214 extern const char *RNAplfold_args_info_purpose;
215 /** @brief the usage string of the program */
216 extern const char *RNAplfold_args_info_usage;
217 /** @brief all the lines making the help output */
218 extern const char *RNAplfold_args_info_help[];
219 /** @brief all the lines making the full help output (including hidden options) */
220 extern const char *RNAplfold_args_info_full_help[];
221 /** @brief all the lines making the detailed help output (including hidden options and details) */
222 extern const char *RNAplfold_args_info_detailed_help[];
225 * The command line parser
226 * @param argc the number of command line options
227 * @param argv the command line options
228 * @param args_info the structure where option information will be stored
229 * @return 0 if everything went fine, NON 0 if an error took place
231 int RNAplfold_cmdline_parser (int argc, char **argv,
232 struct RNAplfold_args_info *args_info);
235 * The command line parser (version with additional parameters - deprecated)
236 * @param argc the number of command line options
237 * @param argv the command line options
238 * @param args_info the structure where option information will be stored
239 * @param override whether to override possibly already present options
240 * @param initialize whether to initialize the option structure my_args_info
241 * @param check_required whether to check that all required options were provided
242 * @return 0 if everything went fine, NON 0 if an error took place
243 * @deprecated use RNAplfold_cmdline_parser_ext() instead
245 int RNAplfold_cmdline_parser2 (int argc, char **argv,
246 struct RNAplfold_args_info *args_info,
247 int override, int initialize, int check_required);
250 * The command line parser (version with additional parameters)
251 * @param argc the number of command line options
252 * @param argv the command line options
253 * @param args_info the structure where option information will be stored
254 * @param params additional parameters for the parser
255 * @return 0 if everything went fine, NON 0 if an error took place
257 int RNAplfold_cmdline_parser_ext (int argc, char **argv,
258 struct RNAplfold_args_info *args_info,
259 struct RNAplfold_cmdline_parser_params *params);
262 * Save the contents of the option struct into an already open FILE stream.
263 * @param outfile the stream where to dump options
264 * @param args_info the option struct to dump
265 * @return 0 if everything went fine, NON 0 if an error took place
267 int RNAplfold_cmdline_parser_dump(FILE *outfile,
268 struct RNAplfold_args_info *args_info);
271 * Save the contents of the option struct into a (text) file.
272 * This file can be read by the config file parser (if generated by gengetopt)
273 * @param filename the file where to save
274 * @param args_info the option struct to save
275 * @return 0 if everything went fine, NON 0 if an error took place
277 int RNAplfold_cmdline_parser_file_save(const char *filename,
278 struct RNAplfold_args_info *args_info);
283 void RNAplfold_cmdline_parser_print_help(void);
285 * Print the full help (including hidden options)
287 void RNAplfold_cmdline_parser_print_full_help(void);
289 * Print the detailed help (including hidden options and details)
291 void RNAplfold_cmdline_parser_print_detailed_help(void);
295 void RNAplfold_cmdline_parser_print_version(void);
298 * Initializes all the fields a RNAplfold_cmdline_parser_params structure
299 * to their default values
300 * @param params the structure to initialize
302 void RNAplfold_cmdline_parser_params_init(struct RNAplfold_cmdline_parser_params *params);
305 * Allocates dynamically a RNAplfold_cmdline_parser_params structure and initializes
306 * all its fields to their default values
307 * @return the created and initialized RNAplfold_cmdline_parser_params structure
309 struct RNAplfold_cmdline_parser_params *RNAplfold_cmdline_parser_params_create(void);
312 * Initializes the passed RNAplfold_args_info structure's fields
313 * (also set default values for options that have a default)
314 * @param args_info the structure to initialize
316 void RNAplfold_cmdline_parser_init (struct RNAplfold_args_info *args_info);
318 * Deallocates the string fields of the RNAplfold_args_info structure
319 * (but does not deallocate the structure itself)
320 * @param args_info the structure to deallocate
322 void RNAplfold_cmdline_parser_free (struct RNAplfold_args_info *args_info);
325 * Checks that all the required options were specified
326 * @param args_info the structure to check
327 * @param prog_name the name of the program that will be used to print
331 int RNAplfold_cmdline_parser_required (struct RNAplfold_args_info *args_info,
332 const char *prog_name);
337 #endif /* __cplusplus */
338 #endif /* RNAPLFOLD_CMDL_H */