Add missing binaty and statis library
[jabaws.git] / binaries / src / ViennaRNA / Progs / RNAup_cmdl.h
1 /** @file RNAup_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 */
7
8 #ifndef RNAUP_CMDL_H
9 #define RNAUP_CMDL_H
10
11 /* If we use autoconf.  */
12 #ifdef HAVE_CONFIG_H
13 #include "config.h"
14 #endif
15
16 #include <stdio.h> /* for FILE */
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif /* __cplusplus */
21
22 #ifndef RNAUP_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define RNAUP_CMDLINE_PARSER_PACKAGE "RNAup"
25 #endif
26
27 #ifndef RNAUP_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define RNAUP_CMDLINE_PARSER_PACKAGE_NAME "RNAup"
30 #endif
31
32 #ifndef RNAUP_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define RNAUP_CMDLINE_PARSER_VERSION VERSION
35 #endif
36
37 /** @brief Where the command line options are stored */
38 struct RNAup_args_info
39 {
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.
45  (default=off).  */
46   const char *constraint_help; /**< @brief Calculate structures subject to constraints.
47  help description.  */
48   int no_output_file_flag;      /**< @brief Do not produce an output file
49   
50  (default=off).  */
51   const char *no_output_file_help; /**< @brief Do not produce an output file
52   
53  help description.  */
54   int no_header_flag;   /**< @brief Do not produce a header with the command line parameters used in the outputfile
55   
56  (default=off).  */
57   const char *no_header_help; /**< @brief Do not produce a header with the command line parameters used in the outputfile
58   
59  help description.  */
60   int noconv_flag;      /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
61   
62  (default=off).  */
63   const char *noconv_help; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
64   
65  help description.  */
66   char ** ulength_arg;  /**< @brief specifies the length of the unstructured region in the output.
67  (default='4').  */
68   char ** ulength_orig; /**< @brief specifies the length of the unstructured region in the output.
69  original value given at command line.  */
70   unsigned int ulength_min; /**< @brief specifies the length of the unstructured region in the output.
71 's minimum occurreces */
72   unsigned int ulength_max; /**< @brief specifies the length of the unstructured region in the output.
73 's maximum occurreces */
74   const char *ulength_help; /**< @brief specifies the length of the unstructured region in the output.
75  help description.  */
76   char * contributions_arg;     /**< @brief Specify the contributions listed in the output
77  (default='S').  */
78   char * contributions_orig;    /**< @brief Specify the contributions listed in the output
79  original value given at command line.  */
80   const char *contributions_help; /**< @brief Specify the contributions listed in the output
81  help description.  */
82   int window_arg;       /**< @brief Determine the maximal length of the region of interaction
83   
84  (default='25').  */
85   char * window_orig;   /**< @brief Determine the maximal length of the region of interaction
86   
87  original value given at command line.  */
88   const char *window_help; /**< @brief Determine the maximal length of the region of interaction
89   
90  help description.  */
91   int include_both_flag;        /**< @brief Include the probability of unpaired regions in both (b) RNAs. By default
92   only the probability of being unpaired in the longer RNA (target) is used.
93   
94  (default=off).  */
95   const char *include_both_help; /**< @brief Include the probability of unpaired regions in both (b) RNAs. By default
96   only the probability of being unpaired in the longer RNA (target) is used.
97   
98  help description.  */
99   int extend5_arg;      /**< @brief Extend the region of interaction in the target to some residues on the 5' side
100 .  */
101   char * extend5_orig;  /**< @brief Extend the region of interaction in the target to some residues on the 5' side
102  original value given at command line.  */
103   const char *extend5_help; /**< @brief Extend the region of interaction in the target to some residues on the 5' side
104  help description.  */
105   int extend3_arg;      /**< @brief Extend the region of interaction in the target to some residues on the 3' side
106 .  */
107   char * extend3_orig;  /**< @brief Extend the region of interaction in the target to some residues on the 3' side
108  original value given at command line.  */
109   const char *extend3_help; /**< @brief Extend the region of interaction in the target to some residues on the 3' side
110  help description.  */
111   int interaction_pairwise_flag;        /**< @brief Activate pairwise interaction mode
112  (default=off).  */
113   const char *interaction_pairwise_help; /**< @brief Activate pairwise interaction mode
114  help description.  */
115   int interaction_first_flag;   /**< @brief Activate interaction mode using first sequence only
116  (default=off).  */
117   const char *interaction_first_help; /**< @brief Activate interaction mode using first sequence only
118  help description.  */
119   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). The default is 1.07, useful values are 1.0 to 1.2. Occasionally needed for long sequences.
120   You can also recompile the program to use double precision (see the README file).
121   
122 .  */
123   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). The default is 1.07, useful values are 1.0 to 1.2. Occasionally needed for long sequences.
124   You can also recompile the program to use double precision (see the README file).
125   
126  original value given at command line.  */
127   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). The default is 1.07, useful values are 1.0 to 1.2. Occasionally needed for long sequences.
128   You can also recompile the program to use double precision (see the README file).
129   
130  help description.  */
131   double temp_arg;      /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
132   
133 .  */
134   char * temp_orig;     /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
135   
136  original value given at command line.  */
137   const char *temp_help; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
138   
139  help description.  */
140   int noTetra_flag;     /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
141   
142  (default=off).  */
143   const char *noTetra_help; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
144   
145  help description.  */
146   int dangles_arg;      /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
147  (default='2').  */
148   char * dangles_orig;  /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
149  original value given at command line.  */
150   const char *dangles_help; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
151  help description.  */
152   int noLP_flag;        /**< @brief Produce structures without lonely pairs (helices of length 1).
153  (default=off).  */
154   const char *noLP_help; /**< @brief Produce structures without lonely pairs (helices of length 1).
155  help description.  */
156   int noGU_flag;        /**< @brief Do not allow GU pairs
157   
158  (default=off).  */
159   const char *noGU_help; /**< @brief Do not allow GU pairs
160   
161  help description.  */
162   int noClosingGU_flag; /**< @brief Do not allow GU pairs at the end of helices
163   
164  (default=off).  */
165   const char *noClosingGU_help; /**< @brief Do not allow GU pairs at the end of helices
166   
167  help description.  */
168   char * paramFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
169 .  */
170   char * paramFile_orig;        /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
171  original value given at command line.  */
172   const char *paramFile_help; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
173  help description.  */
174   char * nsp_arg;       /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
175 .  */
176   char * nsp_orig;      /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
177  original value given at command line.  */
178   const char *nsp_help; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
179  help description.  */
180   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.
181   
182 .  */
183   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.
184   
185  original value given at command line.  */
186   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.
187   
188  help description.  */
189   
190   unsigned int help_given ;     /**< @brief Whether help was given.  */
191   unsigned int detailed_help_given ;    /**< @brief Whether detailed-help was given.  */
192   unsigned int full_help_given ;        /**< @brief Whether full-help was given.  */
193   unsigned int version_given ;  /**< @brief Whether version was given.  */
194   unsigned int constraint_given ;       /**< @brief Whether constraint was given.  */
195   unsigned int no_output_file_given ;   /**< @brief Whether no_output_file was given.  */
196   unsigned int no_header_given ;        /**< @brief Whether no_header was given.  */
197   unsigned int noconv_given ;   /**< @brief Whether noconv was given.  */
198   unsigned int ulength_given ;  /**< @brief Whether ulength was given.  */
199   unsigned int contributions_given ;    /**< @brief Whether contributions was given.  */
200   unsigned int window_given ;   /**< @brief Whether window was given.  */
201   unsigned int include_both_given ;     /**< @brief Whether include_both was given.  */
202   unsigned int extend5_given ;  /**< @brief Whether extend5 was given.  */
203   unsigned int extend3_given ;  /**< @brief Whether extend3 was given.  */
204   unsigned int interaction_pairwise_given ;     /**< @brief Whether interaction_pairwise was given.  */
205   unsigned int interaction_first_given ;        /**< @brief Whether interaction_first was given.  */
206   unsigned int pfScale_given ;  /**< @brief Whether pfScale was given.  */
207   unsigned int temp_given ;     /**< @brief Whether temp was given.  */
208   unsigned int noTetra_given ;  /**< @brief Whether noTetra was given.  */
209   unsigned int dangles_given ;  /**< @brief Whether dangles was given.  */
210   unsigned int noLP_given ;     /**< @brief Whether noLP was given.  */
211   unsigned int noGU_given ;     /**< @brief Whether noGU was given.  */
212   unsigned int noClosingGU_given ;      /**< @brief Whether noClosingGU was given.  */
213   unsigned int paramFile_given ;        /**< @brief Whether paramFile was given.  */
214   unsigned int nsp_given ;      /**< @brief Whether nsp was given.  */
215   unsigned int energyModel_given ;      /**< @brief Whether energyModel was given.  */
216
217 } ;
218
219 /** @brief The additional parameters to pass to parser functions */
220 struct RNAup_cmdline_parser_params
221 {
222   int override; /**< @brief whether to override possibly already present options (default 0) */
223   int initialize; /**< @brief whether to initialize the option structure RNAup_args_info (default 1) */
224   int check_required; /**< @brief whether to check that all required options were provided (default 1) */
225   int check_ambiguity; /**< @brief whether to check for options already specified in the option structure RNAup_args_info (default 0) */
226   int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
227 } ;
228
229 /** @brief the purpose string of the program */
230 extern const char *RNAup_args_info_purpose;
231 /** @brief the usage string of the program */
232 extern const char *RNAup_args_info_usage;
233 /** @brief all the lines making the help output */
234 extern const char *RNAup_args_info_help[];
235 /** @brief all the lines making the full help output (including hidden options) */
236 extern const char *RNAup_args_info_full_help[];
237 /** @brief all the lines making the detailed help output (including hidden options and details) */
238 extern const char *RNAup_args_info_detailed_help[];
239
240 /**
241  * The command line parser
242  * @param argc the number of command line options
243  * @param argv the command line options
244  * @param args_info the structure where option information will be stored
245  * @return 0 if everything went fine, NON 0 if an error took place
246  */
247 int RNAup_cmdline_parser (int argc, char **argv,
248   struct RNAup_args_info *args_info);
249
250 /**
251  * The command line parser (version with additional parameters - deprecated)
252  * @param argc the number of command line options
253  * @param argv the command line options
254  * @param args_info the structure where option information will be stored
255  * @param override whether to override possibly already present options
256  * @param initialize whether to initialize the option structure my_args_info
257  * @param check_required whether to check that all required options were provided
258  * @return 0 if everything went fine, NON 0 if an error took place
259  * @deprecated use RNAup_cmdline_parser_ext() instead
260  */
261 int RNAup_cmdline_parser2 (int argc, char **argv,
262   struct RNAup_args_info *args_info,
263   int override, int initialize, int check_required);
264
265 /**
266  * The command line parser (version with additional parameters)
267  * @param argc the number of command line options
268  * @param argv the command line options
269  * @param args_info the structure where option information will be stored
270  * @param params additional parameters for the parser
271  * @return 0 if everything went fine, NON 0 if an error took place
272  */
273 int RNAup_cmdline_parser_ext (int argc, char **argv,
274   struct RNAup_args_info *args_info,
275   struct RNAup_cmdline_parser_params *params);
276
277 /**
278  * Save the contents of the option struct into an already open FILE stream.
279  * @param outfile the stream where to dump options
280  * @param args_info the option struct to dump
281  * @return 0 if everything went fine, NON 0 if an error took place
282  */
283 int RNAup_cmdline_parser_dump(FILE *outfile,
284   struct RNAup_args_info *args_info);
285
286 /**
287  * Save the contents of the option struct into a (text) file.
288  * This file can be read by the config file parser (if generated by gengetopt)
289  * @param filename the file where to save
290  * @param args_info the option struct to save
291  * @return 0 if everything went fine, NON 0 if an error took place
292  */
293 int RNAup_cmdline_parser_file_save(const char *filename,
294   struct RNAup_args_info *args_info);
295
296 /**
297  * Print the help
298  */
299 void RNAup_cmdline_parser_print_help(void);
300 /**
301  * Print the full help (including hidden options)
302  */
303 void RNAup_cmdline_parser_print_full_help(void);
304 /**
305  * Print the detailed help (including hidden options and details)
306  */
307 void RNAup_cmdline_parser_print_detailed_help(void);
308 /**
309  * Print the version
310  */
311 void RNAup_cmdline_parser_print_version(void);
312
313 /**
314  * Initializes all the fields a RNAup_cmdline_parser_params structure 
315  * to their default values
316  * @param params the structure to initialize
317  */
318 void RNAup_cmdline_parser_params_init(struct RNAup_cmdline_parser_params *params);
319
320 /**
321  * Allocates dynamically a RNAup_cmdline_parser_params structure and initializes
322  * all its fields to their default values
323  * @return the created and initialized RNAup_cmdline_parser_params structure
324  */
325 struct RNAup_cmdline_parser_params *RNAup_cmdline_parser_params_create(void);
326
327 /**
328  * Initializes the passed RNAup_args_info structure's fields
329  * (also set default values for options that have a default)
330  * @param args_info the structure to initialize
331  */
332 void RNAup_cmdline_parser_init (struct RNAup_args_info *args_info);
333 /**
334  * Deallocates the string fields of the RNAup_args_info structure
335  * (but does not deallocate the structure itself)
336  * @param args_info the structure to deallocate
337  */
338 void RNAup_cmdline_parser_free (struct RNAup_args_info *args_info);
339
340 /**
341  * Checks that all the required options were specified
342  * @param args_info the structure to check
343  * @param prog_name the name of the program that will be used to print
344  *   possible errors
345  * @return
346  */
347 int RNAup_cmdline_parser_required (struct RNAup_args_info *args_info,
348   const char *prog_name);
349
350
351 #ifdef __cplusplus
352 }
353 #endif /* __cplusplus */
354 #endif /* RNAUP_CMDL_H */