项目场景:
library(TwoSampleMR)
library(BiocManager)
library(VariantAnnotation)
library(gwasglue)
library(data.table)
library(dplyr)
library(tidyr)
library(devtools)
library(usethis)
setwd(“E:\R_project\MR\data”)
exposureFile=“ukb-b-19953.vcf.gz”
vcfRT <- readVcf(exposureFile)
data = gwasvcf_to_TwoSampleMR(vcf = vcfRT, type=“exposure”)
原因分析
一直以为gwasglue和gwasglue2是一个东西,包里面下好了gwasglue2,但是没有gwasglue
解决方案:
下载gwasglue包
install.packages(“devtools”)
devtools::install_github(“mrcieu/gwasglue”)