纠正错误 / Fix 添加实例 / Add example
文件格式 / Formats

PLINK 2

大规模基因型数据 QC、转换和关联分析的常用命令行工具。Command-line toolkit for genotype data management and association testing.

速览 | Quick Look

安装 | Install

mamba install -c bioconda plink2

常用命令 | Common Commands

VCF 转 PGEN:

plink2 --vcf cohort.vcf.gz --make-pgen --out cohort

按缺失率过滤:

plink2 --pfile cohort --geno 0.05 --mind 0.05 --make-pgen --out cohort.qc1

按 MAF 和 HWE 过滤:

plink2 --pfile cohort.qc1 --maf 0.01 --hwe 1e-6 \
  --make-pgen --out cohort.qc2

计算 PCA:

plink2 --pfile cohort.qc2 --pca 20 approx --out cohort.pca

导出 VCF:

plink2 --pfile cohort.qc2 --export vcf bgz --out cohort.qc2

关键参数 | Key Options

常见坑 | Pitfalls

参考 | References