HTSlib

Installing HTSlib

Standard installation

Probably, the easiest way to install htslib is through your package manager. But it can be installed from sources; have a look at the HTSlib webpage.

Spack

Another nice and simple possibility is to use Spack, particularly if you are going to work on a cluster where using its package manager is cumbersome, or even impossible. In this case the installation goes as follows.

  1. (Optional) Choosing the compiler. HTSlib will be compiled from source code by Spack. You might need to choose an up-to-date compiler (clusters tend to have very stable, ie. old, default compilers). See Using Spack for details.

  2. Installing HTSlib itself. With the default compiler it would be:

    $ spack install htslib
    

    or if we want to install it with a specific compiler, say gcc-11.3:

    $ spack install htslib%gcc@11.3
    
  3. Using HTSlib. PacBio Data Processing depends on HTSlib at runtime. It means that after a successfull installation, the created module must be loaded whenever it is needed:

    $ module load htslib-1.9-gcc-11.3.0-gcc-8.2.0-qynjstf
    

    Warning

    Remember to add that line at the beginning of the slurm batch scripts used to submit any executable from PacBio Data Processing.