From 128ffc089b02f50fb9845d7dbadcf9accaa61a94 Mon Sep 17 00:00:00 2001 From: John Marshall Date: Fri, 14 Jun 2013 14:00:24 +0100 Subject: [PATCH] Complain when bwa mem is given too many filenames Reads in extra .fq filenames beyond "bwa mem index one.fq two.fq" will not be aligned, so complain about such invalid usage instead. --- fastmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastmap.c b/fastmap.c index b00ec00..40ccdf9 100644 --- a/fastmap.c +++ b/fastmap.c @@ -54,7 +54,7 @@ int main_mem(int argc, char *argv[]) else return 1; } if (opt->n_threads < 1) opt->n_threads = 1; - if (optind + 1 >= argc) { + if (optind + 1 >= argc || optind + 3 < argc) { fprintf(stderr, "\n"); fprintf(stderr, "Usage: bwa mem [options] [in2.fq]\n\n"); fprintf(stderr, "Algorithm options:\n\n");