suppressMessages({
suppressPackageStartupMessages({
library(gwaslake)
library(dplyr)
library(DT)
})
})

Aim

Our aim here is to improve curation of Open GWAS records by coupling to the EBI GWAS catalog.

Here are previews of gwinf (Open GWAS) and ebi (EBI catalog) resources.

library(ieugwasr) # from github mrcieu
library(gwascat)
gwinf = gwasinfo()
gwinf
ebi = get_cached_gwascat()
ebi

Data filtering and merging

Confine gwinf to records with accession numbers

We'll likely only gain information for records with GCST (study accession) tags.

gwinf = gwinf[grep("GCST", gwinf$id),]
dim(gwinf)
gwinf$acc = gsub("ebi-..", "", gwinf$id)

Filter the EBI catalog to studies

The EBI catalog has locus-specific records; we are interested in studies.

ebi = ebi[-which(duplicated(ebi$`STUDY ACCESSION`)),]

Merge and inspect

nn = inner_join(mutate(ebi, acc=`STUDY ACCESSION`), gwinf, by="acc")
dim(nn)
library(DT)
datatable(nn)


vjcitn/gwaslake documentation built on Aug. 9, 2022, 5:45 p.m.