Skip to content

Commit

Permalink
Forgot to add -e option to dex2DB.
Browse files Browse the repository at this point in the history
  • Loading branch information
thegenemyers committed Aug 9, 2017
1 parent e8a146e commit 2f51ccb
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PATH_HDF5 = /sw/apps/hdf5/current
PATH_HDF5 = /sw
PATH_HDF5 = /usr/local/hdf5

DEST_DIR = ~/bin
Expand Down Expand Up @@ -30,8 +30,8 @@ dexqv: dexqv.c DB.c DB.h QV.c QV.h
undexqv: undexqv.c DB.c DB.h QV.c QV.h
gcc $(CFLAGS) -o undexqv undexqv.c DB.c QV.c

dex2DB: dex2DB.c sam.c bax.c DB.c QV.c bax.h DB.h QV.h
gcc $(CFLAGS) -I$(PATH_HDF5)/include -L$(PATH_HDF5)/lib -o dex2DB dex2DB.c sam.c bax.c DB.c QV.c -lhdf5 -lz
dex2DB: dex2DB.c sam.c bax.c expr.c expr.h DB.c QV.c bax.h DB.h QV.h
gcc $(CFLAGS) -I$(PATH_HDF5)/include -L$(PATH_HDF5)/lib -o dex2DB dex2DB.c sam.c bax.c expr.c DB.c QV.c -lhdf5 -lz

clean:
rm -f $(ALL)
Expand Down
25 changes: 23 additions & 2 deletions dex2DB.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
#include <unistd.h>

#include "DB.h"
#include "bax.h"
#include "sam.h"
#include "bax.h"
#include "expr.h"

#ifdef HIDE_FILES
#define PATHSEP "/."
Expand Down Expand Up @@ -141,6 +142,7 @@ int main(int argc, char *argv[])
int LOSSY;
int ARROW;
int QUIVER;
Filter *EXPR;

// Process command line

Expand All @@ -150,6 +152,7 @@ int main(int argc, char *argv[])
ARG_INIT("dex2DB")

IFILE = NULL;
EXPR = NULL;

j = 1;
for (i = 1; i < argc; i++)
Expand All @@ -165,6 +168,9 @@ int main(int argc, char *argv[])
exit (1);
}
break;
case 'e':
EXPR = parse_filter(argv[i]+2);
break;
}
else
argv[j++] = argv[i];
Expand All @@ -174,6 +180,9 @@ int main(int argc, char *argv[])
LOSSY = flags['l'];
ARROW = flags['a'];
QUIVER = flags['q'];

if (EXPR == NULL)
EXPR = parse_filter("ln>=500 && rq>=750");

if ( (IFILE == NULL && argc <= 2) || (IFILE != NULL && argc != 2) )
{ fprintf(stderr,"Usage: %s %s\n",Prog_Name,Usage[0]);
Expand Down Expand Up @@ -488,6 +497,9 @@ int main(int argc, char *argv[])
{ int rlen;
char *delQV, *delTag, *insQV, *mergeQV, *subQV;

if ( ! evaluate_bax_filter(EXPR,bax,s))
continue;

rlen = s->lpulse - s->fpulse;
delQV = bax->delQV + s->fpulse + s->data_off;
delTag = bax->delTag + s->fpulse + s->data_off;
Expand Down Expand Up @@ -550,6 +562,9 @@ int main(int argc, char *argv[])
{ int rlen, clen;
char *read;

if ( ! evaluate_bax_filter(EXPR,bax,s))
continue;

rlen = s->lpulse - s->fpulse;
read = bax->baseCall + s->fpulse + s->data_off;

Expand Down Expand Up @@ -703,7 +718,10 @@ int main(int argc, char *argv[])
{ char *delQV, *delTag, *insQV, *mergeQV, *subQV;

if (rec == NULL)
goto error;
goto error;

if ( ! evaluate_bam_filter(EXPR,rec))
continue;

delQV = rec->qv[0];
delTag = rec->qv[1];
Expand Down Expand Up @@ -749,6 +767,9 @@ int main(int argc, char *argv[])
if (rec == NULL)
goto error;

if ( ! evaluate_bam_filter(EXPR,rec))
continue;

rlen = rec->len;
read = rec->seq;

Expand Down

0 comments on commit 2f51ccb

Please sign in to comment.