Introduction, downloads

D: 12 Oct 2026

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)

PROVISIONAL_REF?

PLINK 2 binary (.pgen)

Autoconversion behavior

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

Oxford genotype (.bgen)

Oxford haplotype (.haps)

EIGENSOFT binary

BIMBAM Mean Genotype

23andMe text

PLINK 1 text (.ped, .tped)

PLINK 1 dosage

Sample ID conversion

Dosage import settings

Generate random

Unusual chromosome IDs

Recombination map

Allele frequencies

Phenotypes

Covariates

'Cluster' import

Variant sets

Reference genome (.fa)

Input filtering

Sample ID file

Variant ID file

Interval-BED file

Set membership

Attribute-based

--extract-col-cond

QUAL, FILTER, INFO

Chromosomes

SNPs only

Palindromic SNPs

Simple variant window

Multiple variant ranges

Deduplicate variants

Sample/variant thinning

Pheno./covar. condition

Missingness

Category subset

--keep-col-match

Missing genotypes

Same-indiv selection

Number of distinct alleles

Allele frequencies/counts

Hardy-Weinberg

Imputation quality

Mendel errors

Sex

Founder status

Relationships

Main functions

Data management

--make-[b]pgen/--make-bed

--export

--output-chr

--zero-cluster

--split-par/--merge-par

--set-me-missing

--set-all-var-ids

--recover-var-ids

--update-map...

--update-ids...

--flip

--flip-scan

--ref-allele

--ref-from-fa

--normalize

--indiv-sort

--write-covar

--variance-standardize

--quantile-normalize

--split-cat-pheno

--pheno-svd

--pmerge[-list]

--write-samples

--info-to-cols

Basic statistics

--freq

--geno-counts

--sample-counts

--missing

--genotyping-rate

--test-mishap

--hardy

--mendel

--het

--check-sex/--impute-sex

--fst

--pgen-info

Pairwise diffs

--pgen-diff

--sample-diff

Linkage disequilibrium

--indep...

--r[2]-[un]phased

--ld

--ld-score

--show-tags

--blocks

Sample-distance matrices

Identity-by-state/Hamming

  (--distance...)

Relationship/covariance

  (--make-grm-bin...)

--make-king...

--king-cutoff

Runs of homozygosity

Population stratification

--pca

PCA projection

--neighbour

Association analysis

--glm

--glm ERRCODE values

--gwas-ssf

--test-missing

--adjust-file

Monte Carlo permutation

Family-based association

--tucc

Report postprocessing

--clump

--meta-analysis

Epistasis

--epistasis-boost

--epistasis

--twolocus

Linear scoring

--score[-list]

--variant-score

Distributed computation

Command-line help

Bundled utilities

ldsc

mtag

vcf_subset

Miscellaneous

Flag/parameter reuse

System resource usage

--loop-cats

.zst decompression

Pseudorandom numbers

Warnings as errors

.pgen validation

Resources

1000 Genomes phase 3

HGDP-CEPH

FASTA files

Errors and warnings

Output file list

Order of operations

Developer information

GitHub root

Python library

R library

Compilation

Adding new functionality

Discussion forums

Credits

File formats

Tutorials

Setup

Rules of Thumb

Data Exploration 1 — HWE, Allele Frequency Spectrum

Data Exploration 2 — Genomic Structure

Linkage

Relationship Matrix

Genome-Wide Assocation Analyses (GWAS)

Regressions

Post-Hoc

Formatting Files

bcftools

Variant IDs

Reference Alleles

Format for R

Shortcuts

Quick index search

Epistasis tests

Fast scan, case/control phenotype

--epistasis-boost ['zs'] ['ref-based'] [{no-firth | firth-fallback}]
                  [{set-by-set | set-by-all}] ['log10']
                  ['cols='<col set descriptor]

--epi1 <p-value max for inclusion in main report>
--epi2 <p-value max to be counted by N_SIG>

--epistasis-boost scans every pair of autosomal variants for an interaction, using the two-stage test of Wan X et al. (2010) BOOST: A Fast Approach to Detecting Gene-Gene Interactions in Genome-wide Case-Control Studies. The report is written to plink2.epi.cc, with a per-variant summary alongside it in .epi.cc.summary.

  • The current implementation errors out if more than one case/control phenotype is defined. This limitation may be removed later.
  • This is a genotypic test, which trades off a bit of power in the linear-interaction case for more power to detect other types of interactions. Contact us if you prefer the basic 'allelic' form of this test.
  • --epi1 adjusts the screening p-value for inclusion of pairs in the main report; if not specified, it defaults to 5e-6. (With small datasets, "--epi1 1" makes sense; but it may fill up your hard drive for little reason when used on large ones.)
  • --epi2 adjusts the p-value threshold (default 0.01) for qualification as a "significant epistatic test result" counted in the .cc.summary report's third column. --epi2 applies to the screening p-value unless its argument is no larger than the --epi1 argument.
  • An empty genotype row or column costs degree(s) of freedom instead of dropping the pair, so the report has a DF column.
  • By default, major allele counts are used for multiallelic variants; 'ref-based' specifies REF allele counts instead.
  • The 'log10' modifier causes p-values to be reported in -log10(p) form.
  • With --covar, the pairs that clear the --epi1 threshold are refit by logistic and/or Firth regression (default mode 'firth-fallback') on genotype dummies for both variants, their interaction, and the covariates. STAT/DF/P then come from that fit. BEST_CHISQ and N_SIG stay unadjusted, since they cover pairs that were never refit. A sample missing a covariate is left out of the whole scan, and a pir whose fit does not converge is left out of the report.
  • Computational cost is quadratic in the variant count, so it is meant for a filtered set rather than a whole genome. It can be subdivided by --parallel, and the resulting main reports concatenate in order.
  • With --set/--make-set, 'set-by-set' scans the pairs inside one set, or every pair across two, and 'set-by-all' scans one set against every variant. Both drop a variant's pair with itself.
Linear/logistic regression-based test

--epistasis ['zs'] ['ref-based'] ['log10'] ['cols='<col set descriptor>]

--epistasis scans every pair of autosomal variants for an interaction with quantitative phenotype(s), by least-squares regression of the phenotype(s) on the two genotypes, their product, and any --covar covariates. Potentially significant interactions are reported to plink2.epi.qt; .epi.qt.summary files provide per-variant summaries.

  • The current implementation is limited to 1 phenotype; this will be addressed soon.
  • Logistic/Firth regression for case/control phenotypes will be implemented later.
  • --epi1 and --epi2 behave as they do with --epistasis-boost, except that the --epi1 default value is 0.0001.
  • By default, major allele counts are used for multiallelic variants; 'ref-based' specifies REF allele counts instead.
  • The 'log10' modifier causes p-values to be reported in -log10(p) form.
  • PLINK 1.07 and 1.9 have no covariate support here, and report the squared t-statistic as a 1-df chi-square with a normal p-value; this reports the t-statistic itself, with the matching t p-value.
  • Samples missing either genotype, the phenotype, or any covariate are left out of that pair's regression.

If these functions are still insufficient for your epistasis scanning needs, and you are sure you want more brute force rather than a different kind of analysis, we recommend trying the GPU-based GBOOST tool.

Single interaction

--twolocus <variant ID> <variant ID> [binary/categorical phenotype name]

--twolocus writes a joint genotype count report for a pair of variants, with one row per (group, genotype, genotype) cell, to plink2.genopairs.

  • Without a phenotype name, the report covers all samples in one ALL group.
  • With a name, one table per category follows the ALL table: CASE and CONTROL for a binary phenotype, one per observed category otherwise. Samples with no value for that phenotype are counted in ALL only.
  • Multiallelic variants get one row per unordered allele pair, so ALT1/ALT1 and ALT1/ALT2 are separate cells rather than being collapsed together.

Linear scoring >>