Debian Codegraph @

applications/bed/starch/test/compression_and_extraction/makefile

raw
1 #
2 # makefile
3 #
4
5 TMP = /tmp
6 USER := $(shell whoami)
7 THIS_DIR := $(shell pwd)
8 RESULTS = ${TMP}/${USER}/starch_regression_test/results/compression_and_extraction
9 ORIGINAL_DIR = ${THIS_DIR}/../original_data
10 ORIGINAL_DATA = ${TMP}/${USER}/starch_regression_test
11 BED_INPUT = ${ORIGINAL_DATA}/data/random.bed
12 PLATFORM := $(shell uname)
13 LINUX_BINDIR = ${THIS_DIR}/../binaries/linux
14 OSX_BINDIR = ${THIS_DIR}/../binaries/osx
15
16 all: results_dir archives tests
17
18 results_dir:
19 @echo "[STARCH] making results directory..."
20 @mkdir -p ${RESULTS}
21
22 current_archives: random_2p2p0_bzip2.starch random_2p2p0_gzip.starch
23 @echo "[STARCH] finished making current archives!"
24
25 archives: random_1p2p0_bzip2.starch random_1p2p0_gzip.starch random_1p5p0_bzip2.starch random_1p5p0_gzip.starch random_2p0p0_bzip2.starch random_2p0p0_gzip.starch random_2p1p0_bzip2.starch random_2p1p0_gzip.starch current_archives
26 @echo "[STARCH] finished making archives!"
27
28 tests: concurrent_tests current_tests
29 @echo "[STARCH] finished testing diffs of archives and original input!"
30
31 concurrent_tests: diff_random_1p2p0_bzip2_concurrent diff_random_1p2p0_gzip_concurrent diff_random_1p5p0_bzip2_concurrent diff_random_1p5p0_gzip_concurrent diff_random_2p0p0_bzip2_concurrent diff_random_2p0p0_gzip_concurrent diff_random_2p1p0_bzip2_concurrent diff_random_2p1p0_gzip_concurrent
32
33 current_tests: diff_random_1p2p0_bzip2_current diff_random_1p2p0_gzip_current diff_random_1p5p0_bzip2_current diff_random_1p5p0_gzip_current diff_random_2p0p0_bzip2_current diff_random_2p0p0_gzip_current diff_random_2p1p0_bzip2_current diff_random_2p1p0_gzip_current diff_random_2p2p0_bzip2_current diff_random_2p2p0_gzip_current
34
35 bed_input:
36 @test -s ${BED_INPUT} || make -C ${ORIGINAL_DIR} -f makefile random.bed
37
38 # ---------------------------------------------
39
40 random_1p2p0_bzip2.starch: results_dir bed_input
41 @echo "[STARCH] creating v1.2 bzip2-based starch file from random BED input..."
42 ifeq (${PLATFORM},Linux)
43 test -s ${RESULTS}/$@ || ${LINUX_BINDIR}/v1.2/bin/starch --bzip2 ${BED_INPUT} > ${RESULTS}/$@
44 endif
45 ifeq (${PLATFORM},Darwin)
46 test -s ${RESULTS}/$@ || ${OSX_BINDIR}/v1.2/bin/starch --bzip2 ${BED_INPUT} > ${RESULTS}/$@
47 endif
48
49 diff_random_1p2p0_bzip2_concurrent: random_1p2p0_bzip2.starch
50 @echo "[STARCH] testing difference between v1.2 bzip2-based starch file and random BED input using concurrent (v1.2) binary..."
51 ifeq (${PLATFORM},Linux)
52 ${LINUX_BINDIR}/v1.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
53 endif
54 ifeq (${PLATFORM},Darwin)
55 ${OSX_BINDIR}/v1.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
56 endif
57 @echo "[STARCH] no differences found!"
58
59 diff_random_1p2p0_bzip2_current: random_1p2p0_bzip2.starch
60 @echo "[STARCH] testing difference between v1.2 bzip2-based starch file and random BED input using current (v2.2) binary..."
61 ifeq (${PLATFORM},Linux)
62 ${LINUX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
63 endif
64 ifeq (${PLATFORM},Darwin)
65 ${OSX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
66 endif
67 @echo "[STARCH] no differences found!"
68
69 # ---------------------------------------------
70
71 random_1p2p0_gzip.starch: results_dir bed_input
72 @echo "[STARCH] creating v1.2 gzip-based starch file from random BED input..."
73 ifeq (${PLATFORM},Linux)
74 test -s ${RESULTS}/$@ || ${LINUX_BINDIR}/v1.2/bin/starch --gzip ${BED_INPUT} > ${RESULTS}/$@
75 endif
76 ifeq (${PLATFORM},Darwin)
77 test -s ${RESULTS}/$@ || ${OSX_BINDIR}/v1.2/bin/starch --gzip ${BED_INPUT} > ${RESULTS}/$@
78 endif
79
80 diff_random_1p2p0_gzip_concurrent: random_1p2p0_gzip.starch
81 @echo "[STARCH] testing difference between v1.2 gzip-based starch file and random BED input using concurrent (v1.2) binary..."
82 ifeq (${PLATFORM},Linux)
83 ${LINUX_BINDIR}/v1.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
84 endif
85 ifeq (${PLATFORM},Darwin)
86 ${OSX_BINDIR}/v1.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
87 endif
88 @echo "[STARCH] no differences found!"
89
90 diff_random_1p2p0_gzip_current: random_1p2p0_gzip.starch
91 @echo "[STARCH] testing difference between v1.2 gzip-based starch file and random BED input using current (v2.2) binary..."
92 ifeq (${PLATFORM},Linux)
93 ${LINUX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
94 endif
95 ifeq (${PLATFORM},Darwin)
96 ${OSX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
97 endif
98 @echo "[STARCH] no differences found!"
99
100 # ---------------------------------------------
101
102 random_1p5p0_bzip2.starch: results_dir bed_input
103 @echo "[STARCH] creating v1.5 bzip2-based starch file from random BED input..."
104 ifeq (${PLATFORM},Linux)
105 test -s ${RESULTS}/$@ || ${LINUX_BINDIR}/v1.5/bin/starch --bzip2 ${BED_INPUT} > ${RESULTS}/$@
106 endif
107 ifeq (${PLATFORM},Darwin)
108 test -s ${RESULTS}/$@ || ${OSX_BINDIR}/v1.5/bin/starch --bzip2 ${BED_INPUT} > ${RESULTS}/$@
109 endif
110
111 diff_random_1p5p0_bzip2_concurrent: random_1p5p0_bzip2.starch
112 @echo "[STARCH] testing difference between v1.5 bzip2-based starch file and random BED input using concurrent (v1.5) binary..."
113 ifeq (${PLATFORM},Linux)
114 ${LINUX_BINDIR}/v1.5/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
115 endif
116 ifeq (${PLATFORM},Darwin)
117 ${OSX_BINDIR}/v1.5/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
118 endif
119 @echo "[STARCH] no differences found!"
120
121 diff_random_1p5p0_bzip2_current: random_1p5p0_bzip2.starch
122 @echo "[STARCH] testing difference between v1.5 bzip2-based starch file and random BED input using current (v2.2) binary..."
123 ifeq (${PLATFORM},Linux)
124 ${LINUX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
125 endif
126 ifeq (${PLATFORM},Darwin)
127 ${OSX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
128 endif
129 @echo "[STARCH] no differences found!"
130
131 # ---------------------------------------------
132
133 random_1p5p0_gzip.starch: results_dir bed_input
134 @echo "[STARCH] creating v1.5 gzip-based starch file from random BED input..."
135 ifeq (${PLATFORM},Linux)
136 test -s ${RESULTS}/$@ || ${LINUX_BINDIR}/v1.5/bin/starch --gzip ${BED_INPUT} > ${RESULTS}/$@
137 endif
138 ifeq (${PLATFORM},Darwin)
139 test -s ${RESULTS}/$@ || ${OSX_BINDIR}/v1.5/bin/starch --gzip ${BED_INPUT} > ${RESULTS}/$@
140 endif
141
142 diff_random_1p5p0_gzip_concurrent: random_1p5p0_gzip.starch
143 @echo "[STARCH] testing difference between v1.5 gzip-based starch file and random BED input using concurrent (v1.5) binary..."
144 ifeq (${PLATFORM},Linux)
145 ${LINUX_BINDIR}/v1.5/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
146 endif
147 ifeq (${PLATFORM},Darwin)
148 ${OSX_BINDIR}/v1.5/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
149 endif
150 @echo "[STARCH] no differences found!"
151
152 diff_random_1p5p0_gzip_current: random_1p5p0_gzip.starch
153 @echo "[STARCH] testing difference between v1.5 gzip-based starch file and random BED input using current (v2.2) binary..."
154 ifeq (${PLATFORM},Linux)
155 ${LINUX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
156 endif
157 ifeq (${PLATFORM},Darwin)
158 ${OSX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
159 endif
160 @echo "[STARCH] no differences found!"
161
162 # ---------------------------------------------
163
164 random_2p0p0_bzip2.starch: results_dir bed_input
165 @echo "[STARCH] creating v2.0 bzip2-based starch file from random BED input..."
166 ifeq (${PLATFORM},Linux)
167 test -s ${RESULTS}/$@ || ${LINUX_BINDIR}/v2.0/bin/starch --bzip2 ${BED_INPUT} > ${RESULTS}/$@
168 endif
169 ifeq (${PLATFORM},Darwin)
170 test -s ${RESULTS}/$@ || ${OSX_BINDIR}/v2.0/bin/starch --bzip2 ${BED_INPUT} > ${RESULTS}/$@
171 endif
172
173 diff_random_2p0p0_bzip2_concurrent: random_2p0p0_bzip2.starch
174 @echo "[STARCH] testing difference between v2.0 bzip2-based starch file and random BED input using concurrent (v2.0) binary..."
175 ifeq (${PLATFORM},Linux)
176 ${LINUX_BINDIR}/v2.0/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
177 endif
178 ifeq (${PLATFORM},Darwin)
179 ${OSX_BINDIR}/v2.0/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
180 endif
181 @echo "[STARCH] no differences found!"
182
183 diff_random_2p0p0_bzip2_current: random_2p0p0_bzip2.starch
184 @echo "[STARCH] testing difference between v2.0 bzip2-based starch file and random BED input using current (v2.2) binary..."
185 ifeq (${PLATFORM},Linux)
186 ${LINUX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
187 endif
188 ifeq (${PLATFORM},Darwin)
189 ${OSX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
190 endif
191 @echo "[STARCH] no differences found!"
192
193 # ---------------------------------------------
194
195 random_2p0p0_gzip.starch: results_dir bed_input
196 @echo "[STARCH] creating v2.0 gzip-based starch file from random BED input..."
197 ifeq (${PLATFORM},Linux)
198 test -s ${RESULTS}/$@ || ${LINUX_BINDIR}/v2.0/bin/starch --gzip ${BED_INPUT} > ${RESULTS}/$@
199 endif
200 ifeq (${PLATFORM},Darwin)
201 test -s ${RESULTS}/$@ || ${OSX_BINDIR}/v2.0/bin/starch --gzip ${BED_INPUT} > ${RESULTS}/$@
202 endif
203
204 diff_random_2p0p0_gzip_concurrent: random_2p0p0_gzip.starch
205 @echo "[STARCH] testing difference between v2.0 gzip-based starch file and random BED input using concurrent (v2.0) binary..."
206 ifeq (${PLATFORM},Linux)
207 ${LINUX_BINDIR}/v2.0/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
208 endif
209 ifeq (${PLATFORM},Darwin)
210 ${OSX_BINDIR}/v2.0/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
211 endif
212 @echo "[STARCH] no differences found!"
213
214 diff_random_2p0p0_gzip_current: random_2p0p0_gzip.starch
215 @echo "[STARCH] testing difference between v2.0 gzip-based starch file and random BED input using current (v2.2) binary..."
216 ifeq (${PLATFORM},Linux)
217 ${LINUX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
218 endif
219 ifeq (${PLATFORM},Darwin)
220 ${OSX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
221 endif
222 @echo "[STARCH] no differences found!"
223
224 # ---------------------------------------------
225
226 random_2p1p0_bzip2.starch: results_dir bed_input
227 @echo "[STARCH] creating v2.1 bzip2-based starch file from random BED input..."
228 ifeq (${PLATFORM},Linux)
229 test -s ${RESULTS}/$@ || ${LINUX_BINDIR}/v2.1/bin/starch --bzip2 ${BED_INPUT} > ${RESULTS}/$@
230 endif
231 ifeq (${PLATFORM},Darwin)
232 test -s ${RESULTS}/$@ || ${OSX_BINDIR}/v2.1/bin/starch --bzip2 ${BED_INPUT} > ${RESULTS}/$@
233 endif
234
235 diff_random_2p1p0_bzip2_concurrent: random_2p1p0_bzip2.starch
236 @echo "[STARCH] testing difference between v2.1 bzip2-based starch file and random BED input using concurrent (v2.1) binary..."
237 ifeq (${PLATFORM},Linux)
238 ${LINUX_BINDIR}/v2.1/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
239 endif
240 ifeq (${PLATFORM},Darwin)
241 ${OSX_BINDIR}/v2.1/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
242 endif
243
244 diff_random_2p1p0_bzip2_current: random_2p1p0_bzip2.starch
245 @echo "[STARCH] testing difference between v2.1 bzip2-based starch file and random BED input using concurrent (v2.2) binary..."
246 ifeq (${PLATFORM},Linux)
247 ${LINUX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
248 endif
249 ifeq (${PLATFORM},Darwin)
250 ${OSX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
251 endif
252 @echo "[STARCH] no differences found!"
253
254 # ---------------------------------------------
255
256 random_2p1p0_gzip.starch: results_dir bed_input
257 @echo "[STARCH] creating v2.1 gzip-based starch file from random BED input..."
258 ifeq (${PLATFORM},Linux)
259 test -s ${RESULTS}/$@ || ${LINUX_BINDIR}/v2.1/bin/starch --gzip ${BED_INPUT} > ${RESULTS}/$@
260 endif
261 ifeq (${PLATFORM},Darwin)
262 test -s ${RESULTS}/$@ || ${OSX_BINDIR}/v2.1/bin/starch --gzip ${BED_INPUT} > ${RESULTS}/$@
263 endif
264
265 diff_random_2p1p0_gzip_concurrent: random_2p1p0_gzip.starch
266 @echo "[STARCH] testing difference between v2.1 gzip-based starch file and random BED input using concurrent (v2.1) binary..."
267 ifeq (${PLATFORM},Linux)
268 ${LINUX_BINDIR}/v2.1/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
269 endif
270 ifeq (${PLATFORM},Darwin)
271 ${OSX_BINDIR}/v2.1/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
272 endif
273
274 diff_random_2p1p0_gzip_current: random_2p1p0_gzip.starch
275 @echo "[STARCH] testing difference between v2.1 gzip-based starch file and random BED input using current (v2.2) binary..."
276 ifeq (${PLATFORM},Linux)
277 ${LINUX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
278 endif
279 ifeq (${PLATFORM},Darwin)
280 ${OSX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
281 endif
282 @echo "[STARCH] no differences found!"
283
284 # ---------------------------------------------
285
286 random_2p2p0_bzip2.starch: results_dir bed_input
287 @echo "[STARCH] creating v2.2 bzip2-based starch file from random BED input..."
288 ifeq (${PLATFORM},Linux)
289 test -s ${RESULTS}/$@ || ${LINUX_BINDIR}/v2.2/bin/starch --bzip2 ${BED_INPUT} > ${RESULTS}/$@
290 endif
291 ifeq (${PLATFORM},Darwin)
292 test -s ${RESULTS}/$@ || ${OSX_BINDIR}/v2.2/bin/starch --bzip2 ${BED_INPUT} > ${RESULTS}/$@
293 endif
294
295 diff_random_2p2p0_bzip2_current: random_2p2p0_bzip2.starch
296 @echo "[STARCH] testing difference between v2.2 bzip2-based starch file and random BED input using current (v2.2) binary..."
297 ifeq (${PLATFORM},Linux)
298 ${LINUX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
299 endif
300 ifeq (${PLATFORM},Darwin)
301 ${OSX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
302 endif
303 @echo "[STARCH] no differences found!"
304
305 # ---------------------------------------------
306
307 random_2p2p0_gzip.starch: results_dir bed_input
308 @echo "[STARCH] creating v2.2 gzip-based starch file from random BED input..."
309 ifeq (${PLATFORM},Linux)
310 test -s ${RESULTS}/$@ || ${LINUX_BINDIR}/v2.2/bin/starch --gzip ${BED_INPUT} > ${RESULTS}/$@
311 endif
312 ifeq (${PLATFORM},Darwin)
313 test -s ${RESULTS}/$@ || ${OSX_BINDIR}/v2.2/bin/starch --gzip ${BED_INPUT} > ${RESULTS}/$@
314 endif
315
316 diff_random_2p2p0_gzip_current: random_2p2p0_gzip.starch
317 @echo "[STARCH] testing difference between v2.2 gzip-based starch file and random BED input using current (v2.2) binary..."
318 ifeq (${PLATFORM},Linux)
319 ${LINUX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
320 endif
321 ifeq (${PLATFORM},Darwin)
322 ${OSX_BINDIR}/v2.2/bin/unstarch ${RESULTS}/$^ | diff --brief - ${BED_INPUT}
323 endif
324 @echo "[STARCH] no differences found!"
325
326 # ---------------------------------------------
327
328 clean:
329 @echo "[STARCH] cleaning up intermediate starch archives..."
330 @rm -rf ${RESULTS}
331 @echo "[STARCH] all clean!"