连锁不平衡LD

step1:从conda上下载plink2

conda install bioconda::plink2

step2:从Resources中的1000 Genomes phase 3下载all_hg38.pgen.zst、all_hg38_rs.pvar.zst 、hg38_corrected.psam

plink2软件的教程: https://www.cog-genomics.org/plink/2.0/

从Resources中的1000 Genomes phase 3下载all_hg38.pgen.zst、all_hg38_rs.pvar.zst 、hg38_corrected.psam,并将all_hg38_rs.pvar.zst 改名为all_hg38.pvar.zst ,hg38_corrected.psam改名为hg38.psam
在这里插入图片描述

step3:解压pgen

plink2 --zst-decompress all_hg38.pgen.zst > all_hg38.pgen.zst

step4:把pgen转化成bed,bim,fam

plink2 --pfile all_hg38 vzs -- max-alleles 2 -- make-bed -- out all_hg38_test -- allow-extra-chr

step5:从hg38_corrected.psam筛选出欧洲人,将#IID保存为 eur_iid.txt

plink2 --bfile all_hg38_test --keep eur_IID.txt --make-bed --out all_hg38_test2 -- allow-extra-chr

step6:将需要的SNP保存成SNP.txt

plink2 --bfile all_hg38_test2 --extract SNP.txt --make-bed --out test -- allow-extra-chr

step7:排除重复的SNP

plink2 --bfile test --rm-dup force-first list ---make-bed --out test_nodups -- allow-extra-chr

step8:LD

plink2 --bfile test_nodups --indep-pairwise 500 10 0.1 -- allow-extra-chr

得到plink2.prune.in文件
参数含义见文档: https://www.cog-genomics.org/plink/2.0/ld

  • 14
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值