大规模基因型数据 QC、转换和关联分析的常用命令行工具。Command-line toolkit for genotype data management and association testing.
mamba install -c bioconda plink2
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
--pfile:读取 PGEN/PVAR/PSAM 数据集。--vcf:读取 VCF。--make-pgen:写出 PGEN 数据集。--geno / --mind:按位点/样本缺失率过滤。--maf / --hwe:按等位频率和 HWE 过滤。--pca:主成分分析。