From 24ddd206c5e70d9906d217c785f44afee78fa730 Mon Sep 17 00:00:00 2001 From: Heng Li Date: Fri, 6 Nov 2015 21:18:01 -0500 Subject: [PATCH] r41: print version number; added license --- LICENSE.txt | 23 +++++++++++++++++++++++ main.c | 11 ++++++++--- 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 LICENSE.txt diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..beb04ef --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,23 @@ +The MIT License + +Copyright (c) 2015 Broad Institute + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/main.c b/main.c index 8c917c8..bb15bd2 100644 --- a/main.c +++ b/main.c @@ -8,7 +8,7 @@ #include "sdict.h" #include "miniasm.h" -#define MA_VERSION "r31" +#define MA_VERSION "r41" static void print_subs(const sdict_t *d, const ma_sub_t *sub) { @@ -41,7 +41,7 @@ int main(int argc, char *argv[]) char *fn_reads = 0, *outfmt = "ug"; ma_opt_init(&opt); - while ((c = getopt(argc, argv, "m:s:c:S:i:d:g:o:h:I:r:f:e:p:12")) >= 0) { + while ((c = getopt(argc, argv, "m:s:c:S:i:d:g:o:h:I:r:f:e:p:12V")) >= 0) { if (c == 'm') opt.min_match = atoi(optarg); else if (c == 'i') opt.min_iden = atof(optarg); else if (c == 's') opt.min_span = atoi(optarg); @@ -58,6 +58,10 @@ int main(int argc, char *argv[]) else if (c == 'p') outfmt = optarg; else if (c == '1') no_first = 1; else if (c == '2') no_second = 1; + else if (c == 'V') { + printf("%s\n", MA_VERSION); + return 0; + } } if (argc == optind) { fprintf(stderr, "Usage: miniasm [options] \n"); @@ -77,10 +81,11 @@ int main(int argc, char *argv[]) fprintf(stderr, " -r FLOAT overlap drop ratio [%.2f]\n", opt.ovlp_drop_ratio); fprintf(stderr, " -e INT small unitig threshold [%d]\n", opt.max_ext); fprintf(stderr, " -f FILE read sequences []\n"); - fprintf(stderr, " Steps:\n"); + fprintf(stderr, " Miscellaneous:\n"); fprintf(stderr, " -p STR output information: bed, paf, sg or ug [%s]\n", outfmt); fprintf(stderr, " -1 skip 1-pass read selection\n"); fprintf(stderr, " -2 skip 2-pass read selection\n"); + fprintf(stderr, " -V print version number\n"); return 1; }