Debian Codegraph @

libkmer/test/Makefile

raw
1 include ../../Make.compilers
2
3 # Bigger tblsize makes existDB much faster, but uses more memory (not
4 # much, really). 23 is nice.
5
6 all: test-maskonly-passed position-passed
7 @echo "existDB has expensive tests. They take:"
8 @echo " 17 minutes on 1.8GHz Quadxeon (with KMER=1)"
9 @echo " 60 minutes on 2.8GHz P4 (with KMER=1)"
10 @echo " 120 minutes on 2.0GHz G5 (with KMER=8)"
11 @echo "If you really want to run them, do 'make exist-passed'."
12
13 # ../../meryl/meryl -M equal 1 -s xp -o xp1
14 # ../../meryl/meryl -Dt -n 1 -s xp1 > xp.uni.fasta
15
16 # Dead code, removed.
17 test-mertable:
18 $(CXX) $(CXXFLAGS_COMPILE) -c -o test-mertable.o test-mertable.C $(INCLUDE)
19 $(CXX) $(CXXLDFLAGS) -o test-mertable test-mertable.o $(LIBS)
20 ../../leaff/leaff -G 1000 5000 8000 > xp.fasta
21 ./test-mertable xp.fasta
22 echo test-mertable PASSED
23 rm xp* junk*
24
25 test-maskonly-passed:
26 $(CXX) $(CXXFLAGS_COMPILE) -c -o test-maskonly.o test-maskonly.C $(INCLUDE)
27 $(CXX) $(CXXLDFLAGS) -o test-maskonly test-maskonly.o $(LIBS)
28 ../../leaff/leaff -G 1000 5000 8000 > xp.fasta
29 ../../meryl/meryl -B -f -m 14 -s xp.fasta -o xp
30 ../../meryl/meryl -Dt -n 2 -s xp > xp.dup.fasta
31 ./test-maskonly xp.fasta xp.dup.fasta xp.dup.fasta
32 echo test-maskonky-passed PASSED
33 rm xp* junk*
34 touch test-maskonly-passed
35
36 test-rebuild: test-rebuild.C ../positionDB.H
37 $(CXX) $(CXXFLAGS_COMPILE) -c -o test-rebuild.o test-rebuild.C $(INCLUDE)
38 $(CXX) $(CXXLDFLAGS) -o test-rebuild test-rebuild.o $(LIBS)
39 ./test-rebuild
40 @echo test-rebuild-passed PASSED
41 rm -f xp* junk*
42
43 position-passed: position-passed1 position-passed2 exist-fast-passed
44 touch position-passed
45 xp.fasta: ../../leaff/leaff
46 #../../leaff/leaff -G 1000 5000 8000 > xp.fasta
47 ../../leaff/leaff -G 1 500 800 > xp.fasta
48 yp.fasta: ../../leaff/leaff
49 #../../leaff/leaff -G 100 500 1000 > yp.fasta
50 ../../leaff/leaff -G 1 50 100 > yp.fasta
51 position-passed1: testerp xp.fasta
52 ./testerp -test1 xp.fasta
53 touch position-passed1
54 position-passed2: testerp xp.fasta yp.fasta
55 ./testerp -test2 xp.fasta yp.fasta
56 touch position-passed2
57 exist-fast-passed: ../existDB xe.fasta
58 ../existDB -mersize 14 -tblsize 21 -testfiles xe.fasta junk
59 ../existDB -mersize 14 -tblsize 21 -testexistence xe.fasta
60 rm -f xe.mcdat xe.mcidx
61 ../../meryl/meryl -B -f -m 14 -s xe.fasta -o xe
62 ../existDB -mersize 14 -tblsize 21 -testexhaustive xe.fasta xe
63 touch exist-fast-passed
64
65
66 exist-passed: exist-passed1 exist-passed2 exist-passed3
67 touch exist-passed
68 xe.fasta: ../../leaff/leaff
69 #../../leaff/leaff -G 1000 5000 8000 > xe.fasta
70 ../../leaff/leaff -G 1 500 800 > xe.fasta
71 exist-passed1: ../existDB xe.fasta
72 ../existDB -mersize 17 -tblsize 23 -testfiles xe.fasta junk
73 rm -f junk*
74 touch exist-passed1
75 exist-passed2: ../existDB xe.fasta
76 ../existDB -mersize 17 -tblsize 23 -testexistence xe.fasta
77 rm -f junk*
78 touch exist-passed2
79 exist-passed3: ../existDB xe.fasta ../../meryl/meryl
80 rm -f xe.mcdat xe.mcidx
81 ../../meryl/meryl -B -f -m 17 -s xe.fasta -o xe
82 ../existDB -mersize 17 -tblsize 23 -testexhaustive xe.fasta xe
83 rm -f junk*
84 touch exist-passed3
85
86
87 INCLUDE = -I../../libbio -I../../libseq -I../../libutil -I../../libmeryl -I..
88 LIBS = -L../../libbio -L../../libseq -L../../libutil -L../../libmeryl -L.. -lkmer -lmeryl -lbio -lutil
89 DBGOPT = -DERROR_CHECK_COUNTING -DERROR_CHECK_COUNTING_ENCODING -DERROR_CHECK_EMPTY_BUCKETS
90
91 testerp: ../positionDB.C ../positionDB.H ../positionDB-access.C ../positionDB-dump.C ../positionDB-sort.C ../positionDB-file.C
92 $(CXX) $(DBGOPT) $(CXXFLAGS_COMPILE) -c -o driverp.o ../driver-posDB.C $(INCLUDE)
93 $(CXX) $(DBGOPT) $(CXXFLAGS_COMPILE) -c -o positionDB.o ../positionDB.C $(INCLUDE)
94 $(CXX) $(DBGOPT) $(CXXFLAGS_COMPILE) -c -o positionDB-access.o ../positionDB-access.C $(INCLUDE)
95 $(CXX) $(DBGOPT) $(CXXFLAGS_COMPILE) -c -o positionDB-dump.o ../positionDB-dump.C $(INCLUDE)
96 $(CXX) $(DBGOPT) $(CXXFLAGS_COMPILE) -c -o positionDB-sort.o ../positionDB-sort.C $(INCLUDE)
97 $(CXX) $(DBGOPT) $(CXXFLAGS_COMPILE) -c -o positionDB-file.o ../positionDB-file.C $(INCLUDE)
98 $(CXX) $(CXXLDFLAGS) -o testerp driverp.o positionDB.o positionDB-access.o positionDB-dump.o positionDB-sort.o positionDB-file.o $(LIBS) -lm
99
100 # XXX: There isn't any reason we need to build testere, we could
101 # just use ../existDB (as it did before!)
102 testere: ../existDB.C ../existDB-create-from-fasta.C ../existDB-create-from-meryl.C ../existDB-state.C
103 $(CXX) $(DBGOPT) $(CXXFLAGS_COMPILE) -c -o drivere.o ../driver-existDB.C $(INCLUDE)
104 $(CXX) $(DBGOPT) $(CXXFLAGS_COMPILE) -c -o existDB.o ../existDB.C $(INCLUDE)
105 $(CXX) $(DBGOPT) $(CXXFLAGS_COMPILE) -c -o existDB-create-from-fasta.o ../existDB-create-from-fasta.C $(INCLUDE)
106 $(CXX) $(DBGOPT) $(CXXFLAGS_COMPILE) -c -o existDB-create-from-meryl.o ../existDB-create-from-meryl.C $(INCLUDE)
107 $(CXX) $(DBGOPT) $(CXXFLAGS_COMPILE) -c -o existDB-state.o ../existDB-state.C $(INCLUDE)
108 $(CXX) $(CXXLDFLAGS) -o testere drivere.o existDB.o existDB-create-from-fasta.o existDB-create-from-meryl.o existDB-state.o $(LIBS) -lm
109
110 clean:
111 rm -f *passed*
112 rm -f testerp *.o xp.fasta* yp.fasta*
113 rm -f testere junk* xe.fasta* xe.mcidx xe.mcdat xe.merStream
114 rm -f test-maskonly xp.dup.fasta xp.mcidx xp.mcdat
115 rm -f test-rebuild