2021-11-11 Plink usage

Plink format transfer

Introduction

  • input files
    --bfile --file --tfile

--bfile: read files: bed/bim/fam
--file: read ped/map

  • out files
    --out

  • recode

  1. PED/MAP transfer to TPED/TFAM
    plink --ped test.ped --map test.map --recode --transpose --out test1
    or:
    plink --file test --recode --transpose --out test1

  2. TPED/TFAM transfer to PED/MAP
    plink --tped test1.tped --tfam test1.tfam --recode --out test2
    or
    plink --tfile test1 --recode --out test2

  3. PED/MAP transfer to binary file
    plink --file test --make-bed --out test3

  4. TFAM/TPED transfer to binary file
    plink --tfile test1 --make-bed --out test3

  5. Binary file tranfer to TPED/TFAM
    plink --bfile test3 --recode --transpose --out test4

  6. Binary file transfer to PED/MAP
    plink --bfile test3 --recode --out test

  • keep and remove
    --keep
    --remove

plink --bfile test --keep sample.txt --recode --make-bed --out sample

sample.txt include two colunms, first one is Family ID, second is Within-family ID

  • extrac
    plink --bfile test --extract snp.txt --make-bed --out snp

Quality

  • geno
  • hwe
  • maf
  • mind

plink --bfile test --geno 0.05 --hwe 0.000001 --maf 0.5 --mind 0.1 --make-bed --out test_qc

--geno 0.05 remove one SNP if >5% missing
--mind 0.1 remove one individual if >10% missing

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容