r457: fixed a bug on parsing -f

This commit is contained in:
Heng Li 2017-09-30 00:00:44 -04:00
parent ee9b2773a8
commit 0fd0f2aed1
1 changed files with 2 additions and 2 deletions

4
main.c
View File

@ -6,7 +6,7 @@
#include "mmpriv.h"
#include "getopt.h"
#define MM_VERSION "2.2-r456-dirty"
#define MM_VERSION "2.2-r457-dirty"
#ifdef __linux__
#include <sys/resource.h>
@ -129,7 +129,7 @@ int main(int argc, char *argv[])
x = strtod(optarg, &p);
if (x < 1.0) opt.mid_occ_frac = x, opt.mid_occ = 0;
else opt.mid_occ = (int)(x + .499);
if (*p == ',') opt.max_occ = (int)(x + .499);
if (*p == ',') opt.max_occ = (int)(strtod(p+1, &p) + .499);
} else if (c == 'u') {
if (*optarg == 'b') opt.flag |= MM_F_SPLICE_FOR|MM_F_SPLICE_REV; // both strands
else if (*optarg == 'f') opt.flag |= MM_F_SPLICE_FOR, opt.flag &= ~MM_F_SPLICE_REV; // match GT-AG