1 /** @file RNAlocmin_cmdline.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 RNALOCMIN_CMDLINE_H 9 #define RNALOCMIN_CMDLINE_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 CMDLINE_PARSER_PACKAGE 23 /** @brief the program name (used for printing errors) */ 24 #define CMDLINE_PARSER_PACKAGE "RNAlocmin" 25 #endif 26 27 #ifndef CMDLINE_PARSER_PACKAGE_NAME 28 /** @brief the complete program name (used for help and version) */ 29 #define CMDLINE_PARSER_PACKAGE_NAME "RNAlocmin" 30 #endif 31 32 #ifndef CMDLINE_PARSER_VERSION 33 /** @brief the program version */ 34 #define CMDLINE_PARSER_VERSION "2.1" 35 #endif 36 37 /** @brief Where the command line options are stored */ 38 struct gengetopt_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 * seq_arg; /**< @brief Sequence file in FASTA format. If the sequence is the first line of the input file, this is not needed (default='seq.txt'). */ 45 char * seq_orig; /**< @brief Sequence file in FASTA format. If the sequence is the first line of the input file, this is not needed original value given at command line. */ 46 const char *seq_help; /**< @brief Sequence file in FASTA format. If the sequence is the first line of the input file, this is not needed help description. */ 47 char * previous_arg; /**< @brief Previously found LM (output from RNAlocmin or barriers), if specified does not need --seq option. */ 48 char * previous_orig; /**< @brief Previously found LM (output from RNAlocmin or barriers), if specified does not need --seq option original value given at command line. */ 49 const char *previous_help; /**< @brief Previously found LM (output from RNAlocmin or barriers), if specified does not need --seq option help description. */ 50 char * move_arg; /**< @brief Move set: 51 I ==> insertion & deletion of base pairs 52 S ==> I&D& switch of base pairs (default='I'). */ 53 char * move_orig; /**< @brief Move set: 54 I ==> insertion & deletion of base pairs 55 S ==> I&D& switch of base pairs original value given at command line. */ 56 const char *move_help; /**< @brief Move set: 57 I ==> insertion & deletion of base pairs 58 S ==> I&D& switch of base pairs help description. */ 59 int min_num_arg; /**< @brief Maximal number of local minima returned 60 (0 == unlimited) (default='100000'). */ 61 char * min_num_orig; /**< @brief Maximal number of local minima returned 62 (0 == unlimited) original value given at command line. */ 63 const char *min_num_help; /**< @brief Maximal number of local minima returned 64 (0 == unlimited) help description. */ 65 int find_num_arg; /**< @brief Maximal number of local minima found 66 (default = unlimited - crawl through whole input file). */ 67 char * find_num_orig; /**< @brief Maximal number of local minima found 68 (default = unlimited - crawl through whole input file) original value given at command line. */ 69 const char *find_num_help; /**< @brief Maximal number of local minima found 70 (default = unlimited - crawl through whole input file) help description. */ 71 int verbose_lvl_arg; /**< @brief Level of verbosity (0 = nothing, 4 = full) 72 WARNING: higher verbose levels increase the computation time (default='0'). */ 73 char * verbose_lvl_orig; /**< @brief Level of verbosity (0 = nothing, 4 = full) 74 WARNING: higher verbose levels increase the computation time original value given at command line. */ 75 const char *verbose_lvl_help; /**< @brief Level of verbosity (0 = nothing, 4 = full) 76 WARNING: higher verbose levels increase the computation time help description. */ 77 int depth_arg; /**< @brief Depth of findpath search (higher value increases running time linearly) (default='10'). */ 78 char * depth_orig; /**< @brief Depth of findpath search (higher value increases running time linearly) original value given at command line. */ 79 const char *depth_help; /**< @brief Depth of findpath search (higher value increases running time linearly) help description. */ 80 double minh_arg; /**< @brief Print only minima with energy barrier greater than this (default='0.0'). */ 81 char * minh_orig; /**< @brief Print only minima with energy barrier greater than this original value given at command line. */ 82 const char *minh_help; /**< @brief Print only minima with energy barrier greater than this help description. */ 83 int minh_lite_flag; /**< @brief When flooding with --minh option, search for only saddle (do not search for a LM that is lower). Increases efficiency a tiny bit, but when turned on, the results may omit some non-shallow minima, especially with higher --minh value. (default=off). */ 84 const char *minh_lite_help; /**< @brief When flooding with --minh option, search for only saddle (do not search for a LM that is lower). Increases efficiency a tiny bit, but when turned on, the results may omit some non-shallow minima, especially with higher --minh value. help description. */ 85 char * walk_arg; /**< @brief Walking method used 86 D ==> gradient descent 87 F ==> use first found lower energy structure 88 R ==> use random lower energy structure (does not work with --noLP and -m S options) (default='D'). */ 89 char * walk_orig; /**< @brief Walking method used 90 D ==> gradient descent 91 F ==> use first found lower energy structure 92 R ==> use random lower energy structure (does not work with --noLP and -m S options) original value given at command line. */ 93 const char *walk_help; /**< @brief Walking method used 94 D ==> gradient descent 95 F ==> use first found lower energy structure 96 R ==> use random lower energy structure (does not work with --noLP and -m S options) help description. */ 97 int noLP_flag; /**< @brief Work only with canonical RNA structures (w/o isolated base pairs, cannot be combined with ranodm walk (-w R option) and shift move set (-m S)) (default=off). */ 98 const char *noLP_help; /**< @brief Work only with canonical RNA structures (w/o isolated base pairs, cannot be combined with ranodm walk (-w R option) and shift move set (-m S)) help description. */ 99 int useEOS_flag; /**< @brief Use energy_of_structure_pt calculation instead of energy_of_move (slower, it should not affect results) (default=off). */ 100 const char *useEOS_help; /**< @brief Use energy_of_structure_pt calculation instead of energy_of_move (slower, it should not affect results) help description. */ 101 char * paramFile_arg; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set. */ 102 char * paramFile_orig; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set original value given at command line. */ 103 const char *paramFile_help; /**< @brief Read energy parameters from paramfile, instead of using the default parameter set help description. */ 104 int dangles_arg; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops 105 (default='2'). */ 106 char * dangles_orig; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops 107 original value given at command line. */ 108 const char *dangles_help; /**< @brief How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops 109 help description. */ 110 char * fix_barriers_arg; /**< @brief Fix barrier file for interior loops (just recompute if all LM in barrier output are LM), if specified, does not need neither --previous nor --seq option. */ 111 char * fix_barriers_orig; /**< @brief Fix barrier file for interior loops (just recompute if all LM in barrier output are LM), if specified, does not need neither --previous nor --seq option original value given at command line. */ 112 const char *fix_barriers_help; /**< @brief Fix barrier file for interior loops (just recompute if all LM in barrier output are LM), if specified, does not need neither --previous nor --seq option help description. */ 113 int pseudoknots_flag; /**< @brief Allow for pseudoknots according to \"gfold\" model - H, K, L, and M types (genus one) of pseudoknots are allowed (increases computation time greatly), cannot be combined with shift move set (-m S) (default=off). */ 114 const char *pseudoknots_help; /**< @brief Allow for pseudoknots according to \"gfold\" model - H, K, L, and M types (genus one) of pseudoknots are allowed (increases computation time greatly), cannot be combined with shift move set (-m S) help description. */ 115 int just_read_flag; /**< @brief Do not expect input from stdin, just do postprocessing. (default=off). */ 116 const char *just_read_help; /**< @brief Do not expect input from stdin, just do postprocessing. help description. */ 117 int neighborhood_flag; /**< @brief Use the Neighborhood routines to perform gradient descend. Cannot be combined with shift move set (-m S) and pseudoknots (-k). Test option. (default=off). */ 118 const char *neighborhood_help; /**< @brief Use the Neighborhood routines to perform gradient descend. Cannot be combined with shift move set (-m S) and pseudoknots (-k). Test option. help description. */ 119 int degeneracy_off_flag; /**< @brief Do not deal with degeneracy, select the lexicographically first from the same energy neighbors. (default=off). */ 120 const char *degeneracy_off_help; /**< @brief Do not deal with degeneracy, select the lexicographically first from the same energy neighbors. help description. */ 121 int just_output_flag; /**< @brief Do not store the minima and optimize, just compute directly minima and output them. Output file can contain duplicates. (default=off). */ 122 const char *just_output_help; /**< @brief Do not store the minima and optimize, just compute directly minima and output them. Output file can contain duplicates. help description. */ 123 int bartree_flag; /**< @brief Generate an approximate barrier tree. (default=off). */ 124 const char *bartree_help; /**< @brief Generate an approximate barrier tree. help description. */ 125 char * barr_name_arg; /**< @brief Name of barrier tree output file, switches on -b flag. (default='treeRNAloc.ps'). */ 126 char * barr_name_orig; /**< @brief Name of barrier tree output file, switches on -b flag. original value given at command line. */ 127 const char *barr_name_help; /**< @brief Name of barrier tree output file, switches on -b flag. help description. */ 128 char * barrier_file_arg; /**< @brief File for saddle heights between LM (simulates the output format of barriers program). */ 129 char * barrier_file_orig; /**< @brief File for saddle heights between LM (simulates the output format of barriers program) original value given at command line. */ 130 const char *barrier_file_help; /**< @brief File for saddle heights between LM (simulates the output format of barriers program) help description. */ 131 int rates_flag; /**< @brief Create rates for treekin (default=off). */ 132 const char *rates_help; /**< @brief Create rates for treekin help description. */ 133 char * rates_file_arg; /**< @brief File where to write rates, switches on -r flag (default='rates.out'). */ 134 char * rates_file_orig; /**< @brief File where to write rates, switches on -r flag original value given at command line. */ 135 const char *rates_file_help; /**< @brief File where to write rates, switches on -r flag help description. */ 136 double temp_arg; /**< @brief Temperature in Celsius (only for rates) (default='37.0'). */ 137 char * temp_orig; /**< @brief Temperature in Celsius (only for rates) original value given at command line. */ 138 const char *temp_help; /**< @brief Temperature in Celsius (only for rates) help description. */ 139 double floodPortion_arg; /**< @brief Fraction of minima to flood (floods first minima with low number of inwalking sample structures) 140 (0.0 -> no flood; 1.0 -> try to flood all) Usable only with -r or -b options. (default='0.95'). */ 141 char * floodPortion_orig; /**< @brief Fraction of minima to flood (floods first minima with low number of inwalking sample structures) 142 (0.0 -> no flood; 1.0 -> try to flood all) Usable only with -r or -b options. original value given at command line. */ 143 const char *floodPortion_help; /**< @brief Fraction of minima to flood (floods first minima with low number of inwalking sample structures) 144 (0.0 -> no flood; 1.0 -> try to flood all) Usable only with -r or -b options. help description. */ 145 int floodMax_arg; /**< @brief Flood cap - how many structures to flood in one basin (default='1000'). */ 146 char * floodMax_orig; /**< @brief Flood cap - how many structures to flood in one basin original value given at command line. */ 147 const char *floodMax_help; /**< @brief Flood cap - how many structures to flood in one basin help description. */ 148 int numIntervals_arg; /**< @brief Number of intervals for Jing's visualisation (default='0'). */ 149 char * numIntervals_orig; /**< @brief Number of intervals for Jing's visualisation original value given at command line. */ 150 const char *numIntervals_help; /**< @brief Number of intervals for Jing's visualisation help description. */ 151 float eRange_arg; /**< @brief Report only LM, which energy is in range <MFE (or lowest found LM), MFE+eRange> in kcal/mol.. */ 152 char * eRange_orig; /**< @brief Report only LM, which energy is in range <MFE (or lowest found LM), MFE+eRange> in kcal/mol. original value given at command line. */ 153 const char *eRange_help; /**< @brief Report only LM, which energy is in range <MFE (or lowest found LM), MFE+eRange> in kcal/mol. help description. */ 154 char * allegiance_arg; /**< @brief Filename where to output the allegiance of structures. Works properly only with RNAsubopt -e list.. */ 155 char * allegiance_orig; /**< @brief Filename where to output the allegiance of structures. Works properly only with RNAsubopt -e list. original value given at command line. */ 156 const char *allegiance_help; /**< @brief Filename where to output the allegiance of structures. Works properly only with RNAsubopt -e list. help description. */ 157 158 unsigned int help_given ; /**< @brief Whether help was given. */ 159 unsigned int detailed_help_given ; /**< @brief Whether detailed-help was given. */ 160 unsigned int full_help_given ; /**< @brief Whether full-help was given. */ 161 unsigned int version_given ; /**< @brief Whether version was given. */ 162 unsigned int seq_given ; /**< @brief Whether seq was given. */ 163 unsigned int previous_given ; /**< @brief Whether previous was given. */ 164 unsigned int move_given ; /**< @brief Whether move was given. */ 165 unsigned int min_num_given ; /**< @brief Whether min-num was given. */ 166 unsigned int find_num_given ; /**< @brief Whether find-num was given. */ 167 unsigned int verbose_lvl_given ; /**< @brief Whether verbose-lvl was given. */ 168 unsigned int depth_given ; /**< @brief Whether depth was given. */ 169 unsigned int minh_given ; /**< @brief Whether minh was given. */ 170 unsigned int minh_lite_given ; /**< @brief Whether minh-lite was given. */ 171 unsigned int walk_given ; /**< @brief Whether walk was given. */ 172 unsigned int noLP_given ; /**< @brief Whether noLP was given. */ 173 unsigned int useEOS_given ; /**< @brief Whether useEOS was given. */ 174 unsigned int paramFile_given ; /**< @brief Whether paramFile was given. */ 175 unsigned int dangles_given ; /**< @brief Whether dangles was given. */ 176 unsigned int fix_barriers_given ; /**< @brief Whether fix-barriers was given. */ 177 unsigned int pseudoknots_given ; /**< @brief Whether pseudoknots was given. */ 178 unsigned int just_read_given ; /**< @brief Whether just-read was given. */ 179 unsigned int neighborhood_given ; /**< @brief Whether neighborhood was given. */ 180 unsigned int degeneracy_off_given ; /**< @brief Whether degeneracy-off was given. */ 181 unsigned int just_output_given ; /**< @brief Whether just-output was given. */ 182 unsigned int bartree_given ; /**< @brief Whether bartree was given. */ 183 unsigned int barr_name_given ; /**< @brief Whether barr-name was given. */ 184 unsigned int barrier_file_given ; /**< @brief Whether barrier-file was given. */ 185 unsigned int rates_given ; /**< @brief Whether rates was given. */ 186 unsigned int rates_file_given ; /**< @brief Whether rates-file was given. */ 187 unsigned int temp_given ; /**< @brief Whether temp was given. */ 188 unsigned int floodPortion_given ; /**< @brief Whether floodPortion was given. */ 189 unsigned int floodMax_given ; /**< @brief Whether floodMax was given. */ 190 unsigned int numIntervals_given ; /**< @brief Whether numIntervals was given. */ 191 unsigned int eRange_given ; /**< @brief Whether eRange was given. */ 192 unsigned int allegiance_given ; /**< @brief Whether allegiance was given. */ 193 194 char **inputs ; /**< @brief unnamed options (options without names) */ 195 unsigned inputs_num ; /**< @brief unnamed options number */ 196 } ; 197 198 /** @brief The additional parameters to pass to parser functions */ 199 struct cmdline_parser_params 200 { 201 int override; /**< @brief whether to override possibly already present options (default 0) */ 202 int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */ 203 int check_required; /**< @brief whether to check that all required options were provided (default 1) */ 204 int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */ 205 int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */ 206 } ; 207 208 /** @brief the purpose string of the program */ 209 extern const char *gengetopt_args_info_purpose; 210 /** @brief the usage string of the program */ 211 extern const char *gengetopt_args_info_usage; 212 /** @brief the description string of the program */ 213 extern const char *gengetopt_args_info_description; 214 /** @brief all the lines making the help output */ 215 extern const char *gengetopt_args_info_help[]; 216 /** @brief all the lines making the full help output (including hidden options) */ 217 extern const char *gengetopt_args_info_full_help[]; 218 /** @brief all the lines making the detailed help output (including hidden options and details) */ 219 extern const char *gengetopt_args_info_detailed_help[]; 220 221 /** 222 * The command line parser 223 * @param argc the number of command line options 224 * @param argv the command line options 225 * @param args_info the structure where option information will be stored 226 * @return 0 if everything went fine, NON 0 if an error took place 227 */ 228 int cmdline_parser (int argc, char **argv, 229 struct gengetopt_args_info *args_info); 230 231 /** 232 * The command line parser (version with additional parameters - deprecated) 233 * @param argc the number of command line options 234 * @param argv the command line options 235 * @param args_info the structure where option information will be stored 236 * @param override whether to override possibly already present options 237 * @param initialize whether to initialize the option structure my_args_info 238 * @param check_required whether to check that all required options were provided 239 * @return 0 if everything went fine, NON 0 if an error took place 240 * @deprecated use cmdline_parser_ext() instead 241 */ 242 int cmdline_parser2 (int argc, char **argv, 243 struct gengetopt_args_info *args_info, 244 int override, int initialize, int check_required); 245 246 /** 247 * The command line parser (version with additional parameters) 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 params additional parameters for the parser 252 * @return 0 if everything went fine, NON 0 if an error took place 253 */ 254 int cmdline_parser_ext (int argc, char **argv, 255 struct gengetopt_args_info *args_info, 256 struct cmdline_parser_params *params); 257 258 /** 259 * Save the contents of the option struct into an already open FILE stream. 260 * @param outfile the stream where to dump options 261 * @param args_info the option struct to dump 262 * @return 0 if everything went fine, NON 0 if an error took place 263 */ 264 int cmdline_parser_dump(FILE *outfile, 265 struct gengetopt_args_info *args_info); 266 267 /** 268 * Save the contents of the option struct into a (text) file. 269 * This file can be read by the config file parser (if generated by gengetopt) 270 * @param filename the file where to save 271 * @param args_info the option struct to save 272 * @return 0 if everything went fine, NON 0 if an error took place 273 */ 274 int cmdline_parser_file_save(const char *filename, 275 struct gengetopt_args_info *args_info); 276 277 /** 278 * Print the help 279 */ 280 void cmdline_parser_print_help(void); 281 /** 282 * Print the full help (including hidden options) 283 */ 284 void cmdline_parser_print_full_help(void); 285 /** 286 * Print the detailed help (including hidden options and details) 287 */ 288 void cmdline_parser_print_detailed_help(void); 289 /** 290 * Print the version 291 */ 292 void cmdline_parser_print_version(void); 293 294 /** 295 * Initializes all the fields a cmdline_parser_params structure 296 * to their default values 297 * @param params the structure to initialize 298 */ 299 void cmdline_parser_params_init(struct cmdline_parser_params *params); 300 301 /** 302 * Allocates dynamically a cmdline_parser_params structure and initializes 303 * all its fields to their default values 304 * @return the created and initialized cmdline_parser_params structure 305 */ 306 struct cmdline_parser_params *cmdline_parser_params_create(void); 307 308 /** 309 * Initializes the passed gengetopt_args_info structure's fields 310 * (also set default values for options that have a default) 311 * @param args_info the structure to initialize 312 */ 313 void cmdline_parser_init (struct gengetopt_args_info *args_info); 314 /** 315 * Deallocates the string fields of the gengetopt_args_info structure 316 * (but does not deallocate the structure itself) 317 * @param args_info the structure to deallocate 318 */ 319 void cmdline_parser_free (struct gengetopt_args_info *args_info); 320 321 /** 322 * Checks that all the required options were specified 323 * @param args_info the structure to check 324 * @param prog_name the name of the program that will be used to print 325 * possible errors 326 * @return 327 */ 328 int cmdline_parser_required (struct gengetopt_args_info *args_info, 329 const char *prog_name); 330 331 extern const char *cmdline_parser_move_values[]; /**< @brief Possible values for move. */ 332 extern const char *cmdline_parser_walk_values[]; /**< @brief Possible values for walk. */ 333 334 335 #ifdef __cplusplus 336 } 337 #endif /* __cplusplus */ 338 #endif /* RNALOCMIN_CMDLINE_H */ 339