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
Tutorial Shortcuts
About
These are shortcuts for generating the tutorial files used across tutorials. Some of these require generated files from prior tutorials. The reused files from tutorials are listed under their tutorial subheadings.
Data Exploration 2A: Linkage
Reused files with prefix: ./data/processed/all_hg38_qcd
time plink2 \
--pfile 'vzs' ./data/raw/all_hg38 \
--make-pgen \
--autosome \
--snps-only \
--hwe 0.05 keep-fewhet \
--maf 0.05 \
--set-all-var-ids @:#\$r,\$a \
--out ./data/processed/all_hg38_qcd
Reused files with prefix: ./data/processed/all_hg38_qcd_LE1
Requires: (pfiles) ./data/processed/all_hg38_qcd (above)
1.
time plink2 \
--pfile ./data/processed/all_hg38_qcd \
--indep-pairphase 100 0.8 \
--out ./results/qc/qc3/all_hg38_qcd
2.
time plink2 \
--pfile ./data/processed/all_hg38_qcd \
--make-pgen \
--extract ./results/qc/qc3/all_hg38_qcd.prune.in \
--out ./data/processed/all_hg38_qcd_LE1
Data Exploration 2B: Relationship Matrix
Reused files with prefix: ./data/processed/all_hg38_qcd_LE1_pca
Requires: (pfiles) ./data/processed/all_hg38_qcd_LE1
time plink2 \
--pfile ./data/processed/all_hg38_qcd_LE1 \
--freq counts \
--keep-founders \
--pca biallelic-var-wts \
--out ./results/qc/qc3/all_hg38_qcd_LE1_pca
GWAS 1: Regressions
Reused files with prefix: ./results/gwas/all_hg38_qcd_LE1_simgwas_quant1b
Requires:
(pfiles) ./data/processed/all_hg38_qcd_LE1
(pca files) ./data/processed/all_hg38_qcd_LE1_pca
time plink2 \
--pfile ./data/processed/all_hg38_qcd_LE1 \
--glm hide-covar --covar ./results/qc/qc3/all_hg38_qcd_LE1_pca.eigenvec \
--pheno ../misc/simgwas/simgwas_quant1.pheno \
--pfilter 1e-6 \
--out ./results/gwas/all_hg38_qcd_LE1_simgwas_quant1b
Complete flag index >>