## Not run:
# # Load the XGR package and specify the location of built-in data
# library(XGR)
# RData.location <- "http://galahad.well.ox.ac.uk/bigdata_dev/"
#
# # 1) load eQTL mapping results: cis-eQTLs significantly induced by IFN
# cis <- xRDataLoader(RData.customised='JKscience_TS2A',
# RData.location=RData.location)
# ind <- which(cis$IFN_t > 0 & cis$IFN_fdr < 0.05)
# df_cis <- cis[ind, c('variant','Symbol','IFN_t','IFN_fdr')]
# data <- df_cis$variant
#
# # 2) Enrichment analysis using Experimental Factor Ontology (EFO)
# # Considering LD SNPs and respecting ontology tree
# eTerm <- xEnricherSNPs(data, ontology="EF", include.LD="EUR",
# LD.r2=0.8, ontology.algorithm="lea", RData.location=RData.location)
#
# # 3) Barplot of enrichment results
# bp <- xEnrichBarplot(eTerm, top_num="auto", displayBy="fc")
# #pdf(file="enrichment_barplot.pdf", height=6, width=12, compress=TRUE)
# print(bp)
# #dev.off()
# ## End(Not run)
Run the code above in your browser using DataLab