System Requirements
===================

BCFtools and HTSlib depend on the zlib library <http://zlib.net>, the bzip2
library <http://bzip.org/> and liblzma <http://tukaani.org/xz/>.  Building
them requires development files to be installed on the build machine;
note that some Linux distributions package these separately from the library
itself (see below).

The bzip2 and liblzma dependencies can be removed if full CRAM support
is not needed - see HTSlib's INSTALL file for details.

Packages for dpkg-based Linux distributions (Debian / Ubuntu) are:

  zlib1g-dev
  libbz2-dev
  liblzma-dev

Packages for rpm or yum-based Linux distributions (RedHat / Fedora / CentOS)
are:

  zlib-devel
  bzip2-devel
  xz-devel

Compilation
===========

'cd' to the bcftools-1.x directory containing the package's source and type
'make' to compile BCFtools.

This BCFtools release contains a copy of HTSlib which will be used to build
BCFtools.  If you already have a system-installed HTSlib or another HTSlib
that you would prefer to build against, you can arrange this by overriding
$(HTSDIR) by typing 'make HTSDIR=/path/to/htslib-source' -- see the makefile
for details.


Optional Compilation with GSL
=============================

The 'polysomy' command depends on the GNU Scientific Library (GSL) and is not
enabled by default. In order to compile it, type 'make clean && make USE_GPL=1'.

Note that GSL is distributed under a GPL license, so when USE_GPL=1 is used to
compile bcftools, the resulting program must only be distributed under terms
compatible with that license. 

In the default compilation mode the program is dual licensed and you may
choose to be licensed under the terms of the MIT/Expat license or the
GNU General Public License (GPL).


Installation
============

Type 'make install' to install the bcftools executable and associated scripts
and a manual page to /usr/local.

Type 'make prefix=/path/to/dir install' to install everything under your
choice of installation directory.  The install target also understands
DESTDIR and the other usual installation directory variables.

The bgzip and tabix utilities are provided by HTSlib.  If you have not also
installed HTSlib separately, you may wish to install these utilities by hand
by copying bcftools-1.x/htslib-1.x/{bgzip,tabix} to the same bin directory
to which you have installed bcftools et al.
