summaryrefslogtreecommitdiff
path: root/src/c/quikr_train.c
diff options
context:
space:
mode:
authorCalvin <calvin@EESI>2013-06-12 12:39:37 -0400
committerCalvin <calvin@EESI>2013-06-12 12:39:37 -0400
commite1712839c4b091179f35ee9849c20b2581a9fc8f (patch)
tree0f8579db200b25a5d505ca4cf6a5068db29fa618 /src/c/quikr_train.c
parent13351ef77d9f9f1cd130e7cf3fb9ce5b5cfc83e8 (diff)
add --version and -V
Diffstat (limited to 'src/c/quikr_train.c')
-rw-r--r--src/c/quikr_train.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/c/quikr_train.c b/src/c/quikr_train.c
index b169fcc..b5b111f 100644
--- a/src/c/quikr_train.c
+++ b/src/c/quikr_train.c
@@ -10,7 +10,7 @@
#include "quikr_functions.h"
-#define USAGE "Usage:\n\tquikr_train [OPTION...] - train a database for use with quikr.\n\nOptions:\n\n-i, --input\n\tthe database of sequences to create the sensing matrix (fasta format)\n\n-k, --kmer\n\tspecify what size of kmer to use. (default value is 6)\n\n-o, --output\n\tthe sensing matrix. (a gzip'd text file)\n\n-v, --verbose\n\tverbose mode."
+#define USAGE "Usage:\n\tquikr_train [OPTION...] - train a database for use with quikr.\n\nOptions:\n\n-i, --input\n\tthe database of sequences to create the sensing matrix (fasta format)\n\n-k, --kmer\n\tspecify what size of kmer to use. (default value is 6)\n\n-o, --output\n\tthe sensing matrix. (a gzip'd text file)\n\n-v, --verbose\n\tverbose mode.\n\n-V, --version\n\tprint version."
int main(int argc, char **argv) {
@@ -36,6 +36,7 @@ int main(int argc, char **argv) {
while (1) {
static struct option long_options[] = {
{"verbose", no_argument, 0, 'v'},
+ {"version", no_argument, 0, 'V'},
{"input", required_argument, 0, 'i'},
{"kmer", required_argument, 0, 'k'},
{"output", required_argument, 0, 'o'},
@@ -44,7 +45,7 @@ int main(int argc, char **argv) {
int option_index = 0;
- c = getopt_long (argc, argv, "i:o:k:hv", long_options, &option_index);
+ c = getopt_long (argc, argv, "i:o:k:hvV", long_options, &option_index);
if (c == -1)
break;
@@ -62,6 +63,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);