1. System requirements

GLIMPSE is a set of C++ tools covering the full process of imputation from low-coverage BAM files to imputed genotypes. In order to compile, we require a modern Linux operating system and a version of GCC > 4.4. We recommend to use the latest available version for your system.

For example running the following instruction on Ubuntu 20.04 focal:

sudo apt install build-essential

will install the GNU g++ compiler version 9.2. To check the version of your g++ compiler, simply run:

g++ --version

2. Required libraries

GLIMPSE requires two libraries installed on the system:

  1. HTSlib version >= 1.7: A C library for reading/writing high-throughput sequencing data.
  2. BOOST version >= 1.65: A set of peer-reviewed portable C++ source libraries. GLIMPSE uses two specific BOOST libraries: iostreams and program_options.

2.1 Building HTSlib

Building HTSlib is straightforward and does not require root privileges. Please refer to the HTSlib documentation for complete details. Here we provide a basic script to install HTSlib v1.11:

wget https://github.com/samtools/htslib/releases/download/1.11/htslib-1.11.tar.bz2
tar -xf htslib-1.11.tar.bz2
mv htslib-1.11 htslib
cd htslib
autoheader; autoconf; ./configure; #optional
make

After this, you'll find the libhts.a inside your current directory and the include files inside subdirectory: ./include/

2.2 Building Boost

As GLIMPSE only requires few of the boost libraries, we'll build the smallest possible boost build, without requiring root privileges. Please refer to the Boost installation instructions for complete details. Here we provide a basic script to the minimal build of Boost v1.73.0 required to run GLIMPSE:

wget https://boostorg.jfrog.io/artifactory/main/release/1.73.0/source/boost_1_73_0.tar.bz2
tar --bzip2 -xf boost_1_73_0.tar.bz2
cd boost_1_73_0
./bootstrap.sh --with-libraries=iostreams,program_options --prefix=../boost #where ../boost is your custom boost installation prefix
./b2 install
cd ../boost #change this to the folder you used as --prefix for the bootstrap script

After this, you will also find a copy of the Boost headers in the include/ subdirectory of the installation prefix (our current directory). The Boost static libraries (libboost_iostreams.a and libboost_program_options.a) are found in the subfolder ./lib of your installation prefix.

In the case there are problems finding the correct boost paths or with the boost installation, you can find additional instructions here: here.

2.3 Additional libraries

Make sure that the following standard library flags can be used by g++ on your system:

You can do so by checking the outcome of the following commands:

locate -b '\libz.so'
locate -b '\libbz2.so'
locate -b '\liblzma.so'
locate -b '\libm.so'
locate -b '\libpthread.so'
locate -b '\libcurl.so'

3. Compiling GLIMPSE

Download the last version of the GLIMPSE code using:

git clone https://github.com/odelaneau/GLIMPSE.git

Navigate to the downloaded folder using cd GLIMPSE.

You'll find there a folder containing all the software packages are other utility folders:

Each software in the suite contains the same folder structure:

In order to compile a specific tool of the suite, for example GLIMPSE_phase, go in directory of the software (cd phase) and edit the specific makefile at lines 26-32 (desktop) so that the following variables are correctly set up (look at the paths already there for an example):

If installed at the system level, static libraries (*.a files) can be located with this command:

locate libboost_program_options.a libboost_iostreams.a libhts.a

Once all paths correctly set up, proceed with the compilation using make. The binary can be found in the bin/ folder and will have a name similar to GLIMPSE_phase. You will need to copy the modified makefile in each tool (folder) of the GLIMPSE toolsuite

3.1 Static binaries

In the case the installation is unsuccessful, static binaries (for Ubuntu x64 systems) of the latest release version are available in the static_bins folder. The binaries are just meant to make GLIMPSE available in systems where the dependencies are unavailable or difficult to install, but we strongly recommend to compile the working version and do not rely on static binaries, since binaries can suffer of a performance decrease.