1 /** @file RNAfold_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 RNAFOLD_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define RNAFOLD_CMDLINE_PARSER_PACKAGE "RNAfold"
27 #ifndef RNAFOLD_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define RNAFOLD_CMDLINE_PARSER_PACKAGE_NAME "RNAfold"
32 #ifndef RNAFOLD_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define RNAFOLD_CMDLINE_PARSER_VERSION VERSION
37 /** @brief Where the command line options are stored */
38 struct RNAfold_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 constraint_flag; /**< @brief Calculate structures subject to constraints.
46 const char *constraint_help; /**< @brief Calculate structures subject to constraints.
48 int noconv_flag; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
51 const char *noconv_help; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
54 int noPS_flag; /**< @brief Do not produce postscript drawing of the mfe structure.
57 const char *noPS_help; /**< @brief Do not produce postscript drawing of the mfe structure.
60 int partfunc_arg; /**< @brief Calculate the partition function and base pairing probability matrix.
62 char * partfunc_orig; /**< @brief Calculate the partition function and base pairing probability matrix.
63 original value given at command line. */
64 const char *partfunc_help; /**< @brief Calculate the partition function and base pairing probability matrix.
66 float MEA_arg; /**< @brief Calculate an MEA (maximum expected accuracy) structure, where the expected accuracy is computed from the pair probabilities: each base pair (i,j) gets a score 2*gamma*p_ij and the score of an unpaired base is given by the probability of not forming a pair.
68 char * MEA_orig; /**< @brief Calculate an MEA (maximum expected accuracy) structure, where the expected accuracy is computed from the pair probabilities: each base pair (i,j) gets a score 2*gamma*p_ij and the score of an unpaired base is given by the probability of not forming a pair.
69 original value given at command line. */
70 const char *MEA_help; /**< @brief Calculate an MEA (maximum expected accuracy) structure, where the expected accuracy is computed from the pair probabilities: each base pair (i,j) gets a score 2*gamma*p_ij and the score of an unpaired base is given by the probability of not forming a pair.
72 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).
74 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).
75 original value given at command line. */
76 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).
78 int circ_flag; /**< @brief Assume a circular (instead of linear) RNA molecule.
80 const char *circ_help; /**< @brief Assume a circular (instead of linear) RNA molecule.
82 int ImFeelingLucky_flag; /**< @brief Return exactly one stochastically backtracked structure
84 const char *ImFeelingLucky_help; /**< @brief Return exactly one stochastically backtracked structure
86 double bppmThreshold_arg; /**< @brief Set the threshold for base pair probabilities included in the postscript output
88 char * bppmThreshold_orig; /**< @brief Set the threshold for base pair probabilities included in the postscript output
89 original value given at command line. */
90 const char *bppmThreshold_help; /**< @brief Set the threshold for base pair probabilities included in the postscript output
92 int gquad_flag; /**< @brief Incoorporate G-Quadruplex formation into the structure prediction algorithm
94 const char *gquad_help; /**< @brief Incoorporate G-Quadruplex formation into the structure prediction algorithm
96 double temp_arg; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
99 char * temp_orig; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
101 original value given at command line. */
102 const char *temp_help; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
105 int noTetra_flag; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
108 const char *noTetra_help; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
111 int dangles_arg; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
113 char * dangles_orig; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
114 original value given at command line. */
115 const char *dangles_help; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
117 int noLP_flag; /**< @brief Produce structures without lonely pairs (helices of length 1).
119 const char *noLP_help; /**< @brief Produce structures without lonely pairs (helices of length 1).
121 int noGU_flag; /**< @brief Do not allow GU pairs
124 const char *noGU_help; /**< @brief Do not allow GU pairs
127 int noClosingGU_flag; /**< @brief Do not allow GU pairs at the end of helices
130 const char *noClosingGU_help; /**< @brief Do not allow GU pairs at the end of helices
133 char * paramFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
135 char * paramFile_orig; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
136 original value given at command line. */
137 const char *paramFile_help; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
139 char * nsp_arg; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
141 char * nsp_orig; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
142 original value given at command line. */
143 const char *nsp_help; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
145 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.
148 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.
150 original value given at command line. */
151 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.
154 double betaScale_arg; /**< @brief Set the scaling of the Boltzmann factors
156 char * betaScale_orig; /**< @brief Set the scaling of the Boltzmann factors
157 original value given at command line. */
158 const char *betaScale_help; /**< @brief Set the scaling of the Boltzmann factors
161 unsigned int help_given ; /**< @brief Whether help was given. */
162 unsigned int detailed_help_given ; /**< @brief Whether detailed-help was given. */
163 unsigned int full_help_given ; /**< @brief Whether full-help was given. */
164 unsigned int version_given ; /**< @brief Whether version was given. */
165 unsigned int constraint_given ; /**< @brief Whether constraint was given. */
166 unsigned int noconv_given ; /**< @brief Whether noconv was given. */
167 unsigned int noPS_given ; /**< @brief Whether noPS was given. */
168 unsigned int partfunc_given ; /**< @brief Whether partfunc was given. */
169 unsigned int MEA_given ; /**< @brief Whether MEA was given. */
170 unsigned int pfScale_given ; /**< @brief Whether pfScale was given. */
171 unsigned int circ_given ; /**< @brief Whether circ was given. */
172 unsigned int ImFeelingLucky_given ; /**< @brief Whether ImFeelingLucky was given. */
173 unsigned int bppmThreshold_given ; /**< @brief Whether bppmThreshold was given. */
174 unsigned int gquad_given ; /**< @brief Whether gquad was given. */
175 unsigned int temp_given ; /**< @brief Whether temp was given. */
176 unsigned int noTetra_given ; /**< @brief Whether noTetra was given. */
177 unsigned int dangles_given ; /**< @brief Whether dangles was given. */
178 unsigned int noLP_given ; /**< @brief Whether noLP was given. */
179 unsigned int noGU_given ; /**< @brief Whether noGU was given. */
180 unsigned int noClosingGU_given ; /**< @brief Whether noClosingGU was given. */
181 unsigned int paramFile_given ; /**< @brief Whether paramFile was given. */
182 unsigned int nsp_given ; /**< @brief Whether nsp was given. */
183 unsigned int energyModel_given ; /**< @brief Whether energyModel was given. */
184 unsigned int betaScale_given ; /**< @brief Whether betaScale was given. */
188 /** @brief The additional parameters to pass to parser functions */
189 struct RNAfold_cmdline_parser_params
191 int override; /**< @brief whether to override possibly already present options (default 0) */
192 int initialize; /**< @brief whether to initialize the option structure RNAfold_args_info (default 1) */
193 int check_required; /**< @brief whether to check that all required options were provided (default 1) */
194 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure RNAfold_args_info (default 0) */
195 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
198 /** @brief the purpose string of the program */
199 extern const char *RNAfold_args_info_purpose;
200 /** @brief the usage string of the program */
201 extern const char *RNAfold_args_info_usage;
202 /** @brief all the lines making the help output */
203 extern const char *RNAfold_args_info_help[];
204 /** @brief all the lines making the full help output (including hidden options) */
205 extern const char *RNAfold_args_info_full_help[];
206 /** @brief all the lines making the detailed help output (including hidden options and details) */
207 extern const char *RNAfold_args_info_detailed_help[];
210 * The command line parser
211 * @param argc the number of command line options
212 * @param argv the command line options
213 * @param args_info the structure where option information will be stored
214 * @return 0 if everything went fine, NON 0 if an error took place
216 int RNAfold_cmdline_parser (int argc, char **argv,
217 struct RNAfold_args_info *args_info);
220 * The command line parser (version with additional parameters - deprecated)
221 * @param argc the number of command line options
222 * @param argv the command line options
223 * @param args_info the structure where option information will be stored
224 * @param override whether to override possibly already present options
225 * @param initialize whether to initialize the option structure my_args_info
226 * @param check_required whether to check that all required options were provided
227 * @return 0 if everything went fine, NON 0 if an error took place
228 * @deprecated use RNAfold_cmdline_parser_ext() instead
230 int RNAfold_cmdline_parser2 (int argc, char **argv,
231 struct RNAfold_args_info *args_info,
232 int override, int initialize, int check_required);
235 * The command line parser (version with additional parameters)
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 params additional parameters for the parser
240 * @return 0 if everything went fine, NON 0 if an error took place
242 int RNAfold_cmdline_parser_ext (int argc, char **argv,
243 struct RNAfold_args_info *args_info,
244 struct RNAfold_cmdline_parser_params *params);
247 * Save the contents of the option struct into an already open FILE stream.
248 * @param outfile the stream where to dump options
249 * @param args_info the option struct to dump
250 * @return 0 if everything went fine, NON 0 if an error took place
252 int RNAfold_cmdline_parser_dump(FILE *outfile,
253 struct RNAfold_args_info *args_info);
256 * Save the contents of the option struct into a (text) file.
257 * This file can be read by the config file parser (if generated by gengetopt)
258 * @param filename the file where to save
259 * @param args_info the option struct to save
260 * @return 0 if everything went fine, NON 0 if an error took place
262 int RNAfold_cmdline_parser_file_save(const char *filename,
263 struct RNAfold_args_info *args_info);
268 void RNAfold_cmdline_parser_print_help(void);
270 * Print the full help (including hidden options)
272 void RNAfold_cmdline_parser_print_full_help(void);
274 * Print the detailed help (including hidden options and details)
276 void RNAfold_cmdline_parser_print_detailed_help(void);
280 void RNAfold_cmdline_parser_print_version(void);
283 * Initializes all the fields a RNAfold_cmdline_parser_params structure
284 * to their default values
285 * @param params the structure to initialize
287 void RNAfold_cmdline_parser_params_init(struct RNAfold_cmdline_parser_params *params);
290 * Allocates dynamically a RNAfold_cmdline_parser_params structure and initializes
291 * all its fields to their default values
292 * @return the created and initialized RNAfold_cmdline_parser_params structure
294 struct RNAfold_cmdline_parser_params *RNAfold_cmdline_parser_params_create(void);
297 * Initializes the passed RNAfold_args_info structure's fields
298 * (also set default values for options that have a default)
299 * @param args_info the structure to initialize
301 void RNAfold_cmdline_parser_init (struct RNAfold_args_info *args_info);
303 * Deallocates the string fields of the RNAfold_args_info structure
304 * (but does not deallocate the structure itself)
305 * @param args_info the structure to deallocate
307 void RNAfold_cmdline_parser_free (struct RNAfold_args_info *args_info);
310 * Checks that all the required options were specified
311 * @param args_info the structure to check
312 * @param prog_name the name of the program that will be used to print
316 int RNAfold_cmdline_parser_required (struct RNAfold_args_info *args_info,
317 const char *prog_name);
322 #endif /* __cplusplus */
323 #endif /* RNAFOLD_CMDL_H */