WSTester updated to work plus hopefully all the other changes that need to go into...
[jabaws.git] / binaries / src / ViennaRNA / Progs / RNApaln_cmdl.h
1 /** @file RNApaln_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 RNAPALN_CMDL_H
9 #define RNAPALN_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 RNAPALN_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define RNAPALN_CMDLINE_PARSER_PACKAGE "RNApaln"
25 #endif
26
27 #ifndef RNAPALN_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define RNAPALN_CMDLINE_PARSER_PACKAGE_NAME "RNApaln"
30 #endif
31
32 #ifndef RNAPALN_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define RNAPALN_CMDLINE_PARSER_VERSION VERSION
35 #endif
36
37 /** @brief Where the command line options are stored */
38 struct RNApaln_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   char * printAlignment_arg;    /**< @brief Print an \"alignment\" with gaps of the profiles
45   The aligned structures are written to filename, if specified
46   Otherwise output is written to stdout, unless the -Xm option is set in which case \"backtrack.file\" is used.
47  (default='stdout').  */
48   char * printAlignment_orig;   /**< @brief Print an \"alignment\" with gaps of the profiles
49   The aligned structures are written to filename, if specified
50   Otherwise output is written to stdout, unless the -Xm option is set in which case \"backtrack.file\" is used.
51  original value given at command line.  */
52   const char *printAlignment_help; /**< @brief Print an \"alignment\" with gaps of the profiles
53   The aligned structures are written to filename, if specified
54   Otherwise output is written to stdout, unless the -Xm option is set in which case \"backtrack.file\" is used.
55  help description.  */
56   int noconv_flag;      /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
57   
58  (default=off).  */
59   const char *noconv_help; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
60   
61  help description.  */
62   char * mode_arg;      /**< @brief Set the alignment mode to be used
63 .  */
64   char * mode_orig;     /**< @brief Set the alignment mode to be used
65  original value given at command line.  */
66   const char *mode_help; /**< @brief Set the alignment mode to be used
67  help description.  */
68   float gapo_arg;       /**< @brief Set the gap open penalty
69   
70 .  */
71   char * gapo_orig;     /**< @brief Set the gap open penalty
72   
73  original value given at command line.  */
74   const char *gapo_help; /**< @brief Set the gap open penalty
75   
76  help description.  */
77   float gape_arg;       /**< @brief Set the gap extension penalty
78   
79 .  */
80   char * gape_orig;     /**< @brief Set the gap extension penalty
81   
82  original value given at command line.  */
83   const char *gape_help; /**< @brief Set the gap extension penalty
84   
85  help description.  */
86   float seqw_arg;       /**< @brief Set the weight of sequence (compared to structure) in the scoring function.
87   
88 .  */
89   char * seqw_orig;     /**< @brief Set the weight of sequence (compared to structure) in the scoring function.
90   
91  original value given at command line.  */
92   const char *seqw_help; /**< @brief Set the weight of sequence (compared to structure) in the scoring function.
93   
94  help description.  */
95   int endgaps_flag;     /**< @brief Use free end-gaps
96   
97  (default=off).  */
98   const char *endgaps_help; /**< @brief Use free end-gaps
99   
100  help description.  */
101   double temp_arg;      /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
102   
103 .  */
104   char * temp_orig;     /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
105   
106  original value given at command line.  */
107   const char *temp_help; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
108   
109  help description.  */
110   int noTetra_flag;     /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
111   
112  (default=off).  */
113   const char *noTetra_help; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing.
114   
115  help description.  */
116   int dangles_arg;      /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
117  (default='2').  */
118   char * dangles_orig;  /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
119  original value given at command line.  */
120   const char *dangles_help; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops
121  help description.  */
122   int noLP_flag;        /**< @brief Produce structures without lonely pairs (helices of length 1).
123  (default=off).  */
124   const char *noLP_help; /**< @brief Produce structures without lonely pairs (helices of length 1).
125  help description.  */
126   int noGU_flag;        /**< @brief Do not allow GU pairs
127   
128  (default=off).  */
129   const char *noGU_help; /**< @brief Do not allow GU pairs
130   
131  help description.  */
132   int noClosingGU_flag; /**< @brief Do not allow GU pairs at the end of helices
133   
134  (default=off).  */
135   const char *noClosingGU_help; /**< @brief Do not allow GU pairs at the end of helices
136   
137  help description.  */
138   char * paramFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
139 .  */
140   char * paramFile_orig;        /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
141  original value given at command line.  */
142   const char *paramFile_help; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
143  help description.  */
144   char * nsp_arg;       /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
145 .  */
146   char * nsp_orig;      /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
147  original value given at command line.  */
148   const char *nsp_help; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
149  help description.  */
150   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.
151   
152 .  */
153   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.
154   
155  original value given at command line.  */
156   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.
157   
158  help description.  */
159   
160   unsigned int help_given ;     /**< @brief Whether help was given.  */
161   unsigned int detailed_help_given ;    /**< @brief Whether detailed-help was given.  */
162   unsigned int full_help_given ;        /**< @brief Whether full-help was given.  */
163   unsigned int version_given ;  /**< @brief Whether version was given.  */
164   unsigned int printAlignment_given ;   /**< @brief Whether printAlignment was given.  */
165   unsigned int noconv_given ;   /**< @brief Whether noconv was given.  */
166   unsigned int mode_given ;     /**< @brief Whether mode was given.  */
167   unsigned int gapo_given ;     /**< @brief Whether gapo was given.  */
168   unsigned int gape_given ;     /**< @brief Whether gape was given.  */
169   unsigned int seqw_given ;     /**< @brief Whether seqw was given.  */
170   unsigned int endgaps_given ;  /**< @brief Whether endgaps was given.  */
171   unsigned int temp_given ;     /**< @brief Whether temp was given.  */
172   unsigned int noTetra_given ;  /**< @brief Whether noTetra was given.  */
173   unsigned int dangles_given ;  /**< @brief Whether dangles was given.  */
174   unsigned int noLP_given ;     /**< @brief Whether noLP was given.  */
175   unsigned int noGU_given ;     /**< @brief Whether noGU was given.  */
176   unsigned int noClosingGU_given ;      /**< @brief Whether noClosingGU was given.  */
177   unsigned int paramFile_given ;        /**< @brief Whether paramFile was given.  */
178   unsigned int nsp_given ;      /**< @brief Whether nsp was given.  */
179   unsigned int energyModel_given ;      /**< @brief Whether energyModel was given.  */
180
181 } ;
182
183 /** @brief The additional parameters to pass to parser functions */
184 struct RNApaln_cmdline_parser_params
185 {
186   int override; /**< @brief whether to override possibly already present options (default 0) */
187   int initialize; /**< @brief whether to initialize the option structure RNApaln_args_info (default 1) */
188   int check_required; /**< @brief whether to check that all required options were provided (default 1) */
189   int check_ambiguity; /**< @brief whether to check for options already specified in the option structure RNApaln_args_info (default 0) */
190   int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
191 } ;
192
193 /** @brief the purpose string of the program */
194 extern const char *RNApaln_args_info_purpose;
195 /** @brief the usage string of the program */
196 extern const char *RNApaln_args_info_usage;
197 /** @brief all the lines making the help output */
198 extern const char *RNApaln_args_info_help[];
199 /** @brief all the lines making the full help output (including hidden options) */
200 extern const char *RNApaln_args_info_full_help[];
201 /** @brief all the lines making the detailed help output (including hidden options and details) */
202 extern const char *RNApaln_args_info_detailed_help[];
203
204 /**
205  * The command line parser
206  * @param argc the number of command line options
207  * @param argv the command line options
208  * @param args_info the structure where option information will be stored
209  * @return 0 if everything went fine, NON 0 if an error took place
210  */
211 int RNApaln_cmdline_parser (int argc, char **argv,
212   struct RNApaln_args_info *args_info);
213
214 /**
215  * The command line parser (version with additional parameters - deprecated)
216  * @param argc the number of command line options
217  * @param argv the command line options
218  * @param args_info the structure where option information will be stored
219  * @param override whether to override possibly already present options
220  * @param initialize whether to initialize the option structure my_args_info
221  * @param check_required whether to check that all required options were provided
222  * @return 0 if everything went fine, NON 0 if an error took place
223  * @deprecated use RNApaln_cmdline_parser_ext() instead
224  */
225 int RNApaln_cmdline_parser2 (int argc, char **argv,
226   struct RNApaln_args_info *args_info,
227   int override, int initialize, int check_required);
228
229 /**
230  * The command line parser (version with additional parameters)
231  * @param argc the number of command line options
232  * @param argv the command line options
233  * @param args_info the structure where option information will be stored
234  * @param params additional parameters for the parser
235  * @return 0 if everything went fine, NON 0 if an error took place
236  */
237 int RNApaln_cmdline_parser_ext (int argc, char **argv,
238   struct RNApaln_args_info *args_info,
239   struct RNApaln_cmdline_parser_params *params);
240
241 /**
242  * Save the contents of the option struct into an already open FILE stream.
243  * @param outfile the stream where to dump options
244  * @param args_info the option struct to dump
245  * @return 0 if everything went fine, NON 0 if an error took place
246  */
247 int RNApaln_cmdline_parser_dump(FILE *outfile,
248   struct RNApaln_args_info *args_info);
249
250 /**
251  * Save the contents of the option struct into a (text) file.
252  * This file can be read by the config file parser (if generated by gengetopt)
253  * @param filename the file where to save
254  * @param args_info the option struct to save
255  * @return 0 if everything went fine, NON 0 if an error took place
256  */
257 int RNApaln_cmdline_parser_file_save(const char *filename,
258   struct RNApaln_args_info *args_info);
259
260 /**
261  * Print the help
262  */
263 void RNApaln_cmdline_parser_print_help(void);
264 /**
265  * Print the full help (including hidden options)
266  */
267 void RNApaln_cmdline_parser_print_full_help(void);
268 /**
269  * Print the detailed help (including hidden options and details)
270  */
271 void RNApaln_cmdline_parser_print_detailed_help(void);
272 /**
273  * Print the version
274  */
275 void RNApaln_cmdline_parser_print_version(void);
276
277 /**
278  * Initializes all the fields a RNApaln_cmdline_parser_params structure 
279  * to their default values
280  * @param params the structure to initialize
281  */
282 void RNApaln_cmdline_parser_params_init(struct RNApaln_cmdline_parser_params *params);
283
284 /**
285  * Allocates dynamically a RNApaln_cmdline_parser_params structure and initializes
286  * all its fields to their default values
287  * @return the created and initialized RNApaln_cmdline_parser_params structure
288  */
289 struct RNApaln_cmdline_parser_params *RNApaln_cmdline_parser_params_create(void);
290
291 /**
292  * Initializes the passed RNApaln_args_info structure's fields
293  * (also set default values for options that have a default)
294  * @param args_info the structure to initialize
295  */
296 void RNApaln_cmdline_parser_init (struct RNApaln_args_info *args_info);
297 /**
298  * Deallocates the string fields of the RNApaln_args_info structure
299  * (but does not deallocate the structure itself)
300  * @param args_info the structure to deallocate
301  */
302 void RNApaln_cmdline_parser_free (struct RNApaln_args_info *args_info);
303
304 /**
305  * Checks that all the required options were specified
306  * @param args_info the structure to check
307  * @param prog_name the name of the program that will be used to print
308  *   possible errors
309  * @return
310  */
311 int RNApaln_cmdline_parser_required (struct RNApaln_args_info *args_info,
312   const char *prog_name);
313
314
315 #ifdef __cplusplus
316 }
317 #endif /* __cplusplus */
318 #endif /* RNAPALN_CMDL_H */