1、基于数据集的Meta分析
datafilename=c("data1.txt","data2.txt"),
setwd(workdir)
library(Metalgwas)
a=1
name1=c()
for(i in datafilename){ assign(paste("file",a,sep=""),data.table::fread(paste(getwd(),"/","data",a,".txt",sep="")))
name1=c(name1,paste(workdir,"//","data",a,".txt",sep=""))
a=a+1}
METAL_gwas(GWASfile =name1, Metal_path = "XXXX",#/metal.exe : 放入下载好的软件
save_path = "./", GWAS_name = "dat1",
type = "outcome",Analysis_Scheme = "SE",
heterogeneity = TRUE, Average_FREQ = TRUE,
MinMax_FREQ = TRUE, Filter_N = FALSE, Filter_MAF = 0.01,
Genomic_Control_Correction = FALSE, Sample_Overlap_Correction = FALSE)
需要下载metal:Metal - Meta Analysis Helper for SNP data
得出来结果在文件夹中dat1.txt