
崩溃一晚、解决了孟德尔随机化502问题
最近在运行clump步骤时反复报错,多次尝试无果,崩溃了一晚上,尝试了本地的clump代码,终于解决了这个困扰多时的问题!和大家分享!






1️⃣下载参考基因组文件:准备工作是,下载“欧洲人群参考基因组位置”文件,并将其解压。下载链接:http://fileserve.mrcieu.ac.uk/1d/1kg.v3.tgz 。
2️⃣clump前处理:整体的思路是,不管我们的暴露的GWAS数据是本地抑或是在线,首先通过代码语言完成p<5e-8筛选,以及通过format_data函数完成数据标准化处理。🥸如果暴露是ieu在线数据?暴露的GWAS数据是vcf格式的文件,这种情况我们就‼️
①安装并加载P4的包
②读取下载好的vcf文件
③根据gwasglue包是否安装成功,选择性运行–3或4,分别在P5和P6。
3️⃣ 安装包+确定路径:我们先安装并运行几个需要的包【ieugwasr包;plinkbinr包】P2
然后再运行本地clump代码、生成X11后,我们只需要根据X11的rsid列将剩余的信息从X1中索引出来即可。
欢迎联系我。