一、MR报错的处理
(一). 报错1
Error in extract_outcome_data(snps = exposure_data$SNP, outcomes = "ebi-a-sss", :
参数没有用(access_token = NULL)**
(1).打开网址、登录账号,获取token
https://mrcieu.github.io/ieugwasr/articles/guide.html#authentication
(2). 在R中执行代码,将token写入文件
file.edit('~/.Renviron')
ieugwasr::get_opengwas_jwt()
(3).重启R
(二). 报错2
进行孟德尔随机化clumped时出现了报错
Clumping 3Pps56, 17 variants, using EUR population reference
No encoding supplied: defaulting to UTF-8.
Error in mtfrm.default(list(url = "https://api.opengwas.io/api/ld/clump", :
cannot mtfrm
解决方法: 换个api试试,在clumped前加行代码
options(ieugwasr_api = 'gwas-api.mrcieu.ac.uk/')