Logo Search packages:      
Sourcecode: jellyfish version File versions  Download package

mer_counter_cmdline.hpp

Go to the documentation of this file.
/** @file mer_counter_cmdline.hpp
 *  @brief The header file for the command line option parser
 *  generated by GNU Gengetopt version 2.22.4
 *  http://www.gnu.org/software/gengetopt.
 *  DO NOT modify this file, since it can be overwritten
 *  @author GNU Gengetopt by Lorenzo Bettini */

#ifndef MER_COUNTER_CMDLINE_H
#define MER_COUNTER_CMDLINE_H

/* If we use autoconf.  */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <stdio.h> /* for FILE */

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#ifndef MER_COUNTER_CMDLINE_PACKAGE
/** @brief the program name (used for printing errors) */
00024 #define MER_COUNTER_CMDLINE_PACKAGE "jellyfish count"
#endif

#ifndef MER_COUNTER_CMDLINE_PACKAGE_NAME
/** @brief the complete program name (used for help and version) */
00029 #define MER_COUNTER_CMDLINE_PACKAGE_NAME "jellyfish count"
#endif

#ifndef MER_COUNTER_CMDLINE_VERSION
/** @brief the program version */
00034 #define MER_COUNTER_CMDLINE_VERSION VERSION
#endif

/** @brief Where the command line options are stored */
00038 struct mer_counter_args
{
00040   const char *help_help; /**< @brief Print help and exit help description.  */
00041   const char *full_help_help; /**< @brief Print help, including hidden options, and exit help description.  */
00042   const char *version_help; /**< @brief Print version and exit help description.  */
00043   int mer_len_arg;      /**< @brief Length of mer.  */
00044   char * mer_len_orig;  /**< @brief Length of mer original value given at command line.  */
00045   const char *mer_len_help; /**< @brief Length of mer help description.  */
00046   long size_arg;  /**< @brief Hash size.  */
00047   char * size_orig;     /**< @brief Hash size original value given at command line.  */
00048   const char *size_help; /**< @brief Hash size help description.  */
00049   int threads_arg;      /**< @brief Number of threads (default='1').  */
00050   char * threads_orig;  /**< @brief Number of threads original value given at command line.  */
00051   const char *threads_help; /**< @brief Number of threads help description.  */
00052   char * output_arg;    /**< @brief Output prefix (default='mer_counts').  */
00053   char * output_orig;   /**< @brief Output prefix original value given at command line.  */
00054   const char *output_help; /**< @brief Output prefix help description.  */
00055   int counter_len_arg;  /**< @brief Length of counting field (default='7').  */
00056   char * counter_len_orig;    /**< @brief Length of counting field original value given at command line.  */
00057   const char *counter_len_help; /**< @brief Length of counting field help description.  */
00058   int out_counter_len_arg;    /**< @brief Length of counter field in output (default='4').  */
00059   char * out_counter_len_orig;      /**< @brief Length of counter field in output original value given at command line.  */
00060   const char *out_counter_len_help; /**< @brief Length of counter field in output help description.  */
00061   int both_strands_flag;      /**< @brief Count both strand, canonical representation (default=off).  */
00062   const char *both_strands_help; /**< @brief Count both strand, canonical representation help description.  */
00063   int reprobes_arg;     /**< @brief Maximum number of reprobes (default='62').  */
00064   char * reprobes_orig; /**< @brief Maximum number of reprobes original value given at command line.  */
00065   const char *reprobes_help; /**< @brief Maximum number of reprobes help description.  */
00066   int raw_flag;   /**< @brief Write raw database (default=off).  */
00067   const char *raw_help; /**< @brief Write raw database help description.  */
00068   int both_flag;  /**< @brief Write list and raw database (default=off).  */
00069   const char *both_help; /**< @brief Write list and raw database help description.  */
00070   int quake_flag; /**< @brief Quake compatibility mode (default=off).  */
00071   const char *quake_help; /**< @brief Quake compatibility mode help description.  */
00072   int quality_start_arg;      /**< @brief Starting ASCII for quality values (default='64').  */
00073   char * quality_start_orig;  /**< @brief Starting ASCII for quality values original value given at command line.  */
00074   const char *quality_start_help; /**< @brief Starting ASCII for quality values help description.  */
00075   int min_quality_arg;  /**< @brief Minimum quality. A base with lesser quality becomes an N (default='0').  */
00076   char * min_quality_orig;    /**< @brief Minimum quality. A base with lesser quality becomes an N original value given at command line.  */
00077   const char *min_quality_help; /**< @brief Minimum quality. A base with lesser quality becomes an N help description.  */
00078   long lower_count_arg; /**< @brief Don't output k-mer with count < lower-count.  */
00079   char * lower_count_orig;    /**< @brief Don't output k-mer with count < lower-count original value given at command line.  */
00080   const char *lower_count_help; /**< @brief Don't output k-mer with count < lower-count help description.  */
00081   long upper_count_arg; /**< @brief Don't output k-mer with count > upper-count.  */
00082   char * upper_count_orig;    /**< @brief Don't output k-mer with count > upper-count original value given at command line.  */
00083   const char *upper_count_help; /**< @brief Don't output k-mer with count > upper-count help description.  */
00084   char * matrix_arg;    /**< @brief Hash function binary matrix.  */
00085   char * matrix_orig;   /**< @brief Hash function binary matrix original value given at command line.  */
00086   const char *matrix_help; /**< @brief Hash function binary matrix help description.  */
00087   char * timing_arg;    /**< @brief Print timing information.  */
00088   char * timing_orig;   /**< @brief Print timing information original value given at command line.  */
00089   const char *timing_help; /**< @brief Print timing information help description.  */
00090   char * stats_arg;     /**< @brief Print stats.  */
00091   char * stats_orig;    /**< @brief Print stats original value given at command line.  */
00092   const char *stats_help; /**< @brief Print stats help description.  */
00093   int no_write_flag;    /**< @brief Don't write database (default=off).  */
00094   const char *no_write_help; /**< @brief Don't write database help description.  */
00095   int measure_flag;     /**< @brief Write usage statistics (default=off).  */
00096   const char *measure_help; /**< @brief Write usage statistics help description.  */
00097   long buffers_arg;     /**< @brief Number of buffers per thread.  */
00098   char * buffers_orig;  /**< @brief Number of buffers per thread original value given at command line.  */
00099   const char *buffers_help; /**< @brief Number of buffers per thread help description.  */
00100   long buffer_size_arg; /**< @brief Size of buffers (default='8192').  */
00101   char * buffer_size_orig;    /**< @brief Size of buffers original value given at command line.  */
00102   const char *buffer_size_help; /**< @brief Size of buffers help description.  */
00103   long out_buffer_size_arg;   /**< @brief Size of output buffer per thread (default='20000000').  */
00104   char * out_buffer_size_orig;      /**< @brief Size of output buffer per thread original value given at command line.  */
00105   const char *out_buffer_size_help; /**< @brief Size of output buffer per thread help description.  */
00106   int lock_flag;  /**< @brief Lock hash in memory (no swapping) (default=off).  */
00107   const char *lock_help; /**< @brief Lock hash in memory (no swapping) help description.  */
00108   int stream_flag;      /**< @brief Read from stream, not memory map (default=off).  */
00109   const char *stream_help; /**< @brief Read from stream, not memory map help description.  */
  
00111   unsigned int help_given ;   /**< @brief Whether help was given.  */
00112   unsigned int full_help_given ;    /**< @brief Whether full-help was given.  */
00113   unsigned int version_given ;      /**< @brief Whether version was given.  */
00114   unsigned int mer_len_given ;      /**< @brief Whether mer-len was given.  */
00115   unsigned int size_given ;   /**< @brief Whether size was given.  */
00116   unsigned int threads_given ;      /**< @brief Whether threads was given.  */
00117   unsigned int output_given ; /**< @brief Whether output was given.  */
00118   unsigned int counter_len_given ;  /**< @brief Whether counter-len was given.  */
00119   unsigned int out_counter_len_given ;    /**< @brief Whether out-counter-len was given.  */
00120   unsigned int both_strands_given ; /**< @brief Whether both-strands was given.  */
00121   unsigned int reprobes_given ;     /**< @brief Whether reprobes was given.  */
00122   unsigned int raw_given ;    /**< @brief Whether raw was given.  */
00123   unsigned int both_given ;   /**< @brief Whether both was given.  */
00124   unsigned int quake_given ;  /**< @brief Whether quake was given.  */
00125   unsigned int quality_start_given ;      /**< @brief Whether quality-start was given.  */
00126   unsigned int min_quality_given ;  /**< @brief Whether min-quality was given.  */
00127   unsigned int lower_count_given ;  /**< @brief Whether lower-count was given.  */
00128   unsigned int upper_count_given ;  /**< @brief Whether upper-count was given.  */
00129   unsigned int matrix_given ; /**< @brief Whether matrix was given.  */
00130   unsigned int timing_given ; /**< @brief Whether timing was given.  */
00131   unsigned int stats_given ;  /**< @brief Whether stats was given.  */
00132   unsigned int no_write_given ;     /**< @brief Whether no-write was given.  */
00133   unsigned int measure_given ;      /**< @brief Whether measure was given.  */
00134   unsigned int buffers_given ;      /**< @brief Whether buffers was given.  */
00135   unsigned int buffer_size_given ;  /**< @brief Whether buffer-size was given.  */
00136   unsigned int out_buffer_size_given ;    /**< @brief Whether out-buffer-size was given.  */
00137   unsigned int lock_given ;   /**< @brief Whether lock was given.  */
00138   unsigned int stream_given ; /**< @brief Whether stream was given.  */

00140   char **inputs ; /**< @brief unamed options (options without names) */
00141   unsigned inputs_num ; /**< @brief unamed options number */
} ;

