Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long Read Giraffe #3700

Merged
merged 104 commits into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
d64ee68
Merge remote-tracking branch 'xian/distance-minimizer-caching' into l…
adamnovak May 23, 2022
d2e7d17
Add MinimizerMapper::chain_extension_group that does half of the chai…
adamnovak May 23, 2022
e3df479
Rearrange and correct test cases and add debugging
adamnovak May 24, 2022
3f6d5ae
Fix bug where overlaps were scored 1 too low
adamnovak May 24, 2022
a93fa0d
Fix more test cases and adjust debugging
adamnovak May 24, 2022
967418d
Note that we don't actually enforce a containment ban
adamnovak May 24, 2022
cc396fd
Implement some measurement and scoring of graph distances for chaining
adamnovak May 25, 2022
603335a
Add some easy unit tests
adamnovak May 25, 2022
a676d61
Allow building individual dynamic unit test binaries
adamnovak May 26, 2022
5d8ffa3
Add another test
adamnovak May 26, 2022
41d93a7
Swap over to traits so we can define the DP once as a template
adamnovak May 27, 2022
17ee4e1
Hook up chaining into single-end Giraffe and get ready for the chain …
adamnovak May 27, 2022
84b2bc6
Get build working with chaining
adamnovak May 27, 2022
021bb4b
Merge Jouni's WFA-over-GBWT algorithm
adamnovak May 27, 2022
614abc5
Merge remote-tracking branch 'upstream/distance-minimizer-caching' in…
adamnovak May 31, 2022
3ba122c
Add some tests for long read Giraffe that don't pass yet
adamnovak May 31, 2022
1f96567
Copy minimizer total limit and overlap detection over to old distance…
adamnovak May 31, 2022
7aa80b5
Start implementing aligning between gapless extensions
adamnovak Jun 1, 2022
b3e1672
Start on actually implementing the helpers and welding
adamnovak Jun 1, 2022
49a95a6
Implement WFAAlignment to vg Alignment conversion
adamnovak Jun 2, 2022
12fd227
Act more like the existing alignment conversion logic
adamnovak Jun 2, 2022
a4e4b93
Get chaining to be attempted
adamnovak Jun 2, 2022
acee183
Add some unit tests for alignment welding
adamnovak Jun 3, 2022
c12d9a6
Make easy join test pass
adamnovak Jun 3, 2022
4ad22af
Make work-showing useful for long reads
adamnovak Jun 3, 2022
45df6d5
Start at the right extension and make dropping overlapping extensions…
adamnovak Jun 3, 2022
2767fcc
Merge remote-tracking branch 'upstream/master' into lr-giraffe
adamnovak Jun 3, 2022
9272e62
Start trimming
adamnovak Jun 6, 2022
4b0e00b
Merge remote-tracking branch 'jouni/master' into lr-giraffe
adamnovak Jun 7, 2022
6f68599
Rename some variables to make making extensions optional make sense
adamnovak Jun 7, 2022
e0cffb1
Template out the extension logic
adamnovak Jun 7, 2022
2e44d7a
Unify seed finding with traits
adamnovak Jun 7, 2022
9258a00
Unify cluster scoring
adamnovak Jun 7, 2022
264e584
Templatize chaining
adamnovak Jun 7, 2022
9dd7f44
Templatize best chain function
adamnovak Jun 7, 2022
404484c
Start trying to chain raw seeds
adamnovak Jun 7, 2022
1297d05
Start factoring chaining into its own file
adamnovak Jun 7, 2022
23ff865
Hook up chaining as a parallel path to gapless extensions
adamnovak Jun 7, 2022
ff5bb5d
Get the new chaining space system to compile
adamnovak Jun 7, 2022
0dd2f60
Split out chaining unit tests
adamnovak Jun 8, 2022
d778476
Add cpp file for chaining code to hold non-templates
adamnovak Jun 8, 2022
d2b5231
Merge remote-tracking branch 'upstream/master' into lr-giraffe
adamnovak Jun 8, 2022
5871d22
Templatize and deduplicate annotate_with_minimizer_statistics
adamnovak Jun 8, 2022
53b87a4
Fix up gap length difference scoring
adamnovak Jun 8, 2022
9ca509c
Flip around tail alignments to go the right way, but they're too slow…
adamnovak Jun 8, 2022
c8daa74
Chain with a finite lookback to previous items
adamnovak Jun 13, 2022
ae7d90f
Get chaining mostly working; splicing is still broken because connect…
adamnovak Jun 13, 2022
be49804
Trim trailing bases so we can splice alignments by abutment, but some…
adamnovak Jun 13, 2022
db59f8e
Get seed to match run logic in the chaining space working properly fo…
adamnovak Jun 14, 2022
e44d782
Merge remote-tracking branch 'upstream/master' into lr-giraffe
adamnovak Jun 17, 2022
6718d0c
Stop popping bases and also pass old_seeds where needed
adamnovak Jun 17, 2022
975bc79
Go back to the original sweep-line code for gapless extension set sco…
adamnovak Jun 17, 2022
16c9602
Handle partial alignments from WFAAligner
adamnovak Jun 17, 2022
d5127c9
Try to debug a busted read
adamnovak Jun 21, 2022
16a27e0
Start brute-forcing path conversion
adamnovak Jun 22, 2022
dcdb1db
Check generated path sequence
adamnovak Jun 22, 2022
fcd0c72
Pass randomized tests for alignment round-trip
adamnovak Jun 22, 2022
bdface7
Simplify conversion function slightly
adamnovak Jun 22, 2022
e868de7
Improve comment and simplify error message
adamnovak Jun 22, 2022
966309a
Don't do pathologically long tail or connection alignments that can m…
adamnovak Jun 23, 2022
32b9988
Shorten max connecting length and get Giraffe Facts to run when there…
adamnovak Jun 23, 2022
17e2b6b
Get Giraffe Facts to report a speed
adamnovak Jun 23, 2022
66776f1
Handle empty tails
adamnovak Jun 23, 2022
8ec6cea
Merge remote-tracking branch 'courtyard/lr-giraffe' into lr-giraffe
adamnovak Jun 27, 2022
3f83f8b
Change unit tests to match the current lenient chaining
adamnovak Jun 27, 2022
a3af8ca
Add tests for distractability
adamnovak Jun 27, 2022
6b8f49f
Don't skip reachable things
adamnovak Jun 27, 2022
84fe01c
Allow tuning connections and tails separately
adamnovak Jun 28, 2022
8e090e6
Use a hashtable instead of a sorted list to find points by exact scor…
adamnovak Jun 29, 2022
082d8de
Start on combining nodes into runs
adamnovak Jul 6, 2022
0f273a4
Add a benchmark for connect()
adamnovak Jul 6, 2022
743bc73
Remember to start with empty alignment in test
adamnovak Jul 6, 2022
3d48df3
Build positions in the right order
adamnovak Jul 6, 2022
76c0696
Benchmark quietly
adamnovak Jul 6, 2022
3162685
Test 10 node sequence
adamnovak Jul 6, 2022
0c3374d
Merge commit '8e090e64fba31bd89f4d1c9bfef6dbe9284273d6' into lr-giraffe
adamnovak Jul 6, 2022
4ef2734
Merge remote-tracking branch 'courtyard/lr-giraffe' into lr-giraffe
adamnovak Jul 6, 2022
fd59d80
Get coalesced WFANodes to build
adamnovak Jul 6, 2022
85d17c7
Add some debugging prints
adamnovak Jul 7, 2022
0644c09
Revert "Add some debugging prints"
adamnovak Jul 7, 2022
153a921
Add single test for working in a multi-node run
adamnovak Jul 7, 2022
5626e82
Revert "Revert "Add some debugging prints""
adamnovak Jul 7, 2022
92fa053
Add more debugging
adamnovak Jul 7, 2022
6202109
Pass single node perfect match test
adamnovak Jul 8, 2022
ec62c3b
Change bound type to handle exact hits
adamnovak Jul 8, 2022
db7cd1c
Protect node_offset_of
adamnovak Jul 8, 2022
807bef6
Fix some incorrect conversion of destination offset
adamnovak Jul 8, 2022
9052dda
Fix expected edit counts
adamnovak Jul 8, 2022
fb0e93d
Remove duplicate test cases
adamnovak Jul 8, 2022
3da9edc
Turn off debug logging
adamnovak Jul 8, 2022
d7014bd
Change to ImmutableList which is also taking all our time
adamnovak Jul 8, 2022
19572da
Use a weird shared-middle list for paths
adamnovak Jul 8, 2022
ba7f449
Try inlining 4 items in the path type
adamnovak Jul 8, 2022
cbb5607
Set length limits to 5 kb
adamnovak Jul 8, 2022
61dcb9c
Add error model and low default limits for WFAExtender score
adamnovak Jul 11, 2022
4a0f240
Merge remote-tracking branch 'origin/lr-giraffe' into lr-giraffe
adamnovak Jul 11, 2022
3f3b5d3
Cap WFA scores aggressively
adamnovak Jul 11, 2022
0e3a8c2
Remove debug prints
adamnovak Jul 11, 2022
453349b
Don't look for unittest support headers that don't exist
adamnovak Jul 11, 2022
a2bb88a
Raise limits for benchmarking so it runs
adamnovak Jul 13, 2022
1bc6d87
Make sure to adopt the node offset when adopting the initial node
adamnovak Jul 15, 2022
45ff47d
Merge remote-tracking branch 'upstream/master' into lr-giraffe
adamnovak Jul 21, 2022
360b0ff
Drop unused print
adamnovak Jul 21, 2022
694f472
Add a test for non-diverging multi-node cycles
adamnovak Jul 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 77 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@ CONFIG_SRC_DIR:=$(SRC_DIR)/config
IO_SRC_DIR:=$(SRC_DIR)/io
SUBCOMMAND_SRC_DIR:=$(SRC_DIR)/subcommand
UNITTEST_SRC_DIR:=$(SRC_DIR)/unittest
UNITTEST_SUPPORT_SRC_DIR:=$(SRC_DIR)/unittest/support
BIN_DIR:=bin
UNITTEST_BIN_DIR:=$(BIN_DIR)/unittest
OBJ_DIR:=obj
SHARED_OBJ_DIR:=obj/pic
ALGORITHMS_OBJ_DIR:=$(OBJ_DIR)/algorithms
ALGORITHMS_SHARED_OBJ_DIR:=$(SHARED_OBJ_DIR)/algorithms
CONFIG_OBJ_DIR:=$(OBJ_DIR)/config
IO_OBJ_DIR:=$(OBJ_DIR)/io
IO_SHARED_OBJ_DIR:=$(SHARED_OBJ_DIR)/io
SUBCOMMAND_OBJ_DIR:=$(OBJ_DIR)/subcommand
UNITTEST_OBJ_DIR:=$(OBJ_DIR)/unittest
UNITTEST_SUPPORT_OBJ_DIR:=$(OBJ_DIR)/unittest/support
LIB_DIR:=lib
# INC_DIR must be a relative path
INC_DIR:=include
Expand All @@ -26,11 +32,15 @@ all: $(BIN_DIR)/$(EXE)

