1 /** @file RNALalifold_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 RNALALIFOLD_CMDL_H
9 #define RNALALIFOLD_CMDL_H
11 /* If we use autoconf. */
16 #include <stdio.h> /* for FILE */
20 #endif /* __cplusplus */
22 #ifndef RNALALIFOLD_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define RNALALIFOLD_CMDLINE_PARSER_PACKAGE "RNALalifold"
27 #ifndef RNALALIFOLD_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define RNALALIFOLD_CMDLINE_PARSER_PACKAGE_NAME "RNALalifold"
32 #ifndef RNALALIFOLD_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define RNALALIFOLD_CMDLINE_PARSER_VERSION VERSION
37 /** @brief Where the command line options are stored */
38 struct RNALalifold_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 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.
47 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.
49 original value given at command line. */
50 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.
53 int csv_flag; /**< @brief Create comma seperated output (csv)
56 const char *csv_help; /**< @brief Create comma seperated output (csv)
59 int partfunc_arg; /**< @brief Calculate the partition function and base pairing probability matrix in addition to the mfe structure. (default='1'). */
60 char * partfunc_orig; /**< @brief Calculate the partition function and base pairing probability matrix in addition to the mfe structure. original value given at command line. */
61 const char *partfunc_help; /**< @brief Calculate the partition function and base pairing probability matrix in addition to the mfe structure. help description. */
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 double pfScale_arg; /**< @brief In the calculation of the pf use scale*mfe as an estimate for the ensemble free energy (used to avoid overflows).
73 char * pfScale_orig; /**< @brief In the calculation of the pf use scale*mfe as an estimate for the ensemble free energy (used to avoid overflows).
74 original value given at command line. */
75 const char *pfScale_help; /**< @brief In the calculation of the pf use scale*mfe as an estimate for the ensemble free energy (used to avoid overflows).
77 int mis_flag; /**< @brief Output \"most informative sequence\" instead of simple consensus: For each column of the alignment output the set of nucleotides with frequence greater than average in IUPAC notation.
80 const char *mis_help; /**< @brief Output \"most informative sequence\" instead of simple consensus: For each column of the alignment output the set of nucleotides with frequence greater than average in IUPAC notation.
83 double temp_arg; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
86 char * temp_orig; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
88 original value given at command line. */
89 const char *temp_help; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
92 int noTetra_flag; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
95 const char *noTetra_help; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
98 int dangles_arg; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
100 char * dangles_orig; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
101 original value given at command line. */
102 const char *dangles_help; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
104 int noLP_flag; /**< @brief Produce structures without lonely pairs (helices of length 1).
106 const char *noLP_help; /**< @brief Produce structures without lonely pairs (helices of length 1).
108 int noGU_flag; /**< @brief Do not allow GU pairs
111 const char *noGU_help; /**< @brief Do not allow GU pairs
114 int noClosingGU_flag; /**< @brief Do not allow GU pairs at the end of helices
117 const char *noClosingGU_help; /**< @brief Do not allow GU pairs at the end of helices
120 char * paramFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
122 char * paramFile_orig; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
123 original value given at command line. */
124 const char *paramFile_help; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
126 char * nsp_arg; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
128 char * nsp_orig; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
129 original value given at command line. */
130 const char *nsp_help; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
132 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.
135 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.
137 original value given at command line. */
138 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.
141 double cfactor_arg; /**< @brief Set the weight of the covariance term in the energy function
144 char * cfactor_orig; /**< @brief Set the weight of the covariance term in the energy function
146 original value given at command line. */
147 const char *cfactor_help; /**< @brief Set the weight of the covariance term in the energy function
150 double nfactor_arg; /**< @brief Set the penalty for non-compatible sequences in the covariance term of the energy function
153 char * nfactor_orig; /**< @brief Set the penalty for non-compatible sequences in the covariance term of the energy function
155 original value given at command line. */
156 const char *nfactor_help; /**< @brief Set the penalty for non-compatible sequences in the covariance term of the energy function
159 char * ribosum_file_arg; /**< @brief use specified Ribosum Matrix instead of normal energy model. Matrixes to use should be 6x6 matrices, the order of the terms is AU, CG, GC, GU, UA, UG.
162 char * ribosum_file_orig; /**< @brief use specified Ribosum Matrix instead of normal energy model. Matrixes to use should be 6x6 matrices, the order of the terms is AU, CG, GC, GU, UA, UG.
164 original value given at command line. */
165 const char *ribosum_file_help; /**< @brief use specified Ribosum Matrix instead of normal energy model. Matrixes to use should be 6x6 matrices, the order of the terms is AU, CG, GC, GU, UA, UG.
168 int ribosum_scoring_flag; /**< @brief use ribosum scoring matrix. The matrix is chosen according to the minimal and maximal pairwise identities of the sequences in the file.
171 const char *ribosum_scoring_help; /**< @brief use ribosum scoring matrix. The matrix is chosen according to the minimal and maximal pairwise identities of the sequences in the file.
175 unsigned int help_given ; /**< @brief Whether help was given. */
176 unsigned int detailed_help_given ; /**< @brief Whether detailed-help was given. */
177 unsigned int full_help_given ; /**< @brief Whether full-help was given. */
178 unsigned int version_given ; /**< @brief Whether version was given. */
179 unsigned int span_given ; /**< @brief Whether span was given. */
180 unsigned int csv_given ; /**< @brief Whether csv was given. */
181 unsigned int partfunc_given ; /**< @brief Whether partfunc was given. */
182 unsigned int cutoff_given ; /**< @brief Whether cutoff was given. */
183 unsigned int pfScale_given ; /**< @brief Whether pfScale was given. */
184 unsigned int mis_given ; /**< @brief Whether mis was given. */
185 unsigned int temp_given ; /**< @brief Whether temp was given. */
186 unsigned int noTetra_given ; /**< @brief Whether noTetra was given. */
187 unsigned int dangles_given ; /**< @brief Whether dangles was given. */
188 unsigned int noLP_given ; /**< @brief Whether noLP was given. */
189 unsigned int noGU_given ; /**< @brief Whether noGU was given. */
190 unsigned int noClosingGU_given ; /**< @brief Whether noClosingGU was given. */
191 unsigned int paramFile_given ; /**< @brief Whether paramFile was given. */
192 unsigned int nsp_given ; /**< @brief Whether nsp was given. */
193 unsigned int energyModel_given ; /**< @brief Whether energyModel was given. */
194 unsigned int cfactor_given ; /**< @brief Whether cfactor was given. */
195 unsigned int nfactor_given ; /**< @brief Whether nfactor was given. */
196 unsigned int ribosum_file_given ; /**< @brief Whether ribosum_file was given. */
197 unsigned int ribosum_scoring_given ; /**< @brief Whether ribosum_scoring was given. */
199 char **inputs ; /**< @brief unamed options (options without names) */
200 unsigned inputs_num ; /**< @brief unamed options number */
203 /** @brief The additional parameters to pass to parser functions */
204 struct RNALalifold_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 RNALalifold_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 RNALalifold_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 *RNALalifold_args_info_purpose;
215 /** @brief the usage string of the program */
216 extern const char *RNALalifold_args_info_usage;
217 /** @brief all the lines making the help output */
218 extern const char *RNALalifold_args_info_help[];
219 /** @brief all the lines making the full help output (including hidden options) */
220 extern const char *RNALalifold_args_info_full_help[];
221 /** @brief all the lines making the detailed help output (including hidden options and details) */
222 extern const char *RNALalifold_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 RNALalifold_cmdline_parser (int argc, char **argv,
232 struct RNALalifold_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 RNALalifold_cmdline_parser_ext() instead
245 int RNALalifold_cmdline_parser2 (int argc, char **argv,
246 struct RNALalifold_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 RNALalifold_cmdline_parser_ext (int argc, char **argv,
258 struct RNALalifold_args_info *args_info,
259 struct RNALalifold_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 RNALalifold_cmdline_parser_dump(FILE *outfile,
268 struct RNALalifold_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 RNALalifold_cmdline_parser_file_save(const char *filename,
278 struct RNALalifold_args_info *args_info);
283 void RNALalifold_cmdline_parser_print_help(void);
285 * Print the full help (including hidden options)
287 void RNALalifold_cmdline_parser_print_full_help(void);
289 * Print the detailed help (including hidden options and details)
291 void RNALalifold_cmdline_parser_print_detailed_help(void);
295 void RNALalifold_cmdline_parser_print_version(void);
298 * Initializes all the fields a RNALalifold_cmdline_parser_params structure
299 * to their default values
300 * @param params the structure to initialize
302 void RNALalifold_cmdline_parser_params_init(struct RNALalifold_cmdline_parser_params *params);
305 * Allocates dynamically a RNALalifold_cmdline_parser_params structure and initializes
306 * all its fields to their default values
307 * @return the created and initialized RNALalifold_cmdline_parser_params structure
309 struct RNALalifold_cmdline_parser_params *RNALalifold_cmdline_parser_params_create(void);
312 * Initializes the passed RNALalifold_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 RNALalifold_cmdline_parser_init (struct RNALalifold_args_info *args_info);
318 * Deallocates the string fields of the RNALalifold_args_info structure
319 * (but does not deallocate the structure itself)
320 * @param args_info the structure to deallocate
322 void RNALalifold_cmdline_parser_free (struct RNALalifold_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 RNALalifold_cmdline_parser_required (struct RNALalifold_args_info *args_info,
332 const char *prog_name);
337 #endif /* __cplusplus */
338 #endif /* RNALALIFOLD_CMDL_H */