Introduction, downloads

D: 22 Dec 2024

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)

PLINK 1 text (.ped, .tped)

PLINK 1 dosage

Sample ID conversion

Dosage import settings

Generate random

Unusual chromosome IDs

Allele frequencies

Phenotypes

Covariates

'Cluster' import

Reference genome (.fa)

Input filtering

Sample ID file

Variant ID file

Interval-BED file

--extract-col-cond

QUAL, FILTER, INFO

Chromosomes

SNPs only

Simple variant window

Multiple variant ranges

Deduplicate variants

Sample/variant thinning

Pheno./covar. condition

Missingness

Category subset

--keep-col-match

Missing genotypes

Number of distinct alleles

Allele frequencies/counts

Hardy-Weinberg

Imputation quality

Sex

Founder status

Main functions

Data management

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

--export

--output-chr

--split-par/--merge-par

--set-all-var-ids

--recover-var-ids

--update-map...

--update-ids...

--ref-allele

--ref-from-fa

--normalize

--indiv-sort

--write-covar

--variance-standardize

--quantile-normalize

--split-cat-pheno

--pheno-svd

--pmerge[-list]

--write-samples

Basic statistics

--freq

--geno-counts

--sample-counts

--missing

--genotyping-rate

--hardy

--het

--check-sex/--impute-sex

--fst

--pgen-info

Pairwise diffs

--pgen-diff

--sample-diff

Linkage disequilibrium

--indep...

--r[2]-[un]phased

--ld

Sample-distance matrices

Relationship/covariance

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

--make-king...

--king-cutoff

Population stratification

--pca

PCA projection

Association analysis

--glm

--glm ERRCODE values

--gwas-ssf

--adjust-file

Report postprocessing

--clump

Linear scoring

--score[-list]

--variant-score

Distributed computation

Command-line help

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

Format for R-like platforms

About

Plink 2 has a general set of tools for outputting GWAS data into a tabular format. These may be more suitable for exploration and analyses in non-genomic specific platforms like R.

Here is an example where we export the variants in tabular form, with major axis (rows) as sample IDs.

Plink 2:

time plink2 \ --pfile 'vzs' ./data/raw/all_hg38 \ --export A \ --thin-count 10 --seed 111 --threads 1 --memory 8000 require \ --out ./data/export/all_hg38_thin10_exportA --export A
The command call for exporting into a tabular form. Data is written with counts per variant to a human readable file *.raw file. Using the flag A allele dosage is written with samples as rows (sample-major) and column-wise haploid genotype dosages on a 0-2 scale. By default, REF alleles are counted (this is a change from PLINK 1.x); this can be adjusted with --export-allele. --export-allele's input file should have variant IDs in the first column and allele IDs in the second. If you need the ALT alleles to be named in the header line, add the 'include-alt' modifier.

Variations of this command include Av and AD flags. Av results in variant IDs as rows (variant-major). Unlike A exported sample-major files, Av files can be imported back into Plink 2 using --import_dosage. AD results in both additive counts and a heterozygous boolean field (0/1) for dominance-deviation models.

See --export for more information on these commands.

Tutorial Shortcuts >>