Installation of htslib
Prequisites
dhtslib
relies on htslib
. htslib
relies on a handful of compression and web-access libraries: zlib, bzip2, lzma, curl, and ssl
. Technically htslib
can be built without some of these libraries, though to get all the benefits of dhtslib
we recommend installing all of them. For more information you can visit the htslib repository.
To intall htslib
dependencies:
libdeflate
can also be installed for faster (de)compression but is optional.
htslib build and install
You will then need to download htslib (latest release here). As of now we support versions >=1.10. To install htslib:
htslib is also linked as a submodule in the dhtslib repo and potentially could be used as it reflects the currently supported version (you must git clone recursively).
Troubleshooting
dub linking issues
By default htslib
is dynamically linked to dhtslib
via dub
.Sometimes it is necessary to specify the LIBRARY_PATH
or LD_LIBRARY_PATH
environment variables in order for dub
and the D compilers to find your htslib
installation. This could also apply if your htslib
isn't a standard install under /usr/local/lib
.
Statically linking to htslib
libhts.a
needs to be added to your project's source files. Remember to link to all dynamic libraries configured when htslib was built. This may include bz2, lzma, zlib, deflate, crypto, pthreads, curl. Finally, if statically linking, the -lhts
flag needs to be removed from compilation by selecting the dub configuration source-static
as the dub configuration type for dhtslib within your own project's dub configuration file:
Last updated