@@ -72,6 +72,7 @@ BUILT_TEST_PROGRAMS = \
72
72
test/hfile \
73
73
test/sam \
74
74
test/test_bgzf \
75
+ test/test-ref \
75
76
test/test-regidx \
76
77
test/test_view \
77
78
test/test-vcf-api \
@@ -154,6 +155,7 @@ LIBHTS_OBJS = \
154
155
multipart.o \
155
156
probaln.o \
156
157
realn.o \
158
+ ref.o \
157
159
regidx.o \
158
160
sam.o \
159
161
synced_bcf_reader.o \
@@ -326,13 +328,14 @@ plugin.o plugin.pico: plugin.c config.h $(hts_internal_h) $(htslib_kstring_h)
326
328
probaln.o probaln.pico : probaln.c config.h $(htslib_hts_h )
327
329
realn.o realn.pico : realn.c config.h $(htslib_hts_h ) $(htslib_sam_h )
328
330
textutils.o textutils.pico : textutils.c config.h $(htslib_hfile_h ) $(htslib_kstring_h ) $(hts_internal_h )
331
+ ref.o ref.pico : ref.c config.h $(htslib_kstring_h ) $(htslib_bgzf_h ) $(cram_h ) $(cram_io_h ) $(cram_open_trace_file_h ) $(htslib_hfile_h )
329
332
330
333
cram/cram_codecs.o cram/cram_codecs.pico : cram/cram_codecs.c config.h $(cram_h )
331
334
cram/cram_decode.o cram/cram_decode.pico : cram/cram_decode.c config.h $(cram_h ) $(cram_os_h ) $(htslib_hts_h )
332
335
cram/cram_encode.o cram/cram_encode.pico : cram/cram_encode.c config.h $(cram_h ) $(cram_os_h ) $(htslib_hts_h ) $(htslib_hts_endian_h )
333
336
cram/cram_external.o cram/cram_external.pico : cram/cram_external.c config.h $(htslib_hfile_h ) $(cram_h )
334
337
cram/cram_index.o cram/cram_index.pico : cram/cram_index.c config.h $(htslib_bgzf_h ) $(htslib_hfile_h ) $(hts_internal_h ) $(cram_h ) $(cram_os_h )
335
- cram/cram_io.o cram/cram_io.pico : cram/cram_io.c config.h $(cram_h ) $(cram_os_h ) $(htslib_hts_h ) $(cram_open_trace_file_h ) cram/rANS_static.h $(htslib_hfile_h ) $(htslib_bgzf_h ) $(htslib_faidx_h ) $(hts_internal_h )
338
+ cram/cram_io.o cram/cram_io.pico : cram/cram_io.c config.h $(cram_h ) $(cram_os_h ) $(htslib_hts_h ) $(htslib_ref_h ) $( cram_open_trace_file_h ) cram/rANS_static.h $(htslib_hfile_h ) $(htslib_bgzf_h ) $(htslib_faidx_h ) $(hts_internal_h )
336
339
cram/cram_samtools.o cram/cram_samtools.pico : cram/cram_samtools.c config.h $(cram_h ) $(htslib_sam_h )
337
340
cram/cram_stats.o cram/cram_stats.pico : cram/cram_stats.c config.h $(cram_h ) $(cram_os_h )
338
341
cram/files.o cram/files.pico : cram/files.c config.h $(cram_misc_h )
@@ -364,7 +367,7 @@ tabix.o: tabix.c config.h $(htslib_tbx_h) $(htslib_sam_h) $(htslib_vcf_h) $(htsl
364
367
#
365
368
# If using MSYS, avoid poor shell expansion via:
366
369
# MSYS2_ARG_CONV_EXCL="*" make check
367
- check test : $(BUILT_PROGRAMS ) $(BUILT_TEST_PROGRAMS )
370
+ check test : $(BUILT_PROGRAMS ) $(BUILT_TEST_PROGRAMS ) test_ebi_fetch
368
371
test/hts_endian
369
372
test/fieldarith test/fieldarith.sam
370
373
test/hfile
@@ -374,6 +377,18 @@ check test: $(BUILT_PROGRAMS) $(BUILT_TEST_PROGRAMS)
374
377
test/test-regidx
375
378
cd test && REF_PATH=: ./test.pl $$ {TEST_OPTS:-}
376
379
380
+ test_ebi_fetch :
381
+ export REF_CACHE=` mktemp -d` && \
382
+ test/test_view -t test/xx.fa -S -C test/xx#rg.sam > test/xx#rg.tmp.cram && \
383
+ test/test_view -D test/xx#rg.tmp.cram > /dev/null && \
384
+ test/test_view -D test/xx#rg.tmp.cram > /dev/null && \
385
+ rm -rf $$ REF_CACHE
386
+ export REF_CACHE=` mktemp -d` && \
387
+ test/test-ref && \
388
+ test/test-ref && \
389
+ rm -rf $$ REF_CACHE
390
+
391
+
377
392
test/hts_endian : test/hts_endian.o
378
393
$(CC ) $(LDFLAGS ) -o $@ test/hts_endian.o $(LIBS )
379
394
@@ -389,6 +404,9 @@ test/sam: test/sam.o libhts.a
389
404
test/test_bgzf : test/test_bgzf.o libhts.a
390
405
$(CC ) $(LDFLAGS ) -o $@ test/test_bgzf.o libhts.a -lz $(LIBS ) -lpthread
391
406
407
+ test/test-ref : test/test-ref.o libhts.a
408
+ $(CC ) $(LDFLAGS ) -o $@ test/test-ref.o libhts.a $(LIBS ) -lpthread
409
+
392
410
test/test-regidx : test/test-regidx.o libhts.a
393
411
$(CC ) $(LDFLAGS ) -o $@ test/test-regidx.o libhts.a $(LIBS ) -lpthread
394
412
@@ -412,6 +430,7 @@ test/fieldarith.o: test/fieldarith.c config.h $(htslib_sam_h)
412
430
test/hfile.o : test/hfile.c config.h $(htslib_hfile_h ) $(htslib_hts_defs_h )
413
431
test/sam.o : test/sam.c config.h $(htslib_hts_defs_h ) $(htslib_sam_h ) $(htslib_faidx_h ) $(htslib_kstring_h )
414
432
test/test_bgzf.o : test/test_bgzf.c $(htslib_bgzf_h ) $(htslib_hfile_h )
433
+ test/test-ref.o : test/test-ref.c $(htslib_bgzf_h )
415
434
test/test-regidx.o : test/test-regidx.c config.h $(htslib_regidx_h ) $(hts_internal_h )
416
435
test/test_view.o : test/test_view.c config.h $(cram_h ) $(htslib_sam_h )
417
436
test/test-vcf-api.o : test/test-vcf-api.c config.h $(htslib_hts_h ) $(htslib_vcf_h ) $(htslib_kstring_h ) $(htslib_kseq_h )
0 commit comments