Skip to content

Commit 7e8dbcc

Browse files
authored
Merge pull request #10 from pachterlab/devel
Devel
2 parents 6bab720 + 0398bba commit 7e8dbcc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+36916
-63
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ ext/zlib-ng/src/
77
ext/zlib-ng/build/
88
ext/zlib-ng/tmp/
99

10+
ext/htslib/tmp/
11+
ext/htslib/src/
12+
1013
*.pyc
1114

1215
CMakeCache.txt
@@ -19,3 +22,4 @@ CTestTestfile.cmake
1922
debug/
2023
release/
2124
.snakemake
25+
src/.Rhistory

CMakeLists.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,15 @@ ELSE(LINK MATCHES shared)
2525
message("shared build")
2626
ENDIF(LINK MATCHES static)
2727

28+
set(USE_HTSLIB "ON")
29+
if (NO_HTSLIB)
30+
set(USE_HTSLIB OFF)
31+
endif()
32+
2833
if(EMSCRIPTEN_BUILD)
2934
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s USE_ZLIB=1")
3035
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s USE_ZLIB=1")
36+
set(USE_HTSLIB OFF)
3137
endif()
3238

3339
add_subdirectory(src)
@@ -55,3 +61,21 @@ if (ZLIBNG)
5561
)
5662
endif(ZLIBNG)
5763

64+
if (USE_HTSLIB)
65+
message("using htslib")
66+
ExternalProject_Add(htslib
67+
PREFIX ${PROJECT_SOURCE_DIR}/ext/htslib
68+
SOURCE_DIR ${PROJECT_SOURCE_DIR}/ext/htslib
69+
BUILD_IN_SOURCE 1
70+
CONFIGURE_COMMAND ""
71+
BUILD_COMMAND make lib-static
72+
INSTALL_COMMAND ""
73+
)
74+
else()
75+
set(NO_HTSLIB "ON")
76+
add_compile_definitions("NO_HTSLIB=ON")
77+
message("not using htslib")
78+
endif()
79+
80+
81+

ext/htslib/.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
*.o
2+
*.pico
3+
/version.h
4+
5+
lib*.a
6+
lib*.dylib
7+
lib*.so
8+
lib*.so.*
9+
10+
/bgzip
11+
/tabix
12+
/test/fieldarith
13+
/test/hfile
14+
/test/sam
15+
/test/test-vcf-api
16+
/test/test-vcf-sweep
17+
/test/test_view
18+
/test/*.tmp
19+
/test/*.tmp.*
20+
21+
/TAGS

ext/htslib/.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Control file for continuous integration testing at http://travis-ci.org/
2+
3+
language: c
4+
compiler:
5+
- clang
6+
- gcc
7+
8+
script: make -e && make test

ext/htslib/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
HTSlib is an implementation of a unified C library for accessing common file
2+
formats, such as [SAM, CRAM and VCF][1], used for high-throughput sequencing
3+
data, and is the core library used by [samtools][2] and [bcftools][3].
4+
HTSlib only depends on [zlib][4].
5+
It is known to be compatible with gcc, g++ and clang.
6+
7+
HTSlib implements a generalized BAM index, with file extension `.csi`
8+
(coordinate-sorted index). The HTSlib file reader first looks for the new index
9+
and then for the old if the new index is absent.
10+
11+
This project also includes the popular tabix indexer, which indexes both `.tbi`
12+
and `.csi` formats, and the bgzip compression utility.
13+
14+
[1]: http://samtools.github.io/hts-specs/
15+
[2]: http://samtools.github.io/bcftools/
16+
[3]: http://github.com/samtools/samtools
17+
[4]: http://zlib.net/

0 commit comments

Comments
 (0)