diff options
author | Calvin <calvin@EESI> | 2013-06-12 12:39:37 -0400 |
---|---|---|
committer | Calvin <calvin@EESI> | 2013-06-12 12:39:37 -0400 |
commit | e1712839c4b091179f35ee9849c20b2581a9fc8f (patch) | |
tree | 0f8579db200b25a5d505ca4cf6a5068db29fa618 /src/c/quikr.c | |
parent | 13351ef77d9f9f1cd130e7cf3fb9ce5b5cfc83e8 (diff) |
add --version and -V
Diffstat (limited to 'src/c/quikr.c')
-rw-r--r-- | src/c/quikr.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/c/quikr.c b/src/c/quikr.c index f588c5f..9946a30 100644 --- a/src/c/quikr.c +++ b/src/c/quikr.c @@ -12,7 +12,7 @@ #include "quikr_functions.h" #define sensing_matrix(i,j) (sensing_matrix[width*i + j]) -#define USAGE "Usage:\n\tquikr [OPTION...] - Calculate estimated frequencies of bacteria in a sample.\n\nOptions:\n\n-i, --input\n\tthe sample's fasta file of NGS READS (fasta format)\n\n-f, --sensing-fasta\n\tlocation of the fasta file database used to create the sensing matrix (fasta format)\n\n-s, --sensing-matrix\n\t location of the sensing matrix. (trained from quikr_train)\n\n-k, --kmer\n\tspecify what size of kmer to use. (default value is 6)\n\n-l, --lambda\n\tlambda value to use. (default value is 10000)\n\n-o, --output\n\tOTU_FRACTION_PRESENT a vector representing the percentage of database sequence's presence in sample. (csv output)\n\n-v, --verbose\n\tverbose mode.\n\n-d, --debug\n\tdebug mode, read manpage for more details" +#define USAGE "Usage:\n\tquikr [OPTION...] - Calculate estimated frequencies of bacteria in a sample.\n\nOptions:\n\n-i, --input\n\tthe sample's fasta file of NGS READS (fasta format)\n\n-f, --sensing-fasta\n\tlocation of the fasta file database used to create the sensing matrix (fasta format)\n\n-s, --sensing-matrix\n\t location of the sensing matrix. (trained from quikr_train)\n\n-k, --kmer\n\tspecify what size of kmer to use. (default value is 6)\n\n-l, --lambda\n\tlambda value to use. (default value is 10000)\n\n-o, --output\n\tOTU_FRACTION_PRESENT a vector representing the percentage of database sequence's presence in sample. (csv output)\n\n-v, --verbose\n\tverbose mode.\n\n-V, --version\n\tprint version.\n\n-d, --debug\n\tdebug mode, read manpage for more details" int main(int argc, char **argv) { @@ -45,13 +45,14 @@ int main(int argc, char **argv) { {"sensing-fasta", required_argument, 0, 'f'}, {"sensing-matrix", required_argument, 0, 's'}, {"verbose", no_argument, 0, 'v'}, + {"version", no_argument, 0, 'V'}, {"debug", no_argument, 0, 'd'}, {0, 0, 0, 0} }; int option_index = 0; - c = getopt_long (argc, argv, "k:l:f:s:i:o:hdv", long_options, &option_index); + c = getopt_long (argc, argv, "k:l:f:s:i:o:hdvV", long_options, &option_index); if (c == -1) break; @@ -81,6 +82,10 @@ int main(int argc, char **argv) { case 'v': verbose = 1; break; + case 'V': + printf("%s\n", VERSION); + exit(EXIT_SUCCESS); + break; case 'h': printf("%s\n", USAGE); exit(EXIT_SUCCESS); |