# Magic dependencies (see <http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/#tldr>)
include $(wildcard $(OBJ_DIR)/*.d)
include $(wildcard $(SHARED_OBJ_DIR)/*.d)
include $(wildcard $(ALGORITHMS_OBJ_DIR)/*.d)
include $(wildcard $(ALGORITHMS_SHARED_OBJ_DIR)/*.d)
include $(wildcard $(CONFIG_OBJ_DIR)/*.d)
include $(wildcard $(IO_OBJ_DIR)/*.d)
include $(wildcard $(IO_SHARED_OBJ_DIR)/*.d)
include $(wildcard $(SUBCOMMAND_OBJ_DIR)/*.d)
include $(wildcard $(UNITTEST_OBJ_DIR)/*.d)
include $(wildcard $(UNITTEST_BIN_DIR)/*.d)

# What pkg-config-controlled system dependencies should we use compile and link flags from?
# Use PKG_CONFIG_PATH to point the build system at the right versions of these, if they aren't picked up automatically.
Expand All @@ -52,11 +62,11 @@ DEPGEN_FLAGS := -MMD -MP
# necessary on all platforms and suppresses warnings.
# Also, pkg-config flags need to be made -isystem if our dependency install
# directory is, or they might put a system HTSlib before ours.
INCLUDE_FLAGS :=-I$(CWD)/$(INC_DIR) -isystem $(CWD)/$(INC_DIR) -I. -I$(CWD)/$(SRC_DIR) -I$(CWD)/$(UNITTEST_SRC_DIR) -I$(CWD)/$(SUBCOMMAND_SRC_DIR) -I$(CWD)/$(INC_DIR)/dynamic $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_DEPS) $(PKG_CONFIG_STATIC_DEPS) | sed 's/ -I/ -isystem /g')
INCLUDE_FLAGS :=-I$(CWD)/$(INC_DIR) -isystem $(CWD)/$(INC_DIR) -I. -I$(CWD)/$(SRC_DIR) -I$(CWD)/$(UNITTEST_SRC_DIR) -I$(CWD)/$(UNITTEST_SUPPORT_SRC_DIR) -I$(CWD)/$(SUBCOMMAND_SRC_DIR) -I$(CWD)/$(INC_DIR)/dynamic $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_DEPS) $(PKG_CONFIG_STATIC_DEPS) | sed 's/ -I/ -isystem /g')

# Define libraries to link against.
LD_LIB_DIR_FLAGS := -L$(CWD)/$(LIB_DIR)
LD_LIB_FLAGS := $(CWD)/$(LIB_DIR)/libvgio.a -lvcflib -ltabixpp -lgssw -lssw -lsublinearLS -lpthread -lncurses -lgcsa2 -lgbwtgraph -lgbwt -ldivsufsort -ldivsufsort64 -lvcfh -lraptor2 -lpinchesandcacti -l3edgeconnected -lsonlib -lfml -lstructures -lbdsg -lxg -lsdsl -lzstd -lhandlegraph
LD_LIB_FLAGS := -lvgio -lvcflib -ltabixpp -lgssw -lssw -lsublinearLS -lpthread -lncurses -lgcsa2 -lgbwtgraph -lgbwt -ldivsufsort -ldivsufsort64 -lvcfh -lraptor2 -lpinchesandcacti -l3edgeconnected -lsonlib -lfml -lstructures -lbdsg -lxg -lsdsl -lzstd -lhandlegraph
# We omit Boost Program Options for now; we find it in a platform-dependent way.
# By default it has no suffix
BOOST_SUFFIX=""
Expand Down Expand Up @@ -238,9 +248,11 @@ STATIC_FLAGS=-static -static-libstdc++ -static-libgcc -Wl,--allow-multiple-defin

# These are put into libvg. Grab everything except main
OBJ = $(filter-out $(OBJ_DIR)/main.o,$(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(wildcard $(SRC_DIR)/*.cpp)))
SHARED_OBJ = $(patsubst $(OBJ_DIR)/%.o,$(SHARED_OBJ_DIR)/%.o,$(OBJ))

# And all the algorithms
ALGORITHMS_OBJ = $(patsubst $(ALGORITHMS_SRC_DIR)/%.cpp,$(ALGORITHMS_OBJ_DIR)/%.o,$(wildcard $(ALGORITHMS_SRC_DIR)/*.cpp))
ALGORITHMS_SHARED_OBJ = $(patsubst $(ALGORITHMS_OBJ_DIR)/%.o,$(ALGORITHMS_SHARED_OBJ_DIR)/%.o,$(ALGORITHMS_OBJ))

# These aren't put into libvg. They are linked into vg itself to communicate
# things about the platform.
Expand All @@ -249,13 +261,20 @@ CONFIG_OBJ =

# But always build all the IO logic
IO_OBJ = $(patsubst $(IO_SRC_DIR)/%.cpp,$(IO_OBJ_DIR)/%.o,$(wildcard $(IO_SRC_DIR)/*.cpp))
IO_SHARED_OBJ = $(patsubst $(IO_OBJ_DIR)/%.o,$(IO_SHARED_OBJ_DIR)/%.o,$(IO_OBJ))

# These aren't put into libvg, but they provide subcommand implementations for the vg bianry
SUBCOMMAND_OBJ = $(patsubst $(SUBCOMMAND_SRC_DIR)/%.cpp,$(SUBCOMMAND_OBJ_DIR)/%.o,$(wildcard $(SUBCOMMAND_SRC_DIR)/*.cpp))

# These aren't put into libvg. But they do go into the main vg binary to power its self-test.
UNITTEST_OBJ = $(patsubst $(UNITTEST_SRC_DIR)/%.cpp,$(UNITTEST_OBJ_DIR)/%.o,$(wildcard $(UNITTEST_SRC_DIR)/*.cpp))

# These support the tests. Some should go into the main vg binary but some should only go into test-suite binaries.
UNITTEST_SUPPORT_OBJ = $(patsubst $(UNITTEST_SUPPORT_SRC_DIR)/%.cpp,$(UNITTEST_SUPPORT_OBJ_DIR)/%.o,$(wildcard $(UNITTEST_SUPPORT_SRC_DIR)/*.cpp))

# These are per-test-suite binaries we can build faster
UNITTEST_EXE = $(patsubst $(UNITTEST_SRC_DIR)/%.cpp,$(UNITTEST_BIN_DIR)/%,$(wildcard $(UNITTEST_SRC_DIR)/*.cpp))


RAPTOR_DIR:=deps/raptor
JEMALLOC_DIR:=deps/jemalloc
Expand Down Expand Up @@ -299,7 +318,7 @@ DEP_OBJ =
DEP_OBJ += $(OBJ_DIR)/progress_bar.o
DEP_OBJ += $(OBJ_DIR)/sha1.o
DEP_OBJ += $(OBJ_DIR)/Fasta.o

DEP_SHARED_OBJ = $(patsubst $(OBJ_DIR)/%.o,$(SHARED_OBJ_DIR)/%.o,$(DEP_OBJ))

# These are libraries that we need to build before we link vg.
# It would be nice to dump their contents into libvg to make it stand-alone.
Expand Down Expand Up @@ -385,6 +404,7 @@ DEPS += $(INC_DIR)/atomic_queue.h

# Aggregate all libvg deps, and exe deps other than libvg
LIBVG_DEPS = $(OBJ) $(ALGORITHMS_OBJ) $(IO_OBJ) $(DEP_OBJ) $(DEPS)
LIBVG_SHARED_DEPS = $(SHARED_OBJ) $(ALGORITHMS_SHARED_OBJ) $(IO_SHARED_OBJ) $(DEP_SHARED_OBJ) $(DEPS)
EXE_DEPS = $(OBJ_DIR)/main.o $(UNITTEST_OBJ) $(SUBCOMMAND_OBJ) $(CONFIG_OBJ) $(DEPS) $(LINK_DEPS)

# We have a target we can build to do everything but link the library and executable
Expand All @@ -393,6 +413,14 @@ objs: $(LIBVG_DEPS) $(EXE_DEPS)
$(LIB_DIR)/libvg.a: $(LIBVG_DEPS)
rm -f $@
ar rs $@ $(OBJ) $(ALGORITHMS_OBJ) $(IO_OBJ) $(DEP_OBJ)

$(LIB_DIR)/libvg.$(SHARED_SUFFIX): $(LIBVG_SHARED_DEPS)
rm -f $@
$(CXX) -shared -o $@ $(SHARED_OBJ) $(ALGORITHMS_SHARED_OBJ) $(IO_SHARED_OBJ) $(DEP_SHARED_OBJ)

# Each test set can have its own binary
$(UNITTEST_EXE): $(UNITTEST_BIN_DIR)/%: $(UNITTEST_OBJ_DIR)/%.o $(UNITTEST_SUPPORT_OBJ) $(CONFIG_OBJ) $(LIB_DIR)/libvg.$(SHARED_SUFFIX)
. ./source_me.sh && $(CXX) $(LDFLAGS) $(INCLUDE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) -o $@ $< $(UNITTEST_SUPPORT_OBJ) $(CONFIG_OBJ) $(LIB_DIR)/libvg.$(SHARED_SUFFIX) $(LD_LIB_DIR_FLAGS) $(LD_LIB_FLAGS) $(LD_STATIC_LIB_FLAGS) $(LD_STATIC_LIB_DEPS)

# For a normal dynamic build we remove the static build marker
$(BIN_DIR)/$(EXE): $(LIB_DIR)/libvg.a $(EXE_DEPS)
Expand Down Expand Up @@ -431,7 +459,7 @@ test: $(BIN_DIR)/$(EXE) $(LIB_DIR)/libvg.a test/build_graph $(BIN_DIR)/shuf $(BI
. ./source_me.sh && doc/test-docs.sh
cd test && rm -rf tmp && mkdir tmp && mv 2_2.mat build_graph.cpp default.mat tmp && rm -f *.* && mv tmp/* . && rmdir tmp

docs: $(SRC_DIR)/*.cpp $(SRC_DIR)/*.hpp $(SUBCOMMAND_SRC_DIR)/*.cpp $(SUBCOMMAND_SRC_DIR)/*.hpp $(UNITTEST_SRC_DIR)/*.cpp $(UNITTEST_SRC_DIR)/*.hpp
docs: $(SRC_DIR)/*.cpp $(SRC_DIR)/*.hpp $(ALGORITHMS_SRC_DIR)/*.cpp $(ALGORITHMS_SRC_DIR)/*.hpp $(SUBCOMMAND_SRC_DIR)/*.cpp $(SUBCOMMAND_SRC_DIR)/*.hpp $(UNITTEST_SRC_DIR)/*.cpp $(UNITTEST_SRC_DIR)/*.hpp $(UNITTEST_SUPPORT_SRC_DIR)/*.cpp
doxygen
echo "View documentation at: file://$(PWD)/doc/doxygen/index.html"

Expand Down Expand Up @@ -505,12 +533,18 @@ $(INC_DIR)/BooPHF.h: $(BBHASH_DIR)/BooPHF.h
$(INC_DIR)/progress_bar.hpp: $(PROGRESS_BAR_DIR)/progress_bar.hpp
+cp $(PROGRESS_BAR_DIR)/progress_bar.hpp $(CWD)/$(INC_DIR)

$(OBJ_DIR)/progress_bar.o: $(PROGRESS_BAR_DIR)/*.hpp $(PROGRESS_BAR_DIR)/*.cpp
+. ./source_me.sh && cd $(PROGRESS_BAR_DIR) && $(MAKE) $(FILTER) && cp progress_bar.o $(CWD)/$(OBJ_DIR)
$(OBJ_DIR)/progress_bar.o: $(PROGRESS_BAR_DIR)/progress_bar.cpp $(PROGRESS_BAR_DIR)/*.hpp
+. ./source_me.sh && $(CXX) -I$(FASTAHACK_DIR) $(INCLUDE_FLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
$(SHARED_OBJ_DIR)/progress_bar.o: $(PROGRESS_BAR_DIR)/progress_bar.cpp $(PROGRESS_BAR_DIR)/*.hpp
+. ./source_me.sh && $(CXX) -I$(FASTAHACK_DIR) $(INCLUDE_FLAGS) $(CXXFLAGS) $(CPPFLAGS) -fPIC -c -o $@ $<

# We also run the fastahack build process in another rule, which we need to depend on to avoid races
$(OBJ_DIR)/Fasta.o: $(FASTAHACK_DIR)/fastahack
+. ./source_me.sh && cd $(FASTAHACK_DIR) && $(MAKE) $(FILTER) && cp Fasta.o $(CWD)/$(OBJ_DIR) && cp Fasta.h $(CWD)/$(INC_DIR)
$(INC_DIR)/Fasta.h: $(FASTAHACK_DIR)/Fasta.h
+. ./source_me.sh && cd $(FASTAHACK_DIR) && cp Fasta.h $(CWD)/$(INC_DIR)

$(OBJ_DIR)/Fasta.o: $(FASTAHACK_DIR)/Fasta.cpp $(INC_DIR)/Fasta.h $(FASTAHACK_DIR)/fastahack
+. ./source_me.sh && $(CXX) -I$(FASTAHACK_DIR) $(INCLUDE_FLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< $(FILTER)
$(SHARED_OBJ_DIR)/Fasta.o: $(FASTAHACK_DIR)/Fasta.cpp $(INC_DIR)/Fasta.h $(FASTAHACK_DIR)/fastahack
+. ./source_me.sh && $(CXX) -I$(FASTAHACK_DIR) $(INCLUDE_FLAGS) $(CXXFLAGS) $(CPPFLAGS) -fPIC -c -o $@ $< $(FILTER)

# We have this target to clean up the old Protobuf we used to have.
# We can remove it after we no longer care about building properly on a dirty
Expand Down Expand Up @@ -692,6 +726,8 @@ $(LIB_DIR)/libelf.a: $(ELFUTILS_DIR)/libebl/*.c $(ELFUTILS_DIR)/libebl/*.h $(ELF

$(OBJ_DIR)/sha1.o: $(SHA1_DIR)/sha1.cpp $(SHA1_DIR)/sha1.hpp
+$(CXX) $(INCLUDE_FLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< $(FILTER)
$(SHARED_OBJ_DIR)/sha1.o: $(SHA1_DIR)/sha1.cpp $(SHA1_DIR)/sha1.hpp
+$(CXX) $(INCLUDE_FLAGS) $(CXXFLAGS) $(CPPFLAGS) -fPIC -c -o $@ $< $(FILTER)

$(LIB_DIR)/libfml.a: $(FERMI_DIR)/*.h $(FERMI_DIR)/*.c
. ./source_me.sh && cd $(FERMI_DIR) && $(MAKE) $(FILTER) && cp *.h $(CWD)/$(INC_DIR)/ && cp libfml.a $(CWD)/$(LIB_DIR)/
Expand Down Expand Up @@ -786,18 +822,30 @@ $(OBJ_DIR)/version.o: $(SRC_DIR)/version.cpp $(SRC_DIR)/version.hpp $(INC_DIR)/v
$(OBJ) $(OBJ_DIR)/main.o: $(OBJ_DIR)/%.o : $(SRC_DIR)/%.cpp $(OBJ_DIR)/%.d $(DEPS)
. ./source_me.sh && $(CXX) $(INCLUDE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) $(DEPGEN_FLAGS) -c -o $@ $< $(FILTER)
@touch $@
$(SHARED_OBJ): $(SHARED_OBJ_DIR)/%.o : $(SRC_DIR)/%.cpp $(SHARED_OBJ_DIR)/%.d $(DEPS)
. ./source_me.sh && $(CXX) $(INCLUDE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) $(DEPGEN_FLAGS) -fPIC -c -o $@ $< $(FILTER)
@touch $@
$(ALGORITHMS_OBJ): $(ALGORITHMS_OBJ_DIR)/%.o : $(ALGORITHMS_SRC_DIR)/%.cpp $(ALGORITHMS_OBJ_DIR)/%.d $(DEPS)
. ./source_me.sh && $(CXX) $(INCLUDE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) $(DEPGEN_FLAGS) -c -o $@ $< $(FILTER)
@touch $@
$(ALGORITHMS_SHARED_OBJ): $(ALGORITHMS_SHARED_OBJ_DIR)/%.o : $(ALGORITHMS_SRC_DIR)/%.cpp $(ALGORITHMS_SHARED_OBJ_DIR)/%.d $(DEPS)
. ./source_me.sh && $(CXX) $(INCLUDE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) $(DEPGEN_FLAGS) -fPIC -c -o $@ $< $(FILTER)
@touch $@
$(IO_OBJ): $(IO_OBJ_DIR)/%.o : $(IO_SRC_DIR)/%.cpp $(IO_OBJ_DIR)/%.d $(DEPS)
. ./source_me.sh && $(CXX) $(INCLUDE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) $(DEPGEN_FLAGS) -c -o $@ $< $(FILTER)
@touch $@
$(IO_SHARED_OBJ): $(IO_SHARED_OBJ_DIR)/%.o : $(IO_SRC_DIR)/%.cpp $(IO_SHARED_OBJ_DIR)/%.d $(DEPS)
. ./source_me.sh && $(CXX) $(INCLUDE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) $(DEPGEN_FLAGS) -fPIC -c -o $@ $< $(FILTER)
@touch $@
$(SUBCOMMAND_OBJ): $(SUBCOMMAND_OBJ_DIR)/%.o : $(SUBCOMMAND_SRC_DIR)/%.cpp $(SUBCOMMAND_OBJ_DIR)/%.d $(DEPS)
. ./source_me.sh && $(CXX) $(INCLUDE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) $(DEPGEN_FLAGS) -c -o $@ $< $(FILTER)
@touch $@
$(UNITTEST_OBJ): $(UNITTEST_OBJ_DIR)/%.o : $(UNITTEST_SRC_DIR)/%.cpp $(UNITTEST_OBJ_DIR)/%.d $(DEPS)
. ./source_me.sh && $(CXX) $(INCLUDE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) $(DEPGEN_FLAGS) -c -o $@ $< $(FILTER)
@touch $@
$(UNITTEST_SUPPORT_OBJ): $(UNITTEST_SUPPORT_OBJ_DIR)/%.o : $(UNITTEST_SUPPORT_SRC_DIR)/%.cpp $(UNITTEST_SUPPORT_OBJ_DIR)/%.d $(DEPS)
. ./source_me.sh && $(CXX) $(INCLUDE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) $(DEPGEN_FLAGS) -c -o $@ $< $(FILTER)
@touch $@

# Config objects get individual rules
$(CONFIG_OBJ_DIR)/allocator_config_jemalloc.o: $(CONFIG_SRC_DIR)/allocator_config_jemalloc.cpp $(CONFIG_OBJ_DIR)/allocator_config_jemalloc.d $(DEPS) $(LIB_DIR)/libjemalloc.a
Expand Down Expand Up @@ -830,13 +878,18 @@ $(UNITTEST_OBJ_DIR)/%.d: ;
.pre-build:
@protoc --version >/dev/null 2>/dev/null || (echo "Error: protobuf compiler (protoc) not available!" ; exit 1)
@if [ ! -d $(BIN_DIR) ]; then mkdir -p $(BIN_DIR); fi
@if [ ! -d $(UNITTEST_BIN_DIR) ]; then mkdir -p $(UNITTEST_BIN_DIR); fi
@if [ ! -d $(LIB_DIR) ]; then mkdir -p $(LIB_DIR); fi
@if [ ! -d $(OBJ_DIR) ]; then mkdir -p $(OBJ_DIR); fi
@if [ ! -d $(SHARED_OBJ_DIR) ]; then mkdir -p $(SHARED_OBJ_DIR); fi
@if [ ! -d $(ALGORITHMS_OBJ_DIR) ]; then mkdir -p $(ALGORITHMS_OBJ_DIR); fi
@if [ ! -d $(ALGORITHMS_SHARED_OBJ_DIR) ]; then mkdir -p $(ALGORITHMS_SHARED_OBJ_DIR); fi
@if [ ! -d $(CONFIG_OBJ_DIR) ]; then mkdir -p $(CONFIG_OBJ_DIR); fi
@if [ ! -d $(IO_OBJ_DIR) ]; then mkdir -p $(IO_OBJ_DIR); fi
@if [ ! -d $(IO_SHARED_OBJ_DIR) ]; then mkdir -p $(IO_SHARED_OBJ_DIR); fi
@if [ ! -d $(SUBCOMMAND_OBJ_DIR) ]; then mkdir -p $(SUBCOMMAND_OBJ_DIR); fi
@if [ ! -d $(UNITTEST_OBJ_DIR) ]; then mkdir -p $(UNITTEST_OBJ_DIR); fi
@if [ ! -d $(UNITTEST_SUPPORT_OBJ_DIR) ]; then mkdir -p $(UNITTEST_SUPPORT_OBJ_DIR); fi
@if [ ! -d $(INC_DIR) ]; then mkdir -p $(INC_DIR); fi
@if [ -e $(INC_DIR)/vg/vg.pb.h ] ; then \
HEADER_VER=$$(cat $(INC_DIR)/vg/vg.pb.h | grep GOOGLE_PROTOBUF_VERSION | sed 's/[^0-9]*\([0-9]*\)[^0-9]*/\1/' | head -n1); \
Expand Down Expand Up @@ -869,20 +922,31 @@ $(UNITTEST_OBJ_DIR)/%.d: ;

# for rebuilding just vg
clean-vg:
$(RM) -r $(BIN_DIR)/$(EXE)
$(RM) -r $(UNITTEST_OBJ_DIR)/*.o $(UNITTEST_OBJ_DIR)/*.d
$(RM) -r $(SUBCOMMAND_OBJ_DIR)/*.o $(SUBCOMMAND_OBJ_DIR)/*.d
$(RM) -r $(OBJ_DIR)/*.o $(OBJ_DIR)/*.d
$(RM) -f $(BIN_DIR)/$(EXE)
$(RM) -f $(UNITTEST_SUPPORT_OBJ_DIR)/*.o $(UNITTEST_SUPPORT_OBJ_DIR)/*.d
$(RM) -f $(UNITTEST_OBJ_DIR)/*.o $(UNITTEST_OBJ_DIR)/*.d
$(RM) -f $(SUBCOMMAND_OBJ_DIR)/*.o $(SUBCOMMAND_OBJ_DIR)/*.d
$(RM) -f $(OBJ_DIR)/*.o $(OBJ_DIR)/*.d
$(RM) -f $(SHARED_OBJ_DIR)/*.o $(SHARED_OBJ_DIR)/*.d
$(RM) -f $(ALGORITHMS_OBJ_DIR)/*.o $(ALGORITHMS_OBJ_DIR)/*.d
$(RM) -f $(ALGORITHMS_SHARED_OBJ_DIR)/*.o $(ALGORITHMS_SHARED_OBJ_DIR)/*.d
$(RM) -f $(IO_OBJ_DIR)/*.o $(IO_OBJ_DIR)/*.d
$(RM) -f $(IO_SHARED_OBJ_DIR)/*.o $(IO_SHARED_OBJ_DIR)/*.d
$(RM) -f $(INC_DIR)/vg_git_version.hpp $(INC_DIR)/vg_system_version.hpp

clean: clean-vcflib
$(RM) -r $(UNITTEST_BIN_DIR)
$(RM) -r $(BIN_DIR)
$(RM) -r $(LIB_DIR)
$(RM) -r $(UNITTEST_SUPPORT_OBJ_DIR)
$(RM) -r $(UNITTEST_OBJ_DIR)
$(RM) -r $(SUBCOMMAND_OBJ_DIR)
$(RM) -r $(IO_SHARED_OBJ_DIR)
$(RM) -r $(IO_OBJ_DIR)
$(RM) -r $(ALGORITHMS_SHARED_OBJ_DIR)
$(RM) -r $(ALGORITHMS_OBJ_DIR)
$(RM) -r $(CONFIG_OBJ_DIR)
$(RM) -r $(SHARED_OBJ_DIR)
$(RM) -r $(OBJ_DIR)
$(RM) -r $(INC_DIR)
$(RM) -r share/
Expand Down
2 changes: 1 addition & 1 deletion deps/vcflib
Submodule vcflib updated 1 files
+15 −2 src/Variant.cpp
Loading