/** @brief The additional parameters to pass to parser functions */
00145 struct mer_counter_cmdline_params
{
00147   int override; /**< @brief whether to override possibly already present options (default 0) */
00148   int initialize; /**< @brief whether to initialize the option structure mer_counter_args (default 1) */
00149   int check_required; /**< @brief whether to check that all required options were provided (default 1) */
00150   int check_ambiguity; /**< @brief whether to check for options already specified in the option structure mer_counter_args (default 0) */
00151   int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */
} ;

/** @brief the purpose string of the program */
extern const char *mer_counter_args_purpose;
/** @brief the usage string of the program */
extern const char *mer_counter_args_usage;
/** @brief all the lines making the help output */
extern const char *mer_counter_args_help[];
/** @brief all the lines making the full help output (including hidden options) */
extern const char *mer_counter_args_full_help[];

/**
 * The command line parser
 * @param argc the number of command line options
 * @param argv the command line options
 * @param args_info the structure where option information will be stored
 * @return 0 if everything went fine, NON 0 if an error took place
 */
int mer_counter_cmdline (int argc, char **argv,
  struct mer_counter_args *args_info);

/**
 * The command line parser (version with additional parameters - deprecated)
 * @param argc the number of command line options
 * @param argv the command line options
 * @param args_info the structure where option information will be stored
 * @param override whether to override possibly already present options
 * @param initialize whether to initialize the option structure my_args_info
 * @param check_required whether to check that all required options were provided
 * @return 0 if everything went fine, NON 0 if an error took place
 * @deprecated use mer_counter_cmdline_ext() instead
 */
