1 /** @file RNAeval_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 RNAEVAL_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define RNAEVAL_CMDLINE_PARSER_PACKAGE "RNAeval"
27 #ifndef RNAEVAL_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define RNAEVAL_CMDLINE_PARSER_PACKAGE_NAME "RNAeval"
32 #ifndef RNAEVAL_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define RNAEVAL_CMDLINE_PARSER_VERSION VERSION
37 /** @brief Where the command line options are stored */
38 struct RNAeval_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 noconv_flag; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
46 const char *noconv_help; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
49 int verbose_flag; /**< @brief Print out energy contribution of each loop in the structure.
52 const char *verbose_help; /**< @brief Print out energy contribution of each loop in the structure.
55 double temp_arg; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
58 char * temp_orig; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
60 original value given at command line. */
61 const char *temp_help; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
64 int noTetra_flag; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
67 const char *noTetra_help; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
70 int dangles_arg; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
72 char * dangles_orig; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
73 original value given at command line. */
74 const char *dangles_help; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
76 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.
79 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.
81 original value given at command line. */
82 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.
85 char * paramFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
87 char * paramFile_orig; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
88 original value given at command line. */
89 const char *paramFile_help; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
91 int circ_flag; /**< @brief Assume a circular (instead of linear) RNA molecule.
94 const char *circ_help; /**< @brief Assume a circular (instead of linear) RNA molecule.
97 int gquad_flag; /**< @brief Incoorporate G-Quadruplex formation into the structure prediction algorithm
99 const char *gquad_help; /**< @brief Incoorporate G-Quadruplex formation into the structure prediction algorithm
101 int logML_flag; /**< @brief Recalculate energies of structures using a logarithmic energy function for multi-loops before output.
103 const char *logML_help; /**< @brief Recalculate energies of structures using a logarithmic energy function for multi-loops before output.
106 unsigned int help_given ; /**< @brief Whether help was given. */
107 unsigned int detailed_help_given ; /**< @brief Whether detailed-help was given. */
108 unsigned int version_given ; /**< @brief Whether version was given. */
109 unsigned int noconv_given ; /**< @brief Whether noconv was given. */
110 unsigned int verbose_given ; /**< @brief Whether verbose was given. */
111 unsigned int temp_given ; /**< @brief Whether temp was given. */
112 unsigned int noTetra_given ; /**< @brief Whether noTetra was given. */
113 unsigned int dangles_given ; /**< @brief Whether dangles was given. */
114 unsigned int energyModel_given ; /**< @brief Whether energyModel was given. */
115 unsigned int paramFile_given ; /**< @brief Whether paramFile was given. */
116 unsigned int circ_given ; /**< @brief Whether circ was given. */
117 unsigned int gquad_given ; /**< @brief Whether gquad was given. */
118 unsigned int logML_given ; /**< @brief Whether logML was given. */
122 /** @brief The additional parameters to pass to parser functions */
123 struct RNAeval_cmdline_parser_params
125 int override; /**< @brief whether to override possibly already present options (default 0) */
126 int initialize; /**< @brief whether to initialize the option structure RNAeval_args_info (default 1) */
127 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
128 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure RNAeval_args_info (default 0) */
129 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
132 /** @brief the purpose string of the program */
133 extern const char *RNAeval_args_info_purpose;
134 /** @brief the usage string of the program */
135 extern const char *RNAeval_args_info_usage;
136 /** @brief all the lines making the help output */
137 extern const char *RNAeval_args_info_help[];
138 /** @brief all the lines making the detailed help output (including hidden options and details) */
139 extern const char *RNAeval_args_info_detailed_help[];
142 * The command line parser
143 * @param argc the number of command line options
144 * @param argv the command line options
145 * @param args_info the structure where option information will be stored
146 * @return 0 if everything went fine, NON 0 if an error took place
148 int RNAeval_cmdline_parser (int argc, char **argv,
149 struct RNAeval_args_info *args_info);
152 * The command line parser (version with additional parameters - deprecated)
153 * @param argc the number of command line options
154 * @param argv the command line options
155 * @param args_info the structure where option information will be stored
156 * @param override whether to override possibly already present options
157 * @param initialize whether to initialize the option structure my_args_info
158 * @param check_required whether to check that all required options were provided
159 * @return 0 if everything went fine, NON 0 if an error took place
160 * @deprecated use RNAeval_cmdline_parser_ext() instead
162 int RNAeval_cmdline_parser2 (int argc, char **argv,
163 struct RNAeval_args_info *args_info,
164 int override, int initialize, int check_required);
167 * The command line parser (version with additional parameters)
168 * @param argc the number of command line options
169 * @param argv the command line options
170 * @param args_info the structure where option information will be stored
171 * @param params additional parameters for the parser
172 * @return 0 if everything went fine, NON 0 if an error took place
174 int RNAeval_cmdline_parser_ext (int argc, char **argv,
175 struct RNAeval_args_info *args_info,
176 struct RNAeval_cmdline_parser_params *params);
179 * Save the contents of the option struct into an already open FILE stream.
180 * @param outfile the stream where to dump options
181 * @param args_info the option struct to dump
182 * @return 0 if everything went fine, NON 0 if an error took place
184 int RNAeval_cmdline_parser_dump(FILE *outfile,
185 struct RNAeval_args_info *args_info);
188 * Save the contents of the option struct into a (text) file.
189 * This file can be read by the config file parser (if generated by gengetopt)
190 * @param filename the file where to save
191 * @param args_info the option struct to save
192 * @return 0 if everything went fine, NON 0 if an error took place
194 int RNAeval_cmdline_parser_file_save(const char *filename,
195 struct RNAeval_args_info *args_info);
200 void RNAeval_cmdline_parser_print_help(void);
202 * Print the detailed help (including hidden options and details)
204 void RNAeval_cmdline_parser_print_detailed_help(void);
208 void RNAeval_cmdline_parser_print_version(void);
211 * Initializes all the fields a RNAeval_cmdline_parser_params structure
212 * to their default values
213 * @param params the structure to initialize
215 void RNAeval_cmdline_parser_params_init(struct RNAeval_cmdline_parser_params *params);
218 * Allocates dynamically a RNAeval_cmdline_parser_params structure and initializes
219 * all its fields to their default values
220 * @return the created and initialized RNAeval_cmdline_parser_params structure
222 struct RNAeval_cmdline_parser_params *RNAeval_cmdline_parser_params_create(void);
225 * Initializes the passed RNAeval_args_info structure's fields
226 * (also set default values for options that have a default)
227 * @param args_info the structure to initialize
229 void RNAeval_cmdline_parser_init (struct RNAeval_args_info *args_info);
231 * Deallocates the string fields of the RNAeval_args_info structure
232 * (but does not deallocate the structure itself)
233 * @param args_info the structure to deallocate
235 void RNAeval_cmdline_parser_free (struct RNAeval_args_info *args_info);
238 * Checks that all the required options were specified
239 * @param args_info the structure to check
240 * @param prog_name the name of the program that will be used to print
244 int RNAeval_cmdline_parser_required (struct RNAeval_args_info *args_info,
245 const char *prog_name);
250 #endif /* __cplusplus */
251 #endif /* RNAEVAL_CMDL_H */