# plink-ng keeps PLINK 1.9 alive while PLINK 2.0 moves to .pgen

> plink-ng holds the source for PLINK 1.9 and PLINK 2.0, the successors to PLINK 1.07, with the 1.9 line now in bugfix-only mode and the 2.0 line under active development toward VCF and dosage workflows. The two binaries are installed side by side, and the PLINK 2 libraries ship as LGPL packages for C, Python and R.

**chrchang/plink-ng** — PLINK is a free, open-source whole genome association analysis toolset, designed to perform a range of basic, large-scale analyses in a computationally efficient manner.  This is a comprehensive update to it.

- Repository: https://github.com/chrchang/plink-ng
- Website: https://www.cog-genomics.org/plink/2.0/
- Stars: 529 · Forks: 155
- Language: C++
- License: not declared
- Published: 2026-10-22 · Updated: 2026-10-22 · Language: en
- Canonical page: https://hysenlabs.com/projects/chrchang-plink-ng

## Two generations of PLINK in one repository

plink-ng holds the source code for PLINK 1.9 and PLINK 2.0, the successors to Shaun Purcell's PLINK 1.07, described as a whole-genome association analysis toolset. The description is explicit that PLINK is a free, open-source toolset designed to perform a range of basic, large-scale analyses in a computationally efficient manner, and that this repository is a full update to it. The repository layout is three directories, 1.07/, 1.9/ and 2.0/, plus pgen_spec/ for the file format specification, a docker/ directory and .github/. The 1.07 directory is a historical artefact kept in the tree, and the two supported versions sit side by side in their own subdirectories with their own build systems, their own documentation and their own licences. The primary language is C++, the homepage is the PLINK 2.0 documentation site at cog-genomics.org, and the methods paper is the Second-generation PLINK paper in GigaScience from 2015, with a support forum on Google Groups for plink2-users.

## PLINK 1.9 is frozen, PLINK 2.0 is moving

The README's section on which version to use is the most useful paragraph in the file. PLINK 1.9, in the 1.9/ directory, can typically be used as a drop-in replacement for PLINK 1.07 that scales to much larger datasets. It works with the .bed/.bim/.fam fileset. It left beta with the 1.9.0 release in September 2026, a few rarely-used PLINK 1.07 commands are still absent, and active feature development for it ended in 2016, so it now receives only bugfixes. That is an unusual and useful piece of information: the 1.9 line is a maintenance branch with a stable file format, which is exactly what you want if you have a large cohort in .bed/.bim/.fam and no intention of moving. PLINK 2.0, in the 2.0/ directory, is designed to handle VCF files and dosage data and is under active development. Its native format is the .pgen/.pvar/.psam fileset, which stores dosages, phase and multiallelic variants, and it also reads and writes PLINK 1 filesets. Most features other than multiallelic-dosage support are now in place.

## Installing the binaries without building anything

Both versions are available from Homebrew on macOS and Linux, and the two formulae install different command names, which matters if you have scripts.

```bash
brew install plink1    # PLINK 1.9, installs `plink`
brew install plink-ng  # PLINK 2.0, installs `plink2` and `pgen_compress`
```

Bioconda packages both as well, and BioContainers builds Docker and Singularity images from those packages. The README notes that Homebrew and Bioconda track tagged releases, while the documentation pages have the latest builds for Linux, macOS and Windows. That distinction is worth understanding: the package managers give you a released version, which for the 2.0 line is currently a pre-release tag, and the documentation pages give you a newer build. The pgen_compress binary that comes with the PLINK 2.0 formula is not incidental, since it is the companion tool for the .pgen format.

## Building from source, which needs a real toolchain

PLINK 2.0 needs a C and C++ compiler, zlib and zstd, plus BLAS and LAPACK, with Accelerate on macOS and something like OpenBLAS on Linux.

```bash
cd 2.0/build_dynamic
make -j8
```

That produces plink2 and pgen_compress, and the Makefile header lists the build options, including AVX2, MKL and AOCL, static linking and no LAPACK. PLINK 1.9 builds with a similar make invocation, differing only in how zlib and BLAS are pointed at.

```bash
cd 1.9
make -j8 ZLIB=-lz                                          # macOS
make -j8 ZLIB=-lz BLASFLAGS="-llapack -lopenblas"         # Linux
```

On Debian and Ubuntu the README lists the dependencies as build-essential, libopenblas-dev, liblapack-dev, liblapacke-dev, zlib1g-dev and libzstd-dev. The BLAS and LAPACK requirement is the one that trips people up on a bare container, and it is there for the matrix operations in the statistical routines rather than for I/O.

## The libraries: pgenlib in three languages, all LGPL

The most interesting part of the repository for a programmer is the set of libraries rather than the binaries. In 2.0/include/ there are primarily two LGPL-licensed libraries, pgenlib, which reads and writes .pgen files, and plink2_text, a fast line reader with gzip and Zstd decompression. The .pgen format itself is specified in pgen_spec/pgen_spec.pdf. There are bindings in three languages. The C and C++ libraries are in 2.0/include/, the Python one is installed with pip install pgenlib and its source is in 2.0/Python, and the R one is installed with install.packages("pgenlibr") from CRAN with the source in 2.0/pgenlibr. The licence split matters and is easy to miss: the PLINK 1.9 and PLINK 2.0 tools themselves are GPLv3, while the libraries in 2.0/include/ are LGPLv3. So a commercial product can link the libraries under the LGPL terms while the command line tools remain copyleft.

## The test suite compares the two generations

The Tests directory holds a self-contained suite that compares plink2 against plink 1.9 and checks a number of round trips, and it needs plink, the 1.9 binary, on the PATH.

```bash
cd 2.0/Tests
./run_tests.sh ../build_dynamic
```

That design is a good signal about how the project is maintained. A cross-version differential test suite is how you keep a rewrite honest, because the 1.9 binary becomes the reference implementation and any behavioural drift shows up as a test failure rather than as a quietly different result in someone's GWAS. The continuous integration badges in the README reflect the same split, with separate workflows for the functional tests and for pgenlib. The recent release notes show what kind of work is happening: the beta 1.0 release on 2026-10-19 brought non-concatenating merge, --glm multinomial and --epistasis with --epistasis-boost and covariates, while the alpha 7.13 release from four days earlier fixed memory corruption in --me and --mendel, and alpha 7.12 fixed --geno-counts at chromosome X multiallelic variants and added an allele uniqueness check for multiallelic variants.

## Where plink-ng is the wrong choice

Three limits. The first is maturity. PLINK 2.0 is on a v2.0.0-b.1.0 beta tag and a series of alpha tags, and the release titles are descriptive of a work in progress, listing individual bugfixes for --me, --mendel, --geno-counts and multiallelic handling. If your pipeline needs a fixed, reproducible binary with a known behaviour, pinning a beta of a rewrite is a different risk from pinning a released 1.9. The second is that PLINK 1.9 is genuinely frozen. Active feature development ended in 2016 and it now receives only bugfixes, so a few rarely-used PLINK 1.07 commands are still absent, and if your workflow depends on one of those you have to check before migrating. The third is the licence choice for commercial users, and here the answer is different depending on what you want. If you only need the pgen reading and writing library, the LGPL terms in 2.0/include/ are workable. If you want to redistribute or ship the plink2 binary itself, you are dealing with GPLv3. The practical alternative for most teams is not another tool but the packaged binaries, since Homebrew, Bioconda and BioContainers already cover both versions, and the source repository only earns its place when you need an unreleased build, a platform the packages do not cover, or the libraries themselves.

## Conclusion

Adopt plink-ng if you need both generations of PLINK in one place, or if you want the pgen libraries under LGPL rather than the GPL tools. Skip it if all you need is a working PLINK binary, since Homebrew, Bioconda and BioContainers already package both releases. Before you pin a version, note that PLINK 2.0 is still on alpha and beta tags, and that PLINK 1.9 no longer has every PLINK 1.07 command.

## FAQ

### What is plink-ng?

It holds the source code for PLINK 1.9 and PLINK 2.0, the successors to Shaun Purcell's PLINK 1.07, a whole-genome association analysis toolset. The project is a comprehensive update to PLINK, written in C++, and the tools are GPLv3 while the libraries in 2.0/include/ are LGPLv3.

### Should I use PLINK 1.9 or PLINK 2.0?

PLINK 1.9 can typically be used as a drop-in replacement for PLINK 1.07 that scales to much larger datasets and works with the .bed/.bim/.fam fileset, but active feature development for it ended in 2016 and it now receives only bugfixes. PLINK 2.0 is designed for VCF files and dosage data, is under active development, and uses the .pgen/.pvar/.psam fileset.

### How do I install PLINK 2.0?

From Homebrew with `brew install plink-ng`, which installs plink2 and pgen_compress, or from Bioconda with `conda install -c conda-forge -c bioconda plink plink2`. BioContainers also builds Docker and Singularity images at quay.io/biocontainers/plink2 and quay.io/biocontainers/plink.

### Can I read .pgen files from Python or R?

Yes. The C and C++ libraries in 2.0/include/ are primarily pgenlib, which reads and writes .pgen files, and plink2_text, a fast line reader with gzip and Zstd decompression. Python bindings install with `pip install pgenlib` and R bindings with `install.packages("pgenlibr")` from CRAN.

## Sources

- [chrchang/plink-ng on GitHub](https://github.com/chrchang/plink-ng)
- [Issues](https://github.com/chrchang/plink-ng/issues)
- [Project website](https://www.cog-genomics.org/plink/2.0/)
- [README](https://github.com/chrchang/plink-ng/blob/master/README.md)
- [Releases](https://github.com/chrchang/plink-ng/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/chrchang-plink-ng
