diff --git a/Changes b/Changes index 1065094..289212e 100755 --- a/Changes +++ b/Changes @@ -1,3 +1,7 @@ +2015.08.13 +*makefile/versioning tweaks +*added some more examples + 2015.05.26 *minor bugfix concerning --justmp and external adapters diff --git a/Makefile b/Makefile index cddcc6b..8e1cee8 100755 --- a/Makefile +++ b/Makefile @@ -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) @@ -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 + diff --git a/example/issue12_R1.fastq.gz b/example/issue12_R1.fastq.gz new file mode 100644 index 0000000..468712a Binary files /dev/null and b/example/issue12_R1.fastq.gz differ diff --git a/example/issue12_R2.fastq.gz b/example/issue12_R2.fastq.gz new file mode 100644 index 0000000..4d5af5e Binary files /dev/null and b/example/issue12_R2.fastq.gz differ diff --git a/fastqlib.cpp b/fastqlib.cpp index d909293..972bb8d 100755 --- a/fastqlib.cpp +++ b/fastqlib.cpp @@ -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 <next(),f2->next())); } -int readPair::print() { +void readPair::print() { r1.print(); r2.print(); } diff --git a/fastqlib.h b/fastqlib.h index 6c9c446..877da46 100755 --- a/fastqlib.h +++ b/fastqlib.h @@ -16,7 +16,7 @@ class fqread { fqread window(int a,int b); fqread window(int a); fqread rc(); - int print(); + void print(); int clear(); }; @@ -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; diff --git a/nxtrim.cpp b/nxtrim.cpp index 72e515d..5caaf35 100755 --- a/nxtrim.cpp +++ b/nxtrim.cpp @@ -1,5 +1,4 @@ #include "version.h" -#include "githash.h" #include "matepair.h" #include "fastqlib.h" #include @@ -14,7 +13,7 @@ string percent(int num,int den) { } int checkParameters(int argc,char **argv,po::variables_map & vm) { - cerr << "\nNxTrim "<