Error in eval(expr, p) : 找不到对象'exposure_dat_clumped'
生信自学网的代码,没有自己改
> #引用包
> library(TwoSampleMR)
TwoSampleMR version 0.5.10
[>] New: Option to use non-European LD reference panels for clumping etc
[>] Some studies temporarily quarantined to verify effect allele
[>] See news(package='TwoSampleMR') and https://gwas.mrcieu.ac.uk for further details
>
> exposureFile="exposure.pvalue.csv" #输入文件
> setwd("E:\\zhuomian\\lianxi2\\175.MendelianDmseo888\\05.LD") #设置工作目录
>
> #读取输入文件
> exposure_dat<-read_exposure_data(filename=exposureFile,
+ sep = ",",
+ snp_col = "SNP",
+ beta_col = "beta.exposure",
+ se_col = "se.exposure",
+ effect_allele_col = "effect_allele.exposure",
+ other_allele_col = "other_allele.exposure",
+ eaf_col = "eaf.exposure",
+ samplesize_col = "samplesize.exposure",
+ clump = F)
No phenotype name specified, defaulting to 'exposure'.
Inferring p-values
>
> #去除连锁不平衡的SNP
> exposure_dat_clumped <- clump_data(exposure_dat, clump_kb=10000, clump_r2=0.001)
API: public: http://gwas-api.mrcieu.ac.uk/
Please look at vignettes for options on running this locally if you need to run many instances of this command.
Clumping Z7TQ9n, 16301 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
> write.csv(exposure_dat_clumped, file="exposure.LD.csv", row.names=F)