r277: abort if query/-d missing (#11)

This commit is contained in:
Heng Li 2017-08-08 21:46:15 -04:00
parent 4db0d1034b
commit 9e1125edda
1 changed files with 5 additions and 1 deletions

6
main.c
View File

@ -8,7 +8,7 @@
#include "minimap.h"
#include "mmpriv.h"
#define MM_VERSION "2.0-r276-dirty"
#define MM_VERSION "2.0-r277-dirty"
void liftrlimit()
{
@ -189,6 +189,10 @@ int main(int argc, char *argv[])
fprintf(stderr, "[E::%s] failed to open file '%s'\n", __func__, argv[optind]);
return 1;
}
if (!is_idx && fnw == 0 && argc - optind < 2) {
fprintf(stderr, "[E::%s] missing input: please specify a query file or option -d\n", __func__);
return 1;
}
if (is_idx) fpr = fopen(argv[optind], "rb");
else fp = mm_bseq_open(argv[optind]);
if (fnw) fpw = fopen(fnw, "wb");