Skip to content
aalbrechtsen edited this page Sep 8, 2026 · 4 revisions

There has been some confusion about the versions of ANGSD.

  • Even versions are freezes from the last odd git version

  • Odd versions are git versions. Once there has been enough commits we will increment and make a release.

ANGSD requires htslib, which handles BAM/CRAM parsing. There are three ways to build, all equivalent apart from where htslib comes from.

Install from github

1. Using the htslib submodule (simplest)

git clone --recurse-submodules https://github.com/ANGSD/angsd.git
cd angsd
make

2. Using a local folder containing htslib

Use this if you want to control which htslib version you build against.

#download htslib
git clone --recurse-submodules https://github.com/samtools/htslib.git

#download angsd
git clone https://github.com/ANGSD/angsd.git

#install htslib
cd htslib
make

#install angsd
cd ../angsd
make HTSSRC=../htslib

3. Systemwide installation of htslib

git clone https://github.com/ANGSD/angsd.git
cd angsd
make HTSSRC=systemwide

The executable is then located in angsd/angsd, and the helper programs (realSFS, thetaStat, NGSadmix, msToGlf, ...) in angsd/misc/.

Release tarballs

You can also download a tarball containing both angsd and htslib:

wget http://popgen.dk/software/download/angsd/angsd0.940.tar.gz
tar xf angsd0.940.tar.gz
cd htslib;make;cd ..
cd angsd
make HTSSRC=../htslib
cd ..

Users on a mac can use curl instead of wget.

Earlier versions are here: http://popgen.dk/software/download/angsd/ and here: https://github.com/ANGSD/angsd/releases

Notes

  • htslib must be built before angsd. If you point HTSSRC at an htslib folder that has not been compiled, the angsd link step fails with cannot find .../libhts.a.
  • htslib is used for parsing single reads, which is what gives CRAM support. ANGSD still uses its own read pools.
  • If you are on a mac and the compilation complains about a missing cryptolib library, use make CRYPTOLIB="".
  • Build status for the current master is shown on the GitHub Actions page.

Clone this wiki locally