This demo showcases the analytic power of using XGR to make sense of differential genes summarised from differential expression studies, including enrichment analysis and network analysis. Gene-level enrichment analysis supported in XGR is unique in its engagement to produce much more informative enrichment results. It is achieved either taking into account the ontology tree-like structure when using a structured ontology, or going through a filtering procedure when using a non-structured ontology (eg a collection of pathways). Gene-level network analysis supported in XGR is able to identify a maximum-scoring gene subnetwork (with a desired number of nodes), achieved via heuristically solving prize-collecting Steiner tree problem, this algorithm that has been demonstrated superior over other state-of-the-art methods (Fang and Gough 2014).
First of all, load the XGR package and specify the location of built-in data.
library(XGR)
# Specify the location of built-in data
RData.location <- "http://galahad.well.ox.ac.uk/bigdata"
We here illustrate the functionalities supported in XGR to interpret differentially expressed genes induced by innate immune stimuli (Fairfax et al. 2014), that is, genes differentially induced by 24-hour interferon gamma (IFN24), 24-hour LPS (LPS24) or 2-hour LPS (LPS2).
# Load differential expression analysis results
res <- xRDataLoader(RData.customised='JKscience_TS1A', RData.location=RData.location)
background <- res$Symbol
# Create a data frame for genes significantly induced by IFN24
flag <- res$logFC_INF24_Naive<0 & res$fdr_INF24_Naive<0.01
df_IFN24 <- res[flag, c('Symbol','logFC_INF24_Naive','fdr_INF24_Naive')]
# Create a data frame for genes significantly induced by LPS24
flag <- res$logFC_LPS24_Naive<0 & res$fdr_LPS24_Naive<0.01
df_LPS24 <- res[flag, c('Symbol','logFC_LPS24_Naive','fdr_LPS24_Naive')]
# Create a data frame for genes significantly induced by LPS2
flag <- res$logFC_LPS2_Naive<0 & res$fdr_LPS2_Naive<0.01
df_LPS2 <- res[flag, c('Symbol','logFC_LPS2_Naive','fdr_LPS2_Naive')]
This is demonstrated by performing Disease Ontology (DO) enrichment analysis for differential genes induced by 24-hour interferon gamma.
DO enrichment analysis without considering tree structure
data <- df_IFN24$Symbol
eTerm_IFN24_DO_none <- xEnricherGenes(data=data, background=background, ontology="DO", ontology.algorithm="none", RData.location=RData.location)
xEnrichViewer(eTerm_IFN24_DO_none, 10)
Barplot of enriched terms
bp_IFN24_DO_none <- xEnrichBarplot(eTerm_IFN24_DO_none, top_num="auto", displayBy="fdr")
bp_IFN24_DO_none