WSTester updated to work plus hopefully all the other changes that need to go into...
[jabaws.git] / binaries / src / ViennaRNA / Progs / RNAPKplex_cmdl.h
1 /** @file RNAPKplex_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 RNAPKPLEX_CMDL_H
9 #define RNAPKPLEX_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 PKPLEX_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define PKPLEX_CMDLINE_PARSER_PACKAGE "RNAPKplex"
25 #endif
26
27 #ifndef PKPLEX_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define PKPLEX_CMDLINE_PARSER_PACKAGE_NAME "RNAPKplex"
30 #endif
31
32 #ifndef PKPLEX_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define PKPLEX_CMDLINE_PARSER_VERSION VERSION
35 #endif
36
37 /** @brief Where the command line options are stored */
38 struct PKplex_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 *version_help; /**< @brief Print version and exit help description.  */
43   float cutoff_arg;     /**< @brief Report only base pairs with an average probability > cutoff in the dot plot
44   
45  (default='0.01').  */
46   char * cutoff_orig;   /**< @brief Report only base pairs with an average probability > cutoff in the dot plot
47   
48  original value given at command line.  */
49   const char *cutoff_help; /**< @brief Report only base pairs with an average probability > cutoff in the dot plot
50   
51  help description.  */
52   double temp_arg;      /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
53   
54 .  */
55   char * temp_orig;     /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
56   
57  original value given at command line.  */
58   const char *temp_help; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C.
59   
60  help description.  */
61   int noTetra_flag;     /**< @brief Do not include special stabilizing energies for certain tetra-loops. Mostly for testing.
62   
63  (default=off).  */
64   const char *noTetra_help; /**< @brief Do not include special stabilizing energies for certain tetra-loops. Mostly for testing.
65   
66  help description.  */
67   int noLP_flag;        /**< @brief Produce structures without lonely pairs (helices of length 1).
68  (default=off).  */
69   const char *noLP_help; /**< @brief Produce structures without lonely pairs (helices of length 1).
70  help description.  */
71   int noGU_flag;        /**< @brief Do not allow GU pairs
72   
73  (default=off).  */
74   const char *noGU_help; /**< @brief Do not allow GU pairs
75   
76  help description.  */
77   int noClosingGU_flag; /**< @brief Do not allow GU pairs at the end of helices
78   
79  (default=off).  */
80   const char *noClosingGU_help; /**< @brief Do not allow GU pairs at the end of helices
81   
82  help description.  */
83   int noconv_flag;      /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
84   
85  (default=off).  */
86   const char *noconv_help; /**< @brief Do not automatically substitude nucleotide \"T\" with \"U\"
87   
88  help description.  */
89   char * nsp_arg;       /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
90  (default='empty').  */
91   char * nsp_orig;      /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
92  original value given at command line.  */
93   const char *nsp_help; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs.
94  help description.  */
95   double energyCutoff_arg;      /**< @brief Energy cutoff or pseudoknot initiation cost. Minimum energy gain of a pseudoknot interaction for it to be returned. Pseudoknots with smaller energy gains are rejected.
96   
97  (default='-8.10').  */
98   char * energyCutoff_orig;     /**< @brief Energy cutoff or pseudoknot initiation cost. Minimum energy gain of a pseudoknot interaction for it to be returned. Pseudoknots with smaller energy gains are rejected.
99   
100  original value given at command line.  */
101   const char *energyCutoff_help; /**< @brief Energy cutoff or pseudoknot initiation cost. Minimum energy gain of a pseudoknot interaction for it to be returned. Pseudoknots with smaller energy gains are rejected.
102   
103  help description.  */
104   char * paramFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
105 .  */
106   char * paramFile_orig;        /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
107  original value given at command line.  */
108   const char *paramFile_help; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
109  help description.  */
110   int verbose_flag;     /**< @brief print verbose output
111  (default=off).  */
112   const char *verbose_help; /**< @brief print verbose output
113  help description.  */
114   double subopts_arg;   /**< @brief print suboptimal structures whose energy difference of the pseudoknot to the optimum pseudoknot is smaller than the given value.
115  (default='0.0').  */
116   char * subopts_orig;  /**< @brief print suboptimal structures whose energy difference of the pseudoknot to the optimum pseudoknot is smaller than the given value.
117  original value given at command line.  */
118   const char *subopts_help; /**< @brief print suboptimal structures whose energy difference of the pseudoknot to the optimum pseudoknot is smaller than the given value.
119  help description.  */
120   
121   unsigned int help_given ;     /**< @brief Whether help was given.  */
122   unsigned int detailed_help_given ;    /**< @brief Whether detailed-help was given.  */
123   unsigned int version_given ;  /**< @brief Whether version was given.  */
124   unsigned int cutoff_given ;   /**< @brief Whether cutoff was given.  */
125   unsigned int temp_given ;     /**< @brief Whether temp was given.  */
126   unsigned int noTetra_given ;  /**< @brief Whether noTetra was given.  */
127   unsigned int noLP_given ;     /**< @brief Whether noLP was given.  */
128   unsigned int noGU_given ;     /**< @brief Whether noGU was given.  */
129   unsigned int noClosingGU_given ;      /**< @brief Whether noClosingGU was given.  */
130   unsigned int noconv_given ;   /**< @brief Whether noconv was given.  */
131   unsigned int nsp_given ;      /**< @brief Whether nsp was given.  */
132   unsigned int energyCutoff_given ;     /**< @brief Whether energyCutoff was given.  */
133   unsigned int paramFile_given ;        /**< @brief Whether paramFile was given.  */
134   unsigned int verbose_given ;  /**< @brief Whether verbose was given.  */
135   unsigned int subopts_given ;  /**< @brief Whether subopts was given.  */
136
137 } ;
138
139 /** @brief The additional parameters to pass to parser functions */
140 struct PKplex_cmdline_parser_params
141 {
142   int override; /**< @brief whether to override possibly already present options (default 0) */
143   int initialize; /**< @brief whether to initialize the option structure PKplex_args_info (default 1) */
144   int check_required; /**< @brief whether to check that all required options were provided (default 1) */
145   int check_ambiguity; /**< @brief whether to check for options already specified in the option structure PKplex_args_info (default 0) */
146   int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
147 } ;
148
149 /** @brief the purpose string of the program */
150 extern const char *PKplex_args_info_purpose;
151 /** @brief the usage string of the program */
152 extern const char *PKplex_args_info_usage;
153 /** @brief all the lines making the help output */
154 extern const char *PKplex_args_info_help[];
155 /** @brief all the lines making the detailed help output (including hidden options and details) */
156 extern const char *PKplex_args_info_detailed_help[];
157
158 /**
159  * The command line parser
160  * @param argc the number of command line options
161  * @param argv the command line options
162  * @param args_info the structure where option information will be stored
163  * @return 0 if everything went fine, NON 0 if an error took place
164  */
165 int PKplex_cmdline_parser (int argc, char **argv,
166   struct PKplex_args_info *args_info);
167
168 /**
169  * The command line parser (version with additional parameters - deprecated)
170  * @param argc the number of command line options
171  * @param argv the command line options
172  * @param args_info the structure where option information will be stored
173  * @param override whether to override possibly already present options
174  * @param initialize whether to initialize the option structure my_args_info
175  * @param check_required whether to check that all required options were provided
176  * @return 0 if everything went fine, NON 0 if an error took place
177  * @deprecated use PKplex_cmdline_parser_ext() instead
178  */
179 int PKplex_cmdline_parser2 (int argc, char **argv,
180   struct PKplex_args_info *args_info,
181   int override, int initialize, int check_required);
182
183 /**
184  * The command line parser (version with additional parameters)
185  * @param argc the number of command line options
186  * @param argv the command line options
187  * @param args_info the structure where option information will be stored
188  * @param params additional parameters for the parser
189  * @return 0 if everything went fine, NON 0 if an error took place
190  */
191 int PKplex_cmdline_parser_ext (int argc, char **argv,
192   struct PKplex_args_info *args_info,
193   struct PKplex_cmdline_parser_params *params);
194
195 /**
196  * Save the contents of the option struct into an already open FILE stream.
197  * @param outfile the stream where to dump options
198  * @param args_info the option struct to dump
199  * @return 0 if everything went fine, NON 0 if an error took place
200  */
201 int PKplex_cmdline_parser_dump(FILE *outfile,
202   struct PKplex_args_info *args_info);
203
204 /**
205  * Save the contents of the option struct into a (text) file.
206  * This file can be read by the config file parser (if generated by gengetopt)
207  * @param filename the file where to save
208  * @param args_info the option struct to save
209  * @return 0 if everything went fine, NON 0 if an error took place
210  */
211 int PKplex_cmdline_parser_file_save(const char *filename,
212   struct PKplex_args_info *args_info);
213
214 /**
215  * Print the help
216  */
217 void PKplex_cmdline_parser_print_help(void);
218 /**
219  * Print the detailed help (including hidden options and details)
220  */
221 void PKplex_cmdline_parser_print_detailed_help(void);
222 /**
223  * Print the version
224  */
225 void PKplex_cmdline_parser_print_version(void);
226
227 /**
228  * Initializes all the fields a PKplex_cmdline_parser_params structure 
229  * to their default values
230  * @param params the structure to initialize
231  */
232 void PKplex_cmdline_parser_params_init(struct PKplex_cmdline_parser_params *params);
233
234 /**
235  * Allocates dynamically a PKplex_cmdline_parser_params structure and initializes
236  * all its fields to their default values
237  * @return the created and initialized PKplex_cmdline_parser_params structure
238  */
239 struct PKplex_cmdline_parser_params *PKplex_cmdline_parser_params_create(void);
240
241 /**
242  * Initializes the passed PKplex_args_info structure's fields
243  * (also set default values for options that have a default)
244  * @param args_info the structure to initialize
245  */
246 void PKplex_cmdline_parser_init (struct PKplex_args_info *args_info);
247 /**
248  * Deallocates the string fields of the PKplex_args_info structure
249  * (but does not deallocate the structure itself)
250  * @param args_info the structure to deallocate
251  */
252 void PKplex_cmdline_parser_free (struct PKplex_args_info *args_info);
253
254 /**
255  * Checks that all the required options were specified
256  * @param args_info the structure to check
257  * @param prog_name the name of the program that will be used to print
258  *   possible errors
259  * @return
260  */
261 int PKplex_cmdline_parser_required (struct PKplex_args_info *args_info,
262   const char *prog_name);
263
264
265 #ifdef __cplusplus
266 }
267 #endif /* __cplusplus */
268 #endif /* RNAPKPLEX_CMDL_H */