Skip to content

Commit

Permalink
Mark supplementary alignments of duplicates as duplicates.
Browse files Browse the repository at this point in the history
Added LZ4 for faster temporary file writing.
  • Loading branch information
whitwham authored and daviesrob committed Dec 5, 2017
1 parent fe1a2e9 commit 9c819b0
Show file tree
Hide file tree
Showing 12 changed files with 3,086 additions and 20 deletions.
29 changes: 22 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ CFLAGS = -g -Wall -O2
LDFLAGS =
LIBS =

LZ4DIR = ./lz4
LZ4_CPPFLAGS = -I$(LZ4DIR)
LZ4_LDFLAGS = -L$(LZ4DIR)



LOBJS= bam_aux.o bam.o bam_import.o sam.o \
sam_header.o bam_plbuf.o
AOBJS= bam_index.o bam_plcmd.o sam_view.o \
Expand All @@ -38,7 +44,7 @@ AOBJS= bam_index.o bam_plcmd.o sam_view.o \
cut_target.o phase.o bam2depth.o padding.o bedcov.o bamshuf.o \
faidx.o dict.o stats.o stats_isize.o bam_flags.o bam_split.o \
bam_tview.o bam_tview_curses.o bam_tview_html.o bam_lpileup.o \
bam_quickcheck.o bam_addrprg.o bam_markdup.o
bam_quickcheck.o bam_addrprg.o bam_markdup.o tmp_file.o

prefix = /usr/local
exec_prefix = $(prefix)
Expand Down Expand Up @@ -82,11 +88,11 @@ TEST_PROGRAMS = \
test/split/test_filter_header_rg \
test/split/test_parse_args \
test/vcf-miniview

all: $(PROGRAMS) $(MISC_PROGRAMS) $(TEST_PROGRAMS)

ALL_CPPFLAGS = -I. $(HTSLIB_CPPFLAGS) $(CPPFLAGS)
ALL_LDFLAGS = $(HTSLIB_LDFLAGS) $(LDFLAGS)
ALL_CPPFLAGS = -I. $(HTSLIB_CPPFLAGS) $(LZ4_CPPFLAGS) $(CPPFLAGS)
ALL_LDFLAGS = $(HTSLIB_LDFLAGS) $(LZ4_LDFLAGS) $(LDFLAGS)
ALL_LIBS = -lz $(LIBS)

# Usually config.mk and config.h are generated by running configure
Expand Down Expand Up @@ -124,6 +130,11 @@ print-version:

.c.o:
$(CC) $(CFLAGS) $(ALL_CPPFLAGS) -c -o $@ $<

lz4:$(LZ4DIR)/liblz4.a

$(LZ4DIR)/liblz4.a:
$(MAKE) -C $(LZ4DIR) liblz4.a


LIBST_OBJS = sam_opts.o sam_utils.o
Expand All @@ -134,8 +145,8 @@ lib:libbam.a
libbam.a:$(LOBJS)
$(AR) -csru $@ $(LOBJS)

samtools: $(AOBJS) libbam.a libst.a $(HTSLIB)
$(CC) $(ALL_LDFLAGS) -o $@ $(AOBJS) libbam.a libst.a $(HTSLIB_LIB) $(CURSES_LIB) -lm $(ALL_LIBS) -lpthread
samtools: $(AOBJS) libbam.a libst.a $(HTSLIB) $(LZ4DIR)/liblz4.a
$(CC) $(ALL_LDFLAGS) -o $@ $(AOBJS) libbam.a libst.a $(HTSLIB_LIB) $(LZ4DIR)/liblz4.a $(CURSES_LIB) -lm $(ALL_LIBS) -lpthread

# For building samtools and its test suite only: NOT to be installed.
libst.a: $(LIBST_OBJS)
Expand Down Expand Up @@ -196,6 +207,7 @@ sample.o: sample.c config.h $(sample_h) $(htslib_khash_h)
stats_isize.o: stats_isize.c config.h stats_isize.h $(htslib_khash_h)
stats.o: stats.c config.h $(htslib_faidx_h) $(htslib_sam_h) $(htslib_hts_h) sam_header.h $(htslib_khash_str2int_h) samtools.h $(htslib_khash_h) $(htslib_kstring_h) stats_isize.h $(sam_opts_h)
bam_markdup.o: bam_markdup.c config.h $(htslib_sam_h) $(sam_opts_h) samtools.h $(bam_h) $(htslib_khash_h)
tmp_file.o: tmp_file.c config.h tmp_file.h


# test programs
Expand Down Expand Up @@ -311,8 +323,11 @@ distclean: clean
-rm -f config.cache config.h config.log config.mk config.status
-rm -f TAGS
-rm -rf autom4te.cache

lz4clean:
$(MAKE) -C $(LZ4DIR) clean

clean-all: clean clean-htslib
clean-all: clean clean-htslib lz4clean


tags:
Expand Down
Loading

0 comments on commit 9c819b0

Please sign in to comment.