Skip to content

Commit

Permalink
nocram compilation in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
calkan committed Jul 9, 2019
1 parent a2f1af1 commit 6be2265
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ BUILD_DATE := "$(shell date)"
CC=gcc
CFLAGS = -O3 -funroll-loops -g -I htslib -I vh -I sonic -DTARDIS_VERSION=\"$(TARDIS_VERSION)\" -DBUILD_DATE=\"$(BUILD_DATE)\" -DTARDIS_UPDATE=\"$(TARDIS_UPDATE)\" -DTARDIS_DEBUG=$(TARDIS_DEBUG)
LDFLAGS = htslib/libhts.a vh/libvh.a sonic/libsonic.a -lz -lm -lpthread -llzma -lbz2
NOCRAMFLAGS = htslib/libhts.a vh/libvh.a sonic/libsonic.a -lz -lm -lpthread
SOURCES = tardis.c cmdline.c common.c processbam.c config.c processfq.c external.c variants.c splitread.c processrefgen.c bamonly.c free.c mappings.c
OBJECTS = $(SOURCES:.c=.o)
EXECUTABLE = tardis
Expand All @@ -25,10 +26,11 @@ clean:
make clean -C vh
rm -f $(EXECUTABLE) *.o *~

nocram:
cd htslib && autoheader && autoconf && ./configure --disable-lzma --disable-bz2 && make && cd ..
nocram: $(OBJECTS)
cd htslib && autoheader && autoconf && ./configure --disable-lzma --disable-bz2 --disable-libcurl && make && cd ..
make -C vh
make -C sonic
$(CC) $(OBJECTS) -o $(EXECUTABLE)-nocram $(NOCRAMFLAGS)

libs:
make -C htslib
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,17 @@ Type:
cp tardis /path/to/your/favorite/binaries


If you do not have root access to install liblzma and/or libbz2, you can compile htslib without CRAM support. Note that lzma and libbz2 are htslib prerequisites, and we are looking for a way to compile htslib with local installations of these libraries.
Compiling without sudo access
=============================

As a workaround, first remove the "-llzma" flag in the Makefile (line that starts with LDFLAGS). Then type:
If you do not have root access to install liblzma and/or libbz2, you can compile htslib without CRAM support. Note that lzma and libbz2 are prerequisites for htslib. The libz library is still required, talk to your admin if it is not available on your system.

Type:

make nocram
make
cp tardis /path/to/your/favorite/binaries
cp tardis-nocram /path/to/your/favorite/binaries

Note that this will disable CRAM support and you will be able to run TARDIS only with BAM files.
Note that this will disable CRAM support and you will be able to run TARDIS only with BAM files, and the name for the executable becomes tardis-nocram.


Testing installation
Expand Down

0 comments on commit 6be2265

Please sign in to comment.