Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredo committed Aug 13, 2015
1 parent 8bb986b commit 177318b
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 21 deletions.
4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2015.08.13
*makefile/versioning tweaks
*added some more examples

2015.05.26
*minor bugfix concerning --justmp and external adapters

Expand Down
31 changes: 19 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,31 @@ ifndef BOOST_ROOT
$(error BOOST_ROOT is undefined. Point BOOST_ROOT at your boost installation ie. BOOST_ROOT/lib and BOOST_ROOT/include should exist)
endif

LFLAGS = -L$(BOOST_ROOT)/lib -lz -lboost_iostreams -lboost_program_options

CFLAGS = -O3 -I$(BOOST_ROOT)/include
LFLAGS= $(BOOST_ROOT)/lib/libboost_iostreams.a $(BOOST_ROOT)/lib/libboost_program_options.a -lz

all: mergeReads nxtrim


static: LFLAGS= $(BOOST_ROOT)/lib/libboost_iostreams.a $(BOOST_ROOT)/lib/libboost_program_options.a -lz
static: all

debug: CFLAGS = -Wall -g -I$(BOOST_ROOT)/include
debug: all

all: mergeReads nxtrim
GIT_HASH := $(shell git describe --abbrev=4 --always )

VERSION = v0.3.2-alpha
GIT_VERSION =
ifneq "$(wildcard .git)" ""
GIT_VERSION = -$(shell git describe --always)
endif
version.h:
echo '#define VERSION "$(VERSION)$(GIT_VERSION)"' > $@


test: test.cpp fastqlib.o utilityfunc.o matepair.o
$(CC) $(CFLAGS) test.cpp fastqlib.o utilityfunc.o matepair.o -o test $(LFLAGS)
githash.h:
git log -1 --format="#define HASH \"%h\"" > githash.h
nxtrim: nxtrim.cpp fastqlib.o utilityfunc.o matepair.o fastqlib.o githash.h version.h
$(CC) $(CFLAGS) test.cpp fastqlib.o utilityfunc.o matepair.o -o test $(LFLAGS)
nxtrim: nxtrim.cpp fastqlib.o utilityfunc.o matepair.o fastqlib.o version.h
$(CC) $(CFLAGS) nxtrim.cpp fastqlib.o utilityfunc.o matepair.o -o nxtrim $(LFLAGS)
mergeReads: mergeReads.cpp fastqlib.o utilityfunc.o fastqlib.o githash.h version.h
$(CC) $(CFLAGS) mergeReads.cpp fastqlib.o utilityfunc.o -o mergeReads $(LFLAGS)
Expand All @@ -30,7 +39,5 @@ fastqlib.o: fastqlib.cpp fastqlib.h utilityfunc.h
utilityfunc.o: utilityfunc.cpp utilityfunc.h
$(CC) $(CFLAGS) -c utilityfunc.cpp
clean:
rm *.o
rm nxtrim
rm test
rm mergeReads
rm *.o nxtrim test mergeReads version.h

Binary file added example/issue12_R1.fastq.gz
Binary file not shown.
Binary file added example/issue12_R2.fastq.gz
Binary file not shown.
5 changes: 2 additions & 3 deletions fastqlib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,13 @@ fqread fqread::window(int a) {
return(fqread(h,s.substr(a),l3,q.substr(a)));
}

int fqread::print() {
void fqread::print() {
if(l>0) {
cout << h << endl;
cout << s << endl;
cout <<l3 << endl;
cout << q << endl;
}
return(0);
}


Expand Down Expand Up @@ -207,7 +206,7 @@ readPair pairReader::next() {
return( readPair(f1->next(),f2->next()));
}

int readPair::print() {
void readPair::print() {
r1.print();
r2.print();
}
Expand Down
4 changes: 2 additions & 2 deletions fastqlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class fqread {
fqread window(int a,int b);
fqread window(int a);
fqread rc();
int print();
void print();
int clear();
};

Expand All @@ -26,7 +26,7 @@ class readPair {
readPair(fqread read1,fqread read2);
int rc();
int set(fqread read1, fqread read2);
int print();
void print();
fqread r1,r2;
int l;
bool filtered;
Expand Down
3 changes: 1 addition & 2 deletions nxtrim.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "version.h"
#include "githash.h"
#include "matepair.h"
#include "fastqlib.h"
#include <boost/program_options.hpp>
Expand All @@ -14,7 +13,7 @@ string percent(int num,int den) {
}

int checkParameters(int argc,char **argv,po::variables_map & vm) {
cerr << "\nNxTrim "<<VERSION<<" "<<HASH<<endl<<endl;
cerr << "\nNxTrim "<<VERSION<<endl<<endl;

po::options_description desc("Allowed options");
try{
Expand Down
3 changes: 1 addition & 2 deletions version.h
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#define VERSION "v0.3.2-alpha"

#define VERSION "v0.3.2-alpha-8bb986b"

0 comments on commit 177318b

Please sign in to comment.