This demo showcases the analytic power of using XGR to make sense of eQTL SNPs summarised from eQTL mappings, including enrichment analysis, similarity analysis and network analysis. SNP-level enrichment analysis supported in XGR is unique in its ontology tree-aware analysis, as compared to conventional analysis using the list of GWAS Catalog traits. Similarity analysis adds a new dimension to interpret eQTL SNPs, not just showing their relevance to GWAS traits but also measuring how similar they are to each other in meanings of trait profiles (ie ontology annotation profiles).
library(XGR)
# Specify the locations of built-in data
RData.location <- "http://galahad.well.ox.ac.uk/bigdata"
We here illustrate the functionalities supported in XGR to interpret cis-eQTLs (SNPs) that are induced by 24-hour interferon gamma (IFN24), 24-hour LPS (LPS24) or 2-hour LPS (LPS2), and in naive state.
# Load cis-eQTL mapping results
cis <- xRDataLoader(RData.customised='JKscience_TS2A', RData.location=RData.location)
# Create a data frame for cis-eQTLs significantly induced in naive state
ind <- which(cis$Naive_t>0 & cis$Naive_fdr<0.05)
df_cis_Naive <- cis[ind, c('variant','Symbol','IFN_t','IFN_fdr')]
# Create a data frame for cis-eQTLs significantly induced by LPS2
ind <- which(cis$LPS2_t>0 & cis$LPS2_fdr<0.05)
df_cis_LPS2 <- cis[ind, c('variant','Symbol','LPS2_t','LPS2_fdr')]
# Create a data frame for cis-eQTLs significantly induced by LPS24
ind <- which(cis$LPS24_t>0 & cis$LPS24_fdr<0.05)
df_cis_LPS24 <- cis[ind, c('variant','Symbol','LPS24_t','LPS24_fdr')]
# Create a data frame for cis-eQTLs significantly induced by IFN24
ind <- which(cis$IFN_t>0 & cis$IFN_fdr<0.05)
df_cis_IFN24 <- cis[ind, c('variant','Symbol','IFN_t','IFN_fdr')]
Conventionally, SNP-based enrichment analysis is only using traits reported in GWAS studies. However, these GWAS traits can be mapped onto EFO terms. Using EFO enables us to look at a general term (representing a group of related traits) and its annotated SNPs, including GWAS-reported SNPs (or called ‘original annotations’) and inherited SNPs from its children terms (or called ‘inherited annotations’).
As a routine, SNP-based enrichment analysis considers LD SNPs.
Enrichment analysis is done using disease part of EFO. The necessity of using EFO is justified via comparisons of the following 2 scenarios:
This is demonstrated using cis-eQTLs induced by 24-hour interferon gamma.
df_cis <- df_cis_IFN24
data <- df_cis$variant
EFO (-)
eTerm_noEF <- xEnricherSNPs(data, ontology="EF_disease", include.LD="EUR", LD.r2=0.8, true.path.rule=F, RData.location=RData.location)
xEnrichViewer(eTerm_noEF, 10)
Barplot of enriched terms
bp_noEF <- xEnrichBarplot(eTerm_noEF, top_num="auto", displayBy="zscore")
bp_noEF