Introduction, downloads

D: 23 Sep 2023

Recent version history

What's new?

Coming next

[Jump to search box]

General usage

Getting started

Flag usage summaries

Column set descriptors

Citation instructions

Standard data input

PLINK 1 binary (.bed)

PLINK 2 binary (.pgen)

Autoconversion behavior

VCF/BCF (.vcf[.gz], .bcf)

Oxford genotype (.bgen)

Oxford haplotype (.haps)

PLINK 1 text (.ped, .tped)

PLINK 1 dosage

Sample ID conversion

Dosage import settings

Generate random

Unusual chromosome IDs

Allele frequencies



'Cluster' import

Reference genome (.fa)

Input filtering

Sample ID file

Variant ID file

Interval-BED file




SNPs only

Simple variant window

Multiple variant ranges

Deduplicate variants

Sample/variant thinning

Pheno./covar. condition


Category subset


Missing genotypes

Number of distinct alleles

Allele frequencies/counts


Imputation quality


Founder status

Main functions

Data management



















Basic statistics










Pairwise diffs



Linkage disequilibrium



Sample-distance matrices





Population stratification


PCA projection

Association analysis


--glm ERRCODE values



Report postprocessing


Linear scoring



Distributed computation

Command-line help


Flag/parameter reuse

System resource usage


.zst decompression

Pseudorandom numbers

Warnings as errors

.pgen validation


1000 Genomes phase 3


FASTA files

Errors and warnings

Output file list

Order of operations

Developer information

GitHub root

Python library

R library


Adding new functionality

Google groups


File formats

Quick index search

Linkage disequilibrium

All of the following calculations only consider founders. If your dataset has a shortage of them, PLINK 1.9 --make-founders may come in handy.

Since two-variant r2 only makes sense for biallelic variants, these collapse multiallelic variants down to most common allele vs. the rest.

Variant pruning

--indep-pairwise <window size>['kb'] [step size (variant ct)]
                 <unphased-hardcall-r^2 threshold>
--indep-pairphase <window size>['kb'] [step size (variant ct)]
                  <phased-hardcall-r^2 threshold>

--indep <window size>['kb'] [step size (variant ct)] <VIF threshold>

--indep-order <mode>

These commands produce a pruned subset of variants that are in approximate linkage equilibrium with each other, writing the IDs to (and the IDs of all excluded variants to plink2.prune.out). These files are valid input for --extract/--exclude in a future PLINK run; and, for backward compatibility, they do not affect the set of variants in the current run.

Since the only output of these commands is a pair of variant-ID lists, they now error out when variant IDs are not unique.

--indep-pairwise is the simplest approach, which only considers correlations between unphased-hardcall allele counts. It takes three parameters: a required window size in variant count or kilobase (if the 'kb' modifier is present) units, an optional variant count to shift the window at the end of each step (default 1, and now required to be 1 when a kilobase window is used), and a required r2 threshold. At each step, pairs of variants in the current window with squared correlation greater than the threshold are noted, and variants are greedily pruned from the window until no such pairs remain.

--indep-pairphase is similar, except that it requires all genotypes to be phased (this is a change from PLINK 1.9), and looks at haplotype correlations.

Additional notes:

  • --indep-order controls the order in which variant pairs are checked within each window.
    • '1': Imitate PLINK 1.x.
    • '2': Scan backwards within each window (default since 16 May 2023). This is usually faster.
  • This operation can be slow, particularly when "--indep-order 1" is specified. You'll usually want to perform e.g. MAF-based filtering beforehand.
  • On human data, some reasonable parameter settings are, in order of increasing strictness:
        "--indep-pairwise 100kb 0.8"
        "--indep-pairwise 200kb 0.5"
        "--indep-pairwise 500kb 0.2"

--indep-preferred <filename>

By default, when given a choice, the variant-pruning commands preferentially keep variants with higher nonmajor allele frequencies. However, if you provide a list of variant IDs to --indep-preferred, all variants in that list are prioritized over all variants outside it. (Allele frequencies will still be used for tiebreaking.)

LD statistic reports

--ld <variant ID> <variant ID> ['dosage'] ['hwe-midp']

To inspect the relation between a single pair of variants in more detail, you can use the --ld flag, which displays observed and expected (based on MAFs) frequencies of each haplotype, as well as haplotype-based r2 and D'.

  • By default, only hardcalls are considered in this computation; add the 'dosage' modifier to change this.
  • When unphased calls are present, and there are multiple biologically possible solutions to the haplotype frequency cubic equation, all are displayed (instead of just the maximum likelihood solution identified by --r/--r2), along with HWE exact test statistics.


PLINK 2 cannot estimate LD effectively when very few founders are present, so it normally errors out when there are less than 50. If you can't solve the problem with PLINK 1.9 --make-founders, you can use --bad-ld as a last resort to force PLINK 2 to proceed.

Sample-distance and similarity matrices >>