int mer_counter_cmdline2 (int argc, char **argv,
  struct mer_counter_args *args_info,
  int override, int initialize, int check_required);

/**
 * The command line parser (version with additional parameters)
 * @param argc the number of command line options
 * @param argv the command line options
 * @param args_info the structure where option information will be stored
 * @param params additional parameters for the parser
 * @return 0 if everything went fine, NON 0 if an error took place
 */
int mer_counter_cmdline_ext (int argc, char **argv,
  struct mer_counter_args *args_info,
  struct mer_counter_cmdline_params *params);

/**
 * Save the contents of the option struct into an already open FILE stream.
 * @param outfile the stream where to dump options
 * @param args_info the option struct to dump
 * @return 0 if everything went fine, NON 0 if an error took place
 */
int mer_counter_cmdline_dump(FILE *outfile,
  struct mer_counter_args *args_info);

/**
 * Save the contents of the option struct into a (text) file.
 * This file can be read by the config file parser (if generated by gengetopt)
 * @param filename the file where to save
 * @param args_info the option struct to save
 * @return 0 if everything went fine, NON 0 if an error took place
 */
int mer_counter_cmdline_file_save(const char *filename,
  struct mer_counter_args *args_info);

/**
 * Print the help
 */
void mer_counter_cmdline_print_help(void);
/**
 * Print the full help (including hidden options)
 */
void mer_counter_cmdline_print_full_help(void);
/**
 * Print the version
 */
void mer_counter_cmdline_print_version(void);

/**
 * Initializes all the fields a mer_counter_cmdline_params structure 
 * to their default values
 * @param params the structure to initialize
 */
void mer_counter_cmdline_params_init(struct mer_counter_cmdline_params *params);

/**
 * Allocates dynamically a mer_counter_cmdline_params structure and initializes
 * all its fields to their default values
 * @return the created and initialized mer_counter_cmdline_params structure
 */
struct mer_counter_cmdline_params *mer_counter_cmdline_params_create(void);

/**
 * Initializes the passed mer_counter_args structure's fields
 * (also set default values for options that have a default)
 * @param args_info the structure to initialize
 */
void mer_counter_cmdline_init (struct mer_counter_args *args_info);
/**
 * Deallocates the string fields of the mer_counter_args structure
 * (but does not deallocate the structure itself)
 * @param args_info the structure to deallocate
 */
void mer_counter_cmdline_free (struct mer_counter_args *args_info);

/**
 * Checks that all the required options were specified
 * @param args_info the structure to check
 * @param prog_name the name of the program that will be used to print
 *   possible errors
 * @return
 */
int mer_counter_cmdline_required (struct mer_counter_args *args_info,
  const char *prog_name);


#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* MER_COUNTER_CMDLINE_H */

Generated by  Doxygen 1.6.0   Back to index