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

Runs of homozygosity

--homozyg ['zs'] ['subtract-1-from-lengths'] ['cols='<column set descriptor>]
          ['pheno='<pheno name>]

--homozyg-maf <min nonmaj AF>
  (alias: --homozyg-min-af)

--homozyg-snp <min SNP count>
--homozyg-kb <min length>
--homozyg-density <max inverse density (kb/SNP)>
--homozyg-gap <max internal gap kb length>
--homozyg-het <max hets>
--homozyg-window-snp <scanning window size>
--homozyg-window-het <max hets in scanning window hit>
--homozyg-window-missing <max missing calls in scanning window hit>
--homozyg-window-threshold <min scanning window hit rate>

--homozyg causes a set of run-of-homozygosity reports to be generated using PLINK 1.07's scanning algorithm. See the original documentation for more details.

  • This analysis is most informative on a LD-pruned variant set: linkage disequilibrium extends runs that are not evidence of autozygosity. Use e.g. --indep-pairwise first.
  • Relatedly, rare variants are homozygous in nearly everyone and pad out runs the same way. The default --homozyg-... parameter values make sense for human data filtered to minimum MAF ~0.05. So, as a sanity check, --homozyg now errors out when a MAF<0.05 variant is still present and --homozyg-maf, which applies a MAF filter specific to --homozyg, was not specified. (But if you're intentionally including rarer variants in your analysis, it's fine to specify "--homozyg-maf 0".)
  • For phenotype-stratified counts in the .hom.summary file, specify "pheno=<pheno name>" on a binary or categorical phenotype.
  • By default, segment bp lengths are calculated as (<end bp position> - <start bp position> + 1). This is a minor change from PLINK 1.07, which does not add 1 at the end. For testing purposes, you can use the 'subtract-1-from-lengths' modifier to apply the old formula.
  • By default, only runs of homozygosity containing at least 100 SNPs, and of total length ≥ 1000 kilobases, are noted. You can change these minimums with --homozyg-snp and --homozyg-kb, respectively.
  • By default, a ROH must have at least one SNP per 50 kb on average; change this bound with --homozyg-density.
  • By default, if two consecutive SNPs are more than 1000 kb apart, they cannot be in the same ROH; change this bound with --homozyg-gap.
  • By default, a ROH can contain an unlimited number of heterozygous calls; you can impose a limit with --homozyg-het. (This flag was silently ignored by PLINK 1.07.)
  • By default, the scanning window contains 50 SNPs; change this with --homozyg-window-snp.
  • By default, a scanning window hit can contain at most 1 heterozygous call and 5 missing calls; change these limits with --homozyg-window-het and --homozyg-window-missing, respectively.
  • By default, for a SNP to be eligible for inclusion in a ROH, the hit rate of all scanning windows containing the SNP must be at least 0.05; change this threshold with --homozyg-window-threshold.
  • You may also want to try 'bcftools roh', which uses a HMM-based detection method. (We'll implement a basic port of that command if there is sufficient interest.)

Population stratification >>