Skip to content

Latest commit

 

History

4,736 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

plink-ng

Functional tests pgenlib tests License Paper Forum

Homebrew plink1 Homebrew plink-ng Bioconda plink Bioconda plink2 PyPI pgenlib CRAN pgenlibr

Source code for PLINK 1.9 and PLINK 2.0, the successors to Shaun Purcell's PLINK 1.07 (https://zzz.bwh.harvard.edu/plink/), a whole-genome association analysis toolset.

Which version?

PLINK 1.9 (1.9/) 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's technically still a beta version because there are a few rarely-used but possibly-worthwhile PLINK 1.07 commands that are still absent, but active feature development for it ended in 2016.

PLINK 2.0 (2.0/) 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; it also reads and writes PLINK 1 filesets. Most basic features other than non-concatenating merge are now in place. See 2.0/README.md for more details.

Installing

Both versions are available from Homebrew (macOS and Linux):

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 (conda install -c conda-forge -c bioconda plink plink2), and BioContainers builds Docker/Singularity images from those packages (quay.io/biocontainers/plink2, quay.io/biocontainers/plink).

Homebrew and Bioconda track tagged releases. The documentation pages above have the latest builds for Linux, macOS and Windows.

Building from source

PLINK 2.0 needs a C/C++ compiler, zlib and zstd, plus BLAS/LAPACK (Accelerate on macOS; e.g. OpenBLAS on Linux):

cd 2.0/build_dynamic
make -j8

This builds plink2 and pgen_compress. The Makefile header lists the build options (AVX2, MKL/AOCL, static linking, no LAPACK, ...).

PLINK 1.9:

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

On Debian/Ubuntu, the dependencies are build-essential libopenblas-dev liblapack-dev liblapacke-dev zlib1g-dev libzstd-dev.

Libraries

  • C/C++ (2.0/include/): two LGPL-licensed libraries, pgenlib (reads and writes .pgen files) and plink2_text (fast line reader with gzip/Zstd decompression). The .pgen format is specified in pgen_spec/pgen_spec.pdf.
  • Python: pip install pgenlib (2.0/Python).
  • R: install.packages("pgenlibr") (CRAN, source in 2.0/pgenlibr).

Tests

2.0/Tests holds a self-contained suite that compares plink2 against plink 1.9 and checks a number of round trips. It needs plink (1.9) on the PATH:

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

Repository layout

Directory Contents
1.9/ PLINK 1.9
2.0/ PLINK 2.0, with include/ (pgenlib), Python/, pgenlibr/, utils/ and Tests/
pgen_spec/ .pgen format specification

License

PLINK 1.9 and PLINK 2.0 are GPLv3 (see 1.9/LICENSE and 2.0/COPYING). The libraries in 2.0/include/ are LGPLv3 (2.0/COPYING.LESSER).

About

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.

Resources

Stars

522 stars

Watchers

24 watching

Forks

Releases

Packages

Used by

Contributors

Languages