1 /** @file RNALfold_cmdl.h 2 * @brief The header file for the command line option parser 3 * generated by GNU Gengetopt version 2.23 4 * http://www.gnu.org/software/gengetopt. 5 * DO NOT modify this file, since it can be overwritten 6 * @author GNU Gengetopt */ 7 8 #ifndef RNALFOLD_CMDL_H 9 #define RNALFOLD_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 RNALFOLD_CMDLINE_PARSER_PACKAGE 23 /** @brief the program name (used for printing errors) */ 24 #define RNALFOLD_CMDLINE_PARSER_PACKAGE "RNALfold" 25 #endif 26 27 #ifndef RNALFOLD_CMDLINE_PARSER_PACKAGE_NAME 28 /** @brief the complete program name (used for help and version) */ 29 #define RNALFOLD_CMDLINE_PARSER_PACKAGE_NAME "RNALfold" 30 #endif 31 32 #ifndef RNALFOLD_CMDLINE_PARSER_VERSION 33 /** @brief the program version */ 34 #define RNALFOLD_CMDLINE_PARSER_VERSION VERSION 35 #endif 36 37 /** @brief Where the command line options are stored */ 38 struct RNALfold_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 verbose_flag; /**< @brief Be verbose 45 46 (default=off). */ 47 const char *verbose_help; /**< @brief Be verbose 48 49 help description. */ 50 int span_arg; /**< @brief Set the maximum distance between any two pairing nucleotides. 51 (default='150'). */ 52 char * span_orig; /**< @brief Set the maximum distance between any two pairing nucleotides. 53 original value given at command line. */ 54 const char *span_help; /**< @brief Set the maximum distance between any two pairing nucleotides. 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 * outfile_arg; /**< @brief Print output to file instead of stdout 63 . */ 64 char * outfile_orig; /**< @brief Print output to file instead of stdout 65 original value given at command line. */ 66 const char *outfile_help; /**< @brief Print output to file instead of stdout 67 help description. */ 68 char * infile_arg; /**< @brief Read a file instead of reading from stdin 69 . */ 70 char * infile_orig; /**< @brief Read a file instead of reading from stdin 71 original value given at command line. */ 72 const char *infile_help; /**< @brief Read a file instead of reading from stdin 73 help description. */ 74 int auto_id_flag; /**< @brief Automatically generate an ID for each sequence. 75 (default=off). */ 76 const char *auto_id_help; /**< @brief Automatically generate an ID for each sequence. 77 help description. */ 78 char * id_prefix_arg; /**< @brief Set prefix for automatically generated IDs 79 (default='sequence'). */ 80 char * id_prefix_orig; /**< @brief Set prefix for automatically generated IDs 81 original value given at command line. */ 82 const char *id_prefix_help; /**< @brief Set prefix for automatically generated IDs 83 help description. */ 84 char * id_delim_arg; /**< @brief Change prefix delimiter for automatically generated ids. 85 (default='_'). */ 86 char * id_delim_orig; /**< @brief Change prefix delimiter for automatically generated ids. 87 original value given at command line. */ 88 const char *id_delim_help; /**< @brief Change prefix delimiter for automatically generated ids. 89 help description. */ 90 int id_digits_arg; /**< @brief Specify the number of digits of the counter in automatically generated alignment IDs. 91 (default='4'). */ 92 char * id_digits_orig; /**< @brief Specify the number of digits of the counter in automatically generated alignment IDs. 93 original value given at command line. */ 94 const char *id_digits_help; /**< @brief Specify the number of digits of the counter in automatically generated alignment IDs. 95 help description. */ 96 long id_start_arg; /**< @brief Specify the first number in automatically generated alignment IDs. 97 (default='1'). */ 98 char * id_start_orig; /**< @brief Specify the first number in automatically generated alignment IDs. 99 original value given at command line. */ 100 const char *id_start_help; /**< @brief Specify the first number in automatically generated alignment IDs. 101 help description. */ 102 char * filename_delim_arg; /**< @brief Change the delimiting character that is used for sanitized filenames 103 104 (default='ID-delimiter'). */ 105 char * filename_delim_orig; /**< @brief Change the delimiting character that is used for sanitized filenames 106 107 original value given at command line. */ 108 const char *filename_delim_help; /**< @brief Change the delimiting character that is used for sanitized filenames 109 110 help description. */ 111 int filename_full_flag; /**< @brief Use full FASTA header to create filenames 112 113 (default=off). */ 114 const char *filename_full_help; /**< @brief Use full FASTA header to create filenames 115 116 help description. */ 117 char * commands_arg; /**< @brief Read additional commands from file 118 . */ 119 char * commands_orig; /**< @brief Read additional commands from file 120 original value given at command line. */ 121 const char *commands_help; /**< @brief Read additional commands from file 122 help description. */ 123 double zscore_arg; /**< @brief Limit the output to predictions with a Z-score below a threshold 124 (default='-2'). */ 125 char * zscore_orig; /**< @brief Limit the output to predictions with a Z-score below a threshold 126 original value given at command line. */ 127 const char *zscore_help; /**< @brief Limit the output to predictions with a Z-score below a threshold 128 help description. */ 129 int zscore_pre_filter_flag; /**< @brief Apply the z-score filtering in the forward recursions 130 (default=off). */ 131 const char *zscore_pre_filter_help; /**< @brief Apply the z-score filtering in the forward recursions 132 help description. */ 133 int zscore_report_subsumed_flag; /**< @brief Report subsumed structures if their z-score is less than that of the enclosing structure 134 (default=off). */ 135 const char *zscore_report_subsumed_help; /**< @brief Report subsumed structures if their z-score is less than that of the enclosing structure 136 help description. */ 137 int backtrack_global_flag; /**< @brief Backtrack a global MFE structure. 138 (default=off). */ 139 const char *backtrack_global_help; /**< @brief Backtrack a global MFE structure. 140 help description. */ 141 int gquad_flag; /**< @brief Incoorporate G-Quadruplex formation into the structure prediction algorithm 142 143 (default=off). */ 144 const char *gquad_help; /**< @brief Incoorporate G-Quadruplex formation into the structure prediction algorithm 145 146 help description. */ 147 char * shape_arg; /**< @brief Use SHAPE reactivity data to guide structure predictions. 148 149 . */ 150 char * shape_orig; /**< @brief Use SHAPE reactivity data to guide structure predictions. 151 152 original value given at command line. */ 153 const char *shape_help; /**< @brief Use SHAPE reactivity data to guide structure predictions. 154 155 help description. */ 156 char * shapeMethod_arg; /**< @brief Include SHAPE reactivity data according to a particular method. 157 (default='D'). */ 158 char * shapeMethod_orig; /**< @brief Include SHAPE reactivity data according to a particular method. 159 original value given at command line. */ 160 const char *shapeMethod_help; /**< @brief Include SHAPE reactivity data according to a particular method. 161 help description. */ 162 char * shapeConversion_arg; /**< @brief Convert SHAPE reactivity according to a particular model. 163 (default='O'). */ 164 char * shapeConversion_orig; /**< @brief Convert SHAPE reactivity according to a particular model. 165 original value given at command line. */ 166 const char *shapeConversion_help; /**< @brief Convert SHAPE reactivity according to a particular model. 167 help description. */ 168 double temp_arg; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C. 169 170 . */ 171 char * temp_orig; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C. 172 173 original value given at command line. */ 174 const char *temp_help; /**< @brief Rescale energy parameters to a temperature of temp C. Default is 37C. 175 176 help description. */ 177 int noTetra_flag; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. 178 179 (default=off). */ 180 const char *noTetra_help; /**< @brief Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. 181 182 help description. */ 183 int dangles_arg; /**< @brief Change the dangling end model 184 (default='2'). */ 185 char * dangles_orig; /**< @brief Change the dangling end model 186 original value given at command line. */ 187 const char *dangles_help; /**< @brief Change the dangling end model 188 help description. */ 189 int noLP_flag; /**< @brief Produce structures without lonely pairs (helices of length 1). 190 (default=off). */ 191 const char *noLP_help; /**< @brief Produce structures without lonely pairs (helices of length 1). 192 help description. */ 193 int noGU_flag; /**< @brief Do not allow GU pairs 194 195 (default=off). */ 196 const char *noGU_help; /**< @brief Do not allow GU pairs 197 198 help description. */ 199 int noClosingGU_flag; /**< @brief Do not allow GU pairs at the end of helices 200 201 (default=off). */ 202 const char *noClosingGU_help; /**< @brief Do not allow GU pairs at the end of helices 203 204 help description. */ 205 char * paramFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set. 206 . */ 207 char * paramFile_orig; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set. 208 original value given at command line. */ 209 const char *paramFile_help; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set. 210 help description. */ 211 char * nsp_arg; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs. 212 . */ 213 char * nsp_orig; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs. 214 original value given at command line. */ 215 const char *nsp_help; /**< @brief Allow other pairs in addition to the usual AU,GC,and GU pairs. 216 help description. */ 217 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. 218 219 . */ 220 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. 221 222 original value given at command line. */ 223 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. 224 225 help description. */ 226 227 unsigned int help_given ; /**< @brief Whether help was given. */ 228 unsigned int detailed_help_given ; /**< @brief Whether detailed-help was given. */ 229 unsigned int full_help_given ; /**< @brief Whether full-help was given. */ 230 unsigned int version_given ; /**< @brief Whether version was given. */ 231 unsigned int verbose_given ; /**< @brief Whether verbose was given. */ 232 unsigned int span_given ; /**< @brief Whether span was given. */ 233 unsigned int noconv_given ; /**< @brief Whether noconv was given. */ 234 unsigned int outfile_given ; /**< @brief Whether outfile was given. */ 235 unsigned int infile_given ; /**< @brief Whether infile was given. */ 236 unsigned int auto_id_given ; /**< @brief Whether auto-id was given. */ 237 unsigned int id_prefix_given ; /**< @brief Whether id-prefix was given. */ 238 unsigned int id_delim_given ; /**< @brief Whether id-delim was given. */ 239 unsigned int id_digits_given ; /**< @brief Whether id-digits was given. */ 240 unsigned int id_start_given ; /**< @brief Whether id-start was given. */ 241 unsigned int filename_delim_given ; /**< @brief Whether filename-delim was given. */ 242 unsigned int filename_full_given ; /**< @brief Whether filename-full was given. */ 243 unsigned int commands_given ; /**< @brief Whether commands was given. */ 244 unsigned int zscore_given ; /**< @brief Whether zscore was given. */ 245 unsigned int zscore_pre_filter_given ; /**< @brief Whether zscore-pre-filter was given. */ 246 unsigned int zscore_report_subsumed_given ; /**< @brief Whether zscore-report-subsumed was given. */ 247 unsigned int backtrack_global_given ; /**< @brief Whether backtrack-global was given. */ 248 unsigned int gquad_given ; /**< @brief Whether gquad was given. */ 249 unsigned int shape_given ; /**< @brief Whether shape was given. */ 250 unsigned int shapeMethod_given ; /**< @brief Whether shapeMethod was given. */ 251 unsigned int shapeConversion_given ; /**< @brief Whether shapeConversion was given. */ 252 unsigned int temp_given ; /**< @brief Whether temp was given. */ 253 unsigned int noTetra_given ; /**< @brief Whether noTetra was given. */ 254 unsigned int dangles_given ; /**< @brief Whether dangles was given. */ 255 unsigned int noLP_given ; /**< @brief Whether noLP was given. */ 256 unsigned int noGU_given ; /**< @brief Whether noGU was given. */ 257 unsigned int noClosingGU_given ; /**< @brief Whether noClosingGU was given. */ 258 unsigned int paramFile_given ; /**< @brief Whether paramFile was given. */ 259 unsigned int nsp_given ; /**< @brief Whether nsp was given. */ 260 unsigned int energyModel_given ; /**< @brief Whether energyModel was given. */ 261 262 } ; 263 264 /** @brief The additional parameters to pass to parser functions */ 265 struct RNALfold_cmdline_parser_params 266 { 267 int override; /**< @brief whether to override possibly already present options (default 0) */ 268 int initialize; /**< @brief whether to initialize the option structure RNALfold_args_info (default 1) */ 269 int check_required; /**< @brief whether to check that all required options were provided (default 1) */ 270 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure RNALfold_args_info (default 0) */ 271 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */ 272 } ; 273 274 /** @brief the purpose string of the program */ 275 extern const char *RNALfold_args_info_purpose; 276 /** @brief the usage string of the program */ 277 extern const char *RNALfold_args_info_usage; 278 /** @brief the description string of the program */ 279 extern const char *RNALfold_args_info_description; 280 /** @brief all the lines making the help output */ 281 extern const char *RNALfold_args_info_help[]; 282 /** @brief all the lines making the full help output (including hidden options) */ 283 extern const char *RNALfold_args_info_full_help[]; 284 /** @brief all the lines making the detailed help output (including hidden options and details) */ 285 extern const char *RNALfold_args_info_detailed_help[]; 286 287 /** 288 * The command line parser 289 * @param argc the number of command line options 290 * @param argv the command line options 291 * @param args_info the structure where option information will be stored 292 * @return 0 if everything went fine, NON 0 if an error took place 293 */ 294 int RNALfold_cmdline_parser (int argc, char **argv, 295 struct RNALfold_args_info *args_info); 296 297 /** 298 * The command line parser (version with additional parameters - deprecated) 299 * @param argc the number of command line options 300 * @param argv the command line options 301 * @param args_info the structure where option information will be stored 302 * @param override whether to override possibly already present options 303 * @param initialize whether to initialize the option structure my_args_info 304 * @param check_required whether to check that all required options were provided 305 * @return 0 if everything went fine, NON 0 if an error took place 306 * @deprecated use RNALfold_cmdline_parser_ext() instead 307 */ 308 int RNALfold_cmdline_parser2 (int argc, char **argv, 309 struct RNALfold_args_info *args_info, 310 int override, int initialize, int check_required); 311 312 /** 313 * The command line parser (version with additional parameters) 314 * @param argc the number of command line options 315 * @param argv the command line options 316 * @param args_info the structure where option information will be stored 317 * @param params additional parameters for the parser 318 * @return 0 if everything went fine, NON 0 if an error took place 319 */ 320 int RNALfold_cmdline_parser_ext (int argc, char **argv, 321 struct RNALfold_args_info *args_info, 322 struct RNALfold_cmdline_parser_params *params); 323 324 /** 325 * Save the contents of the option struct into an already open FILE stream. 326 * @param outfile the stream where to dump options 327 * @param args_info the option struct to dump 328 * @return 0 if everything went fine, NON 0 if an error took place 329 */ 330 int RNALfold_cmdline_parser_dump(FILE *outfile, 331 struct RNALfold_args_info *args_info); 332 333 /** 334 * Save the contents of the option struct into a (text) file. 335 * This file can be read by the config file parser (if generated by gengetopt) 336 * @param filename the file where to save 337 * @param args_info the option struct to save 338 * @return 0 if everything went fine, NON 0 if an error took place 339 */ 340 int RNALfold_cmdline_parser_file_save(const char *filename, 341 struct RNALfold_args_info *args_info); 342 343 /** 344 * Print the help 345 */ 346 void RNALfold_cmdline_parser_print_help(void); 347 /** 348 * Print the full help (including hidden options) 349 */ 350 void RNALfold_cmdline_parser_print_full_help(void); 351 /** 352 * Print the detailed help (including hidden options and details) 353 */ 354 void RNALfold_cmdline_parser_print_detailed_help(void); 355 /** 356 * Print the version 357 */ 358 void RNALfold_cmdline_parser_print_version(void); 359 360 /** 361 * Initializes all the fields a RNALfold_cmdline_parser_params structure 362 * to their default values 363 * @param params the structure to initialize 364 */ 365 void RNALfold_cmdline_parser_params_init(struct RNALfold_cmdline_parser_params *params); 366 367 /** 368 * Allocates dynamically a RNALfold_cmdline_parser_params structure and initializes 369 * all its fields to their default values 370 * @return the created and initialized RNALfold_cmdline_parser_params structure 371 */ 372 struct RNALfold_cmdline_parser_params *RNALfold_cmdline_parser_params_create(void); 373 374 /** 375 * Initializes the passed RNALfold_args_info structure's fields 376 * (also set default values for options that have a default) 377 * @param args_info the structure to initialize 378 */ 379 void RNALfold_cmdline_parser_init (struct RNALfold_args_info *args_info); 380 /** 381 * Deallocates the string fields of the RNALfold_args_info structure 382 * (but does not deallocate the structure itself) 383 * @param args_info the structure to deallocate 384 */ 385 void RNALfold_cmdline_parser_free (struct RNALfold_args_info *args_info); 386 387 /** 388 * Checks that all the required options were specified 389 * @param args_info the structure to check 390 * @param prog_name the name of the program that will be used to print 391 * possible errors 392 * @return 393 */ 394 int RNALfold_cmdline_parser_required (struct RNALfold_args_info *args_info, 395 const char *prog_name); 396 397 398 #ifdef __cplusplus 399 } 400 #endif /* __cplusplus */ 401 #endif /* RNALFOLD_CMDL_H */ 402