Add missing binaty and statis library
[jabaws.git] / binaries / src / ViennaRNA / Progs / RNAplex_cmdl.h
1 /** @file RNAplex_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 RNAPLEX_CMDL_H
9 #define RNAPLEX_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 RNAPLEX_CMDLINE_PARSER_PACKAGE
23 /** @brief the program name (used for printing errors) */
24 #define RNAPLEX_CMDLINE_PARSER_PACKAGE "RNAplex"
25 #endif
26
27 #ifndef RNAPLEX_CMDLINE_PARSER_PACKAGE_NAME
28 /** @brief the complete program name (used for help and version) */
29 #define RNAPLEX_CMDLINE_PARSER_PACKAGE_NAME "RNAplex"
30 #endif
31
32 #ifndef RNAPLEX_CMDLINE_PARSER_VERSION
33 /** @brief the program version */
34 #define RNAPLEX_CMDLINE_PARSER_VERSION VERSION
35 #endif
36
37 /** @brief Where the command line options are stored */
38 struct RNAplex_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   char * query_arg;     /**< @brief File containing the query sequence.
44 .  */
45   char * query_orig;    /**< @brief File containing the query sequence.
46  original value given at command line.  */
47   const char *query_help; /**< @brief File containing the query sequence.
48  help description.  */
49   char * target_arg;    /**< @brief File containing the target sequence.
50 .  */
51   char * target_orig;   /**< @brief File containing the target sequence.
52  original value given at command line.  */
53   const char *target_help; /**< @brief File containing the target sequence.
54  help description.  */
55   char * accessibility_dir_arg; /**< @brief Location of the accessibility profiles.
56 .  */
57   char * accessibility_dir_orig;        /**< @brief Location of the accessibility profiles.
58  original value given at command line.  */
59   const char *accessibility_dir_help; /**< @brief Location of the accessibility profiles.
60  help description.  */
61   int binary_flag;      /**< @brief Allow the reading and parsing of memory dumped opening energy file
62  (default=off).  */
63   const char *binary_help; /**< @brief Allow the reading and parsing of memory dumped opening energy file
64  help description.  */
65   char * paramFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
66 .  */
67   char * paramFile_orig;        /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
68  original value given at command line.  */
69   const char *paramFile_help; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set.
70  help description.  */
71   double temp_arg;      /**< @brief Rescale energy parameters to a temperature T. Default is 37C.
72   
73 .  */
74   char * temp_orig;     /**< @brief Rescale energy parameters to a temperature T. Default is 37C.
75   
76  original value given at command line.  */
77   const char *temp_help; /**< @brief Rescale energy parameters to a temperature T. Default is 37C.
78   
79  help description.  */
80   int interaction_length_arg;   /**< @brief Maximal length of an interaction
81  (default='40').  */
82   char * interaction_length_orig;       /**< @brief Maximal length of an interaction
83  original value given at command line.  */
84   const char *interaction_length_help; /**< @brief Maximal length of an interaction
85  help description.  */
86   int extension_cost_arg;       /**< @brief Cost to add to each nucleotide in a duplex
87  (default='0').  */
88   char * extension_cost_orig;   /**< @brief Cost to add to each nucleotide in a duplex
89  original value given at command line.  */
90   const char *extension_cost_help; /**< @brief Cost to add to each nucleotide in a duplex
91  help description.  */
92   int probe_mode_flag;  /**< @brief Compute Tm for probes (default=off).  */
93   const char *probe_mode_help; /**< @brief Compute Tm for probes help description.  */
94   double probe_concentration_arg;       /**< @brief Set the probe concentration for the Tm computation
95   
96  (default='0.1').  */
97   char * probe_concentration_orig;      /**< @brief Set the probe concentration for the Tm computation
98   
99  original value given at command line.  */
100   const char *probe_concentration_help; /**< @brief Set the probe concentration for the Tm computation
101   
102  help description.  */
103   double na_concentration_arg;  /**< @brief Set the Na+ concentration for the Tm computation
104   
105  (default='1.0').  */
106   char * na_concentration_orig; /**< @brief Set the Na+ concentration for the Tm computation
107   
108  original value given at command line.  */
109   const char *na_concentration_help; /**< @brief Set the Na+ concentration for the Tm computation
110   
111  help description.  */
112   double mg_concentration_arg;  /**< @brief Set the Mg2+ concentration for the Tm computation
113   
114  (default='1.0').  */
115   char * mg_concentration_orig; /**< @brief Set the Mg2+ concentration for the Tm computation
116   
117  original value given at command line.  */
118   const char *mg_concentration_help; /**< @brief Set the Mg2+ concentration for the Tm computation
119   
120  help description.  */
121   double k_concentration_arg;   /**< @brief Set the K+ concentration for the Tm computation
122   
123  (default='1.0').  */
124   char * k_concentration_orig;  /**< @brief Set the K+ concentration for the Tm computation
125   
126  original value given at command line.  */
127   const char *k_concentration_help; /**< @brief Set the K+ concentration for the Tm computation
128   
129  help description.  */
130   double tris_concentration_arg;        /**< @brief Set the tris+ concentration for the Tm computation
131   
132  (default='1.0').  */
133   char * tris_concentration_orig;       /**< @brief Set the tris+ concentration for the Tm computation
134   
135  original value given at command line.  */
136   const char *tris_concentration_help; /**< @brief Set the tris+ concentration for the Tm computation
137   
138  help description.  */
139   int fast_folding_arg; /**< @brief Speedup of the target search
140  (default='0').  */
141   char * fast_folding_orig;     /**< @brief Speedup of the target search
142  original value given at command line.  */
143   const char *fast_folding_help; /**< @brief Speedup of the target search
144  help description.  */
145   double scale_accessibility_arg;       /**< @brief Rescale all opening energy by a factor V
146  (default='1.0').  */
147   char * scale_accessibility_orig;      /**< @brief Rescale all opening energy by a factor V
148  original value given at command line.  */
149   const char *scale_accessibility_help; /**< @brief Rescale all opening energy by a factor V
150  help description.  */
151   int constraint_flag;  /**< @brief Calculate structures subject to constraints.
152  (default=off).  */
153   const char *constraint_help; /**< @brief Calculate structures subject to constraints.
154  help description.  */
155   int alignment_mode_flag;      /**< @brief Tells RNAplex to compute interactions based on alignments
156  (default=off).  */
157   const char *alignment_mode_help; /**< @brief Tells RNAplex to compute interactions based on alignments
158  help description.  */
159   int convert_to_bin_flag;      /**< @brief If set, RNAplex will convert all opening energy file in a directory set by the -a option into binary opening energy files
160  (default=off).  */
161   const char *convert_to_bin_help; /**< @brief If set, RNAplex will convert all opening energy file in a directory set by the -a option into binary opening energy files
162  help description.  */
163   int duplex_distance_arg;      /**< @brief Distance between target 3' ends of two consecutive duplexes
164  (default='0').  */
165   char * duplex_distance_orig;  /**< @brief Distance between target 3' ends of two consecutive duplexes
166  original value given at command line.  */
167   const char *duplex_distance_help; /**< @brief Distance between target 3' ends of two consecutive duplexes
168  help description.  */
169   double energy_threshold_arg;  /**< @brief Minimal energy for a duplex to be returned
170  (default='-100000').  */
171   char * energy_threshold_orig; /**< @brief Minimal energy for a duplex to be returned
172  original value given at command line.  */
173   const char *energy_threshold_help; /**< @brief Minimal energy for a duplex to be returned
174  help description.  */
175   char * produce_ps_arg;        /**< @brief Draw an alignment annotated interaction from RNAplex
176 .  */
177   char * produce_ps_orig;       /**< @brief Draw an alignment annotated interaction from RNAplex
178  original value given at command line.  */
179   const char *produce_ps_help; /**< @brief Draw an alignment annotated interaction from RNAplex
180  help description.  */
181   int WindowLength_arg; /**< @brief Tells how large the region around the target site should be for redrawing the alignment interaction
182  (default='1').  */
183   char * WindowLength_orig;     /**< @brief Tells how large the region around the target site should be for redrawing the alignment interaction
184  original value given at command line.  */
185   const char *WindowLength_help; /**< @brief Tells how large the region around the target site should be for redrawing the alignment interaction
186  help description.  */
187   
188   unsigned int help_given ;     /**< @brief Whether help was given.  */
189   unsigned int detailed_help_given ;    /**< @brief Whether detailed-help was given.  */
190   unsigned int version_given ;  /**< @brief Whether version was given.  */
191   unsigned int query_given ;    /**< @brief Whether query was given.  */
192   unsigned int target_given ;   /**< @brief Whether target was given.  */
193   unsigned int accessibility_dir_given ;        /**< @brief Whether accessibility-dir was given.  */
194   unsigned int binary_given ;   /**< @brief Whether binary was given.  */
195   unsigned int paramFile_given ;        /**< @brief Whether paramFile was given.  */
196   unsigned int temp_given ;     /**< @brief Whether temp was given.  */
197   unsigned int interaction_length_given ;       /**< @brief Whether interaction-length was given.  */
198   unsigned int extension_cost_given ;   /**< @brief Whether extension-cost was given.  */
199   unsigned int probe_mode_given ;       /**< @brief Whether probe-mode was given.  */
200   unsigned int probe_concentration_given ;      /**< @brief Whether probe-concentration was given.  */
201   unsigned int na_concentration_given ; /**< @brief Whether na-concentration was given.  */
202   unsigned int mg_concentration_given ; /**< @brief Whether mg-concentration was given.  */
203   unsigned int k_concentration_given ;  /**< @brief Whether k-concentration was given.  */
204   unsigned int tris_concentration_given ;       /**< @brief Whether tris-concentration was given.  */
205   unsigned int fast_folding_given ;     /**< @brief Whether fast-folding was given.  */
206   unsigned int scale_accessibility_given ;      /**< @brief Whether scale-accessibility was given.  */
207   unsigned int constraint_given ;       /**< @brief Whether constraint was given.  */
208   unsigned int alignment_mode_given ;   /**< @brief Whether alignment-mode was given.  */
209   unsigned int convert_to_bin_given ;   /**< @brief Whether convert-to-bin was given.  */
210   unsigned int duplex_distance_given ;  /**< @brief Whether duplex-distance was given.  */
211   unsigned int energy_threshold_given ; /**< @brief Whether energy-threshold was given.  */
212   unsigned int produce_ps_given ;       /**< @brief Whether produce-ps was given.  */
213   unsigned int WindowLength_given ;     /**< @brief Whether WindowLength was given.  */
214
215 } ;
216
217 /** @brief The additional parameters to pass to parser functions */
218 struct RNAplex_cmdline_parser_params
219 {
220   int override; /**< @brief whether to override possibly already present options (default 0) */
221   int initialize; /**< @brief whether to initialize the option structure RNAplex_args_info (default 1) */
222   int check_required; /**< @brief whether to check that all required options were provided (default 1) */
223   int check_ambiguity; /**< @brief whether to check for options already specified in the option structure RNAplex_args_info (default 0) */
224   int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
225 } ;
226
227 /** @brief the purpose string of the program */
228 extern const char *RNAplex_args_info_purpose;
229 /** @brief the usage string of the program */
230 extern const char *RNAplex_args_info_usage;
231 /** @brief all the lines making the help output */
232 extern const char *RNAplex_args_info_help[];
233 /** @brief all the lines making the detailed help output (including hidden options and details) */
234 extern const char *RNAplex_args_info_detailed_help[];
235
236 /**
237  * The command line parser
238  * @param argc the number of command line options
239  * @param argv the command line options
240  * @param args_info the structure where option information will be stored
241  * @return 0 if everything went fine, NON 0 if an error took place
242  */
243 int RNAplex_cmdline_parser (int argc, char **argv,
244   struct RNAplex_args_info *args_info);
245
246 /**
247  * The command line parser (version with additional parameters - deprecated)
248  * @param argc the number of command line options
249  * @param argv the command line options
250  * @param args_info the structure where option information will be stored
251  * @param override whether to override possibly already present options
252  * @param initialize whether to initialize the option structure my_args_info
253  * @param check_required whether to check that all required options were provided
254  * @return 0 if everything went fine, NON 0 if an error took place
255  * @deprecated use RNAplex_cmdline_parser_ext() instead
256  */
257 int RNAplex_cmdline_parser2 (int argc, char **argv,
258   struct RNAplex_args_info *args_info,
259   int override, int initialize, int check_required);
260
261 /**
262  * The command line parser (version with additional parameters)
263  * @param argc the number of command line options
264  * @param argv the command line options
265  * @param args_info the structure where option information will be stored
266  * @param params additional parameters for the parser
267  * @return 0 if everything went fine, NON 0 if an error took place
268  */
269 int RNAplex_cmdline_parser_ext (int argc, char **argv,
270   struct RNAplex_args_info *args_info,
271   struct RNAplex_cmdline_parser_params *params);
272
273 /**
274  * Save the contents of the option struct into an already open FILE stream.
275  * @param outfile the stream where to dump options
276  * @param args_info the option struct to dump
277  * @return 0 if everything went fine, NON 0 if an error took place
278  */
279 int RNAplex_cmdline_parser_dump(FILE *outfile,
280   struct RNAplex_args_info *args_info);
281
282 /**
283  * Save the contents of the option struct into a (text) file.
284  * This file can be read by the config file parser (if generated by gengetopt)
285  * @param filename the file where to save
286  * @param args_info the option struct to save
287  * @return 0 if everything went fine, NON 0 if an error took place
288  */
289 int RNAplex_cmdline_parser_file_save(const char *filename,
290   struct RNAplex_args_info *args_info);
291
292 /**
293  * Print the help
294  */
295 void RNAplex_cmdline_parser_print_help(void);
296 /**
297  * Print the detailed help (including hidden options and details)
298  */
299 void RNAplex_cmdline_parser_print_detailed_help(void);
300 /**
301  * Print the version
302  */
303 void RNAplex_cmdline_parser_print_version(void);
304
305 /**
306  * Initializes all the fields a RNAplex_cmdline_parser_params structure 
307  * to their default values
308  * @param params the structure to initialize
309  */
310 void RNAplex_cmdline_parser_params_init(struct RNAplex_cmdline_parser_params *params);
311
312 /**
313  * Allocates dynamically a RNAplex_cmdline_parser_params structure and initializes
314  * all its fields to their default values
315  * @return the created and initialized RNAplex_cmdline_parser_params structure
316  */
317 struct RNAplex_cmdline_parser_params *RNAplex_cmdline_parser_params_create(void);
318
319 /**
320  * Initializes the passed RNAplex_args_info structure's fields
321  * (also set default values for options that have a default)
322  * @param args_info the structure to initialize
323  */
324 void RNAplex_cmdline_parser_init (struct RNAplex_args_info *args_info);
325 /**
326  * Deallocates the string fields of the RNAplex_args_info structure
327  * (but does not deallocate the structure itself)
328  * @param args_info the structure to deallocate
329  */
330 void RNAplex_cmdline_parser_free (struct RNAplex_args_info *args_info);
331
332 /**
333  * Checks that all the required options were specified
334  * @param args_info the structure to check
335  * @param prog_name the name of the program that will be used to print
336  *   possible errors
337  * @return
338  */
339 int RNAplex_cmdline_parser_required (struct RNAplex_args_info *args_info,
340   const char *prog_name);
341
342
343 #ifdef __cplusplus
344 }
345 #endif /* __cplusplus */
346 #endif /* RNAPLEX_CMDL_H */