cawlign 0.0.1
Codon-aware pairwise sequence alignment
Loading...
Searching...
No Matches
argparse.hpp
1
2#ifndef ARGPARSE_H
3#define ARGPARSE_H
4
5#include <stdio.h>
6#include <configparser.hpp>
7// argument defaults
8
9#define PROGNAME "cawlign"
10#define DEFAULT_DATA_TYPE nucleotide
11#define DEFAULT_REFERENCE "HXB2_pol"
12#define DEFAULT_SCORING "Nucleotide-BLAST"
13#define DEFAULT_SPACE quadratic
14#define DEFAULT_LOCAL_TYPE trim
15#define DEFAULT_OUTPUT_FORMAT refmap
16#define DEFAULT_RC_TYPE none
17
18#ifndef VERSION_NUMBER
19 #define VERSION_NUMBER "0.0.1"
20#endif
21
22#ifndef LIBRARY_PATH
23 #define LIBRARY_PATH "/usr/local/shares/cawlign/"
24#endif
25
26#define SCORES_SUBPATH "scoring"
27#define REF_SUBPATH "references"
28
29namespace argparse
30{
31
32 enum data_t {
33 nucleotide,
34 codon,
35 protein
36 };
37
38 enum local_t {
39 trim,
40 global,
41 local
42 };
43
44 enum space_t {
45 quadratic,
46 linear
47 };
48
49 enum out_format_t {
50 refmap,
51 refalign,
52 pairwise
53 };
54
55 enum rc_t {
56 none,
57 silent,
58 annotated
59 };
60
61 class args_t {
62 public:
63
64 FILE * output,
65 * reference,
66 * input;
67
68 ConfigParser * scores;
69
70 data_t data_type;
71 local_t local_option;
72 space_t space_type;
73 out_format_t out_format;
74 rc_t reverse_complement;
75
76 bool quiet;
77 bool affine;
78 bool include_reference;
79
80
81 args_t( int, const char ** );
82 ~args_t();
83
84 private:
85 void parse_input ( const char * );
86 void parse_reference ( const char * );
87 void parse_output ( const char * );
88 void parse_scores ( const char * );
89 void parse_quiet ( void );
90 void parse_affine ( void );
91 void parse_include_ref ( void );
92 void parse_rc ( const char * );
93 void parse_space_t ( const char * );
94 void parse_data_t ( const char * );
95 void parse_local_t ( const char * );
96 void parse_out_format_t ( const char * );
97
98 };
99
100 void ERROR_NO_USAGE ( const char * msg, ... );
101}
102
103#endif // ARGPARSE_H
Definition configparser.hpp:32
Definition argparse.hpp:61
~args_t()
Definition argparse.cpp:256