Monther Alhamdoosh1, Charity W Law2,3, Luyi Tian2,3, Julie M Sheridan2,4, Milica Ng1, Matthew E Ritchie2,3,5. 1. CSL Limited, Bio21 Institute, Parkville, Victoria, Australia. 2. Department of Medical Biology, The University of Melbourne, Parkville, Victoria, Australia. 3. Molecular Medicine Division, The Walter and Eliza Hall Institute of Medical Research, Parkville, Victoria, Australia. 4. Molecular Genetics of Cancer Division, The Walter and Eliza Hall Institute of Medical Research, Parkville, Victoria, Australia. 5. School of Mathematics and Statistics, The University of Melbourne, Parkville, Victoria, Australia.
Abstract
Gene set enrichment analysis is a popular approach for prioritising the biological processes perturbed in genomic datasets. The Bioconductor project hosts over 80 software packages capable of gene set analysis. Most of these packages search for enriched signatures amongst differentially regulated genes to reveal higher level biological themes that may be missed when focusing only on evidence from individual genes. With so many different methods on offer, choosing the best algorithm and visualization approach can be challenging. The EGSEA package solves this problem by combining results from up to 12 prominent gene set testing algorithms to obtain a consensus ranking of biologically relevant results.This workflow demonstrates how EGSEA can extend limma-based differential expression analyses for RNA-seq and microarray data using experiments that profile 3 distinct cell populations important for studying the origins of breast cancer. Following data normalization and set-up of an appropriate linear model for differential expression analysis, EGSEA builds gene signature specific indexes that link a wide range of mouse or human gene set collections obtained from MSigDB, GeneSetDB and KEGG to the gene expression data being investigated. EGSEA is then configured and the ensemble enrichment analysis run, returning an object that can be queried using several S4 methods for ranking gene sets and visualizing results via heatmaps, KEGG pathway views, GO graphs, scatter plots and bar plots. Finally, an HTML report that combines these displays can fast-track the sharing of results with collaborators, and thus expedite downstream biological validation. EGSEA is simple to use and can be easily integrated with existing gene expression analysis pipelines for both human and mouse data.
Gene set enrichment analysis is a popular approach for prioritising the biological processes perturbed in genomic datasets. The Bioconductor project hosts over 80 software packages capable of gene set analysis. Most of these packages search for enriched signatures amongst differentially regulated genes to reveal higher level biological themes that may be missed when focusing only on evidence from individual genes. With so many different methods on offer, choosing the best algorithm and visualization approach can be challenging. The EGSEA package solves this problem by combining results from up to 12 prominent gene set testing algorithms to obtain a consensus ranking of biologically relevant results.This workflow demonstrates how EGSEA can extend limma-based differential expression analyses for RNA-seq and microarray data using experiments that profile 3 distinct cell populations important for studying the origins of breast cancer. Following data normalization and set-up of an appropriate linear model for differential expression analysis, EGSEA builds gene signature specific indexes that link a wide range of mouse or human gene set collections obtained from MSigDB, GeneSetDB and KEGG to the gene expression data being investigated. EGSEA is then configured and the ensemble enrichment analysis run, returning an object that can be queried using several S4 methods for ranking gene sets and visualizing results via heatmaps, KEGG pathway views, GO graphs, scatter plots and bar plots. Finally, an HTML report that combines these displays can fast-track the sharing of results with collaborators, and thus expedite downstream biological validation. EGSEA is simple to use and can be easily integrated with existing gene expression analysis pipelines for both human and mouse data.
Entities:
Keywords:
Bioconductor; RNA-sequencing; gene expression; gene set enrichment; microarrays
Gene set enrichment analysis allows researchers to efficiently extract biological insights from long lists of differentially expressed genes by interrogating them at a systems level. In recent years, there has been a proliferation of gene set enrichment (GSE) analysis methods released through the Bioconductor project
[1] together with a steady increase in the number of gene set collections available through online databases such as MSigDB
[2], GeneSetDB
[3] and KEGG
[4]. In an effort to unify these computational methods and knowledge-bases, the
EGSEA R/Bioconductor package was developed. EGSEA, which stands for
Ensemble of Gene Set Enrichment Analyses
[5] combines the results from multiple algorithms to arrive at a consensus gene set ranking to identify biological themes and pathways perturbed in an experiment. EGSEA calculates seven statistics to combine the individual gene set statistics of base GSE methods to rank biologically relevant gene sets. The current version of the
EGSEA package
[6] utilizes the analysis results of up to twelve prominent GSE algorithms that include:
[7],
[8],
[9],
[10],
[11],
[12],
[13],
[14],
[15],
[16],
[17] and
[17]. The
,
,
and
methods depend on a
competitive null hypothesis which assumes the genes in a set do not have a stronger association with the experimental condition compared to randomly chosen genes outside the set. The remaining eight methods are based on a
self-contained null hypothesis that only considers genes within a set and again assumes that they have no association with the experimental condition.EGSEA provides access to a diverse range of gene signature collections through the
EGSEAdata package that includes more than 25,000 gene sets for human and mouse organised according to their database sources (
Table 1). For example, MSigDB
[2] includes a number of collections (Hallmark (h) and c1–c7) that explore different biological themes ranging from very broad (h, c2, c5) through to more specialised ones focusing on cancer (c4, c6) and immunology (c7). The other main sources are GeneSetDB
[3] and KEGG
[4] which have similar collections focusing on different biological characteristics (
Table 1). The choice of collection/s in any given analysis should of course be guided by the biological question of interest. The MSigDB c2 and c5 collections are the most widely used in our own analysis practice, spanning a wide range of biological processes and can often reveal new biological insights when applied to a given dataset.
Table 1.
Summary of the gene set collections available in the EGSEAdata package.
Database
Collection
Description
MSigDB
h Hallmarks
c1 Positional
c2 Curated
c3 Motif
c4 Computational
c5 GO
c6 Oncogenic
c7 Immunologic
Gene sets representing well-defined biological states
or processes that have coherent expression.
Gene sets by chromosome and cytogenetic band.
Gene sets obtained from a variety of sources,
including online pathway databases
and the biomedical literature.
Gene sets of potential targets regulated by
transcription factors or microRNAs.
Gene sets defined computationally by mining
large collections of cancer-oriented microarray data.
Gene sets annotated by Gene Ontology (GO) terms.
Gene sets of the major cellular pathways
disrupted in cancer.
Gene sets representing different cell types
and stimulations relevant to the immune system.
KEGG
Signalling
Disease
Metabolic
Gene sets obtained from the KEGG database.
GeneSetDB
Pathway
Disease
Drug
Regulation
GO Terms
Gene sets obtained from various online databases.
The purpose of this article is to demonstrate the gene set testing workflow available in
EGSEA on both RNA-seq and microarray data. Each analysis involves four major steps that are summarized in
Figure 1: (1) selecting appropriate gene set collections for analysis and building an index that maps between the members of each set and the expression matrix; (2) choosing the base GSE methods to combine and the ranking options; (3) running the EGSEA test and (4) reporting results in various ways to share with collaborators. The
EGSEA functions involved in each of these steps are introduced with code examples to demonstrate how they can be deployed as part of a limma differential expression analysis to help with the interpretation of results.
Figure 1.
The main steps in an EGSEA analysis and the functions that perform each task.
Gene expression profiling of the mouse mammary gland
The first experiment analysed in this workflow is an RNA-seq dataset from Sheridan
et al. (2015)
[18] that consists of 3 cell populations (Basal, Luminal Progenitor (LP) and Mature Luminal (ML)) sorted from the mammary glands of female virgin mice. Triplicate RNA samples from each population were obtained in 3 batches and sequenced on an Illumina HiSeq 2000 using a 100 base-pair single-ended protocol. Raw sequence reads from the fastq files were aligned to the mouse reference genome (mm10) using the
Rsubread package
[19]. Next, gene-level counts were obtained using
featureCounts
[20] based on
Rsubread’s built-in
mm10 RefSeq-based annotation. The raw data along with further information on experimental design and sample preparation can be downloaded from the Gene Expression Omnibus (GEO,
www.ncbi.nlm.nih.gov/geo/) using GEO Series accession number GSE63310 and will be preprocessed according to the RNA-seq workflow published by Law
et al. (2016)
[21].The second experiment analysed in this workflow comes from Lim
et al. (2010)
[22] and is the microarray equivalent of the RNA-seq dataset mentioned above. The same 3 populations (Basal (also referred to as “MaSC-enriched”), LP and ML) were sorted from mouse mammary glands via flow cytometry. Total RNA from 5 replicates of each cell population were hybridised onto 3 Illumina MouseWG-6 v2 BeadChips. The intensity files and chip annotation file available in Illumina’s proprietary formats (IDAT and BGX respectively) can be downloaded from
http://bioinf.wehi.edu.au/EGSEA/arraydata.zip. The raw data from this experiment is also available from GEO under Series accession number GSE19446.
Analysis of RNA-seq data with EGSEA
Our RNA-seq analysis follows on directly from the workflow of Law
et al. (2016) which performs a differential gene expression analysis on this data set using the Bioconductor packages
edgeR
[23],
limma
[24] and
Glimma
[25] with gene annotation from the
Mus.musculus package
[26]. The
limma package offers a well-developed suite of statistical methods for dealing with differential expression for both microarray and RNA-seq datasets and will be used in the analyses of both datasets presented in this workflow.
Reading, preprocessing and normalisation of RNA-seq data
To get started with this analysis, download the R data file from
http://bioinf.wehi.edu.au/EGSEA/mam.rnaseq.rdata. The code below loads the preprocessed count matrix from Law
et al. (2016), performs TMM normalisation
[27] on the raw counts, and calculates voom weights for use in comparisons of gene expression between Basal and LP, Basal and ML, and LP and ML populations.The
voom function
[28] from the
limma package converts counts to log-counts-per-million (log-cpm) and calculates observation-level precision weights. The
object (
v) contains normalized log-cpm values and gene information used by all of the methods in the EGSEA analysis below. The precision
weights stored within
v are also used by the
,
and
gene set testing methods.For further information on preprocessing see Law
et al. (2016), as a detailed explanation of these steps is beyond the scope of this article.
Gene set testing
The EGSEA algorithm makes use of the
object (
v), a design matrix (
design) and an optional contrasts matrix (
contr.matrix). The design matrix describes how the samples in the experiment relate to the coefficients estimated by the linear model
[29]. The contrasts matrix then compares two or more of these coefficients to allow relative assessment of differential expression. Base methods that utilize linear models such as those from
limma and
GSVA (
,
,
and
) make use of the design and contrasts matrices directly. For methods that do not support linear models, these two matrices are used to extract the group information for each comparison.
1. Exploring, selecting and indexing gene set collections
The package
EGSEAdata includes more than 25,000 gene sets organized in collections depending on their database sources. Summary information about the gene set collections available in
EGSEAdata can be displayed as follows:As the output above suggests, users can obtain help on any of the collections using the standard R help (
?) command, for instance
?Mm.c2 will return more information on the mouse version of the c2 collection from MSigDB. The above information can be returned as a list:To highlight the capabilities of the
EGSEA package, the KEGG pathways, c2 (curated gene sets) and c5 (Gene Ontology gene sets) collections from the MSigDB database are selected. Next, an index is built for each gene set collection using the EGSEA indexing functions to link the genes in the different gene set collections to the rows of our RNA-seq gene expression matrix. Indexes for the c2 and c5 collections from MSigDB and for the KEGG pathways are built using the
buildIdx function which relies on Entrez gene IDs as its key. In the
EGSEAdata gene set collections, Entrez IDs are used as they are widely adopted by the different source databases and tend to be more consistent and robust since there is one identifier per gene in a gene set. It is also relatively easy to convert other gene IDs into Entrez IDs.To obtain additional information on the gene set collection indexes, including the total number of gene sets, the version number and date of last revision, the methods
summary,
show and
getSetByName (or
getSetByID) can be invoked on an object of class
GSCollectionIndex, which stores all of the relevant gene set information, as follows:Objects of class
GSCollectionIndex store for each gene set the Entrez gene IDs in the slot
original, the indexes in the slot
idx and additional annotation for each set in the slot
anno.Other EGSEA functions such as
buildCustomIdx,
buildGMTIdx,
buildKEGGIdx,
buildMSigDBIdx and
buildGeneSetDBIdx can be also used to build gene set collection indexes. The functions
buildCustomIdx and
buildGMTIdx were written to allow users to run EGSEA on gene set collections that may have been curated within a lab or downloaded from public databases and allow use of gene identifiers other than Entrez IDs. Example databases include, ENCODE Gene Set Hub (available from
https://sourceforge.net/projects/encodegenesethub/), which is a growing resource of gene sets derived from high quality ENCODE profiling experiments encompassing hundreds of DNase hypersensitivity, histone modification and transcription factor binding experiments
[30]. Other resources include PathwayCommons (
http://www.pathwaycommons.org/)
[31] and the
KEGGREST
[32] package that provides access to up-to-date KEGG pathways across many species.
2. Configuring EGSEA
Before an EGSEA test is carried out, a few parameters need to be specified. First, a mapping between Entrez IDs and Gene Symbols is created for use by the visualization procedures. This mapping can be extracted from the
genes data.frame of the
object as follows:Another important parameter in EGSEA is the list of base GSE methods (
baseMethods in the code below), which determines the individual algorithms that are used in the ensemble testing. The supported base methods can be listed using the function
egsea.base as follows:The
,
and
algorithms are available in the
GSVA package and
,
and
are implemented in the
limma package
[24]. The
method is implemented using the
phyper function from the
stats package
[33], which estimates the hypergeometric distribution for a 2 × 2 contingency table. The remaining algorithms are implemented in Bioconductor packages of the same name. A wrapper function is provided for each individual GSE method to utilize this existing R code and create a universal interface for all methods.Eleven base methods are selected for our EGSEA analysis:
,
,
,
,
,
,
,
,
,
and
.
is a fast approximation of
that assumes equal gene-wise variances across samples to produce similar
p-values to a roast analysis run with an infinite number of rotations, and is selected here to save time.Although, different combinations of base methods might produce different results, it has been found via simulation that including more methods gives better performance
[5].Since each base method generates different
p-values, EGSEA supports six different methods from the
metap package
[34] for combining individual
p-values (
Wilkinson
[35] is default), which can be listed as follows:Finally, the sorting of EGSEA results plays an essential role in identifying relevant gene sets. Any of EGSEA’s combined scores or the rankings from individual base methods can be used for sorting the results.Although
p.adj is the default option for sorting EGSEA results for convenience, we recommend the use of either
med.rank or
vote.rank because they efficiently utilize the rankings of individual methods and tend to produce fewer false positives
[5].
3. Ensemble testing with EGSEA
Next, the EGSEA analysis is performed using the
egsea function that takes a
object, a contrasts matrix, collections of gene sets and other run parameters as follows:In situations where the design matrix includes an intercept, a vector of integers that specify the columns of the design matrix to test using EGSEA can be passed to the
contrasts argument. If this parameter is
NULL, all pairwise comparisons based on
v$targets$group are created, assuming that
group is the primary factor in the design matrix. Likewise, all the coefficients of the primary factor are used if the design matrix has an intercept.EGSEA is implemented with parallel computing features enabled using the
parallel package
[33] at both the method-level and experimental contrast-level. The running time of the EGSEA test depends on the base methods selected and whether report generation is enabled or not. The latter significantly increases the run time, particularly if the argument
display.top is assigned a large value (> 20) and/or a large number of gene set collections are selected. EGSEA reporting functionality generates set-level plots for the top gene sets as well as collection-level plots.The
EGSEA package also has a function named
egsea.cnt, that can perform the EGSEA test using an RNA-seq count matrix rather than a
object, a function named
egsea.ora, that can perform over-representation analysis with EGSEA reporting capabilities using only a vector of gene IDs, and the
egsea.ma function that can perform EGSEA testing using a microarray expression matrix as shown later in the workflow.The output of the functions
egsea,
egsea.cnt,
egsea.ora and
egsea.ma is an S4 object of class
EGSEAResults. Several S4 methods can be invoked to query this object. For example, an overview of the EGSEA analysis can be displayed using the
method as follows:This command displays the number of genes and samples that were included in the analysis, the experimental contrasts, base GSE methods, the method used to combine the
p-values derived from different GSE algorithms, the sorting statistic used and the size of each gene set collection. Note that the gene set collections are identified using the labels that appear in parentheses (e.g.
c2) in the output of
.
4. Reporting EGSEA results
A summary of the top 10 gene sets in each collection for each contrast in addition to the EGSEA comparative analysis can be displayed using the S4 method
as follows:EGSEA’s
comparative analysis allows researchers to estimate the significance of a gene set across multiple experimental contrasts. This analysis helps in the identification of biological processes that are perturbed in multiple experimental conditions simultaneously. This experiment is the RNA-seq equivalent of Lim
et al. (2010)
[22], who used Illumina microarrays to study the same cell populations (see later), so it is reassuring to observe the
LIM gene signatures derived from this experiment amongst the top ranked c2 gene signatures in both the individual contrasts and comparative results.Another way of exploring the EGSEA results is to retrieve the top ranked
N sets in each collection and contrast using the method
. For example, the top 10 gene sets in the c2 collection for the comparative analysis can be retrieved as follows:The gene sets are ordered based on their
med.rank as selected when
was invoked above. When the argument
names.only is set to
FALSE, additional information is displayed for each gene set including gene set annotation, the EGSEA scores and the individual rankings by each base method. As expected, gene sets retrieved by EGSEA included the
LIM gene sets
[22] that were derived from microarray profiles of analagous mammary cell populations (sets 1, 2, 4, 6 and 8) as well as those derived from populations with similar origin (sets 7 and 9) and behaviour or characteristics (sets 5 and 10).Next,
can be used to search for gene sets of interest based on different EGSEA scores as well as the rankings of individual methods. For example, the ranking of the six
LIM gene sets from the c2 collection can be displayed based on the
med.rank as follows:While five of the
LIM gene sets are ranked in the top 10 by EGSEA, the values shown in the median rank (
med.rank) column indicate that individual methods can assign much lower ranks to these sets. EGSEA’s prioritisation of these gene sets demonstrates the benefit of an ensemble approach.Similarly, we can find the top 10 pathways in the KEGG collection from the ensemble analysis for the Basal versus LP contrast and the comparative analysis as follows:EGSEA highlights many pathways with known importance in the mammary gland such as those associated with distinct roles in lactation like basal cell contraction (
Vascular smooth muscle contraction and
Oxytocin signalling pathway) and milk production and secretion from luminal lineage cells (
Collecting duct acid secretion, Synaptic vesicle cycle and
Lysosome).Graphical representation of gene expression patterns within and between gene sets is an essential part of communicating the results of an analysis to collaborators and other researchers.
EGSEA enables users to explore the elements of a gene set via a heatmap using the
method.
Figure 2 shows examples for the
LIM_MAMMARY_STEM_CELL_UP and
LIM_MAMMARY_STEM_CELL_DN signatures which can be visualized across all contrasts using the code below.
Figure 2.
Heatmaps of log-fold-changes for genes in the
LIM_MAMMARY_STEM_CELL_UP and
LIM_MAMMARY_STEM_CELL_DN gene sets across the three experimental comparisons (Basal vs LP, Basal vs ML and LP vs ML).
When using
, the
gene.set value must match the name returned from the
method. The rows of the heatmap represent the genes in the set and the columns represent the experimental contrasts. The heatmap colour-scale ranges from down-regulated (blue) to up-regulated (red) while the row labels (Gene symbols) are coloured in green when the genes are statistically significant in the DE analysis (i.e. FDR
≤ 0.05 in at least one contrast). Heatmaps can be generated for individual comparisons by changing the
contrast argument of
. The
method also generates a CSV file that includes the DE analysis results from
for all expressed genes in the selected gene set and for each contrast (in the case of
contrast = "comparison"). This file can be used to create customised plots using other R/Bioconductor packages.In addition to heatmaps, pathway maps can be generated for the KEGG gene sets using the
method which uses functionality from the
pathview package
[36]. For example, the third KEGG signalling pathway retrieved for the contrast
BasalvsLP is
Vascular smooth muscle contraction and can be visualized as follows:Pathway components are coloured based on the gene-specific log-fold-changes as calculated in the
limma DE analysis (
Figure 3). Similarly, a comparative map can be generated for a given pathway across all contrasts.
Figure 3.
Pathway map for
Vascular smooth muscle contraction (KEGG pathway mmu04270) with log-fold-changes from the Basal vs LP contrast.
The comparative pathway map shows the log-fold-changes for each gene in each contrast by dividing the gene nodes on the map into multiple columns, one for each contrast (
Figure 4).
Figure 4.
Pathway map for
Vascular smooth muscle contraction (KEGG pathway mmu04270) with log-fold-changes across three experimental contrasts shown for each gene in the same order left to right that they appear in the contrasts matrix (i.e. Basal vs LP, Basal vs ML and LP vs ML).
Since
EGSEA combines the results from multiple gene set testing methods, it can be interesting to compare how different base methods rank a given gene set collection for a selected contrast. The
plotMethods command generates a multi-dimensional scaling (MDS) plot for the ranking of gene sets across all the base methods used (
Figure 5). Methods that rank gene sets similarly will appear closer together in this plot and we see that certain methods consistently cluster together across different gene set collections. The clustering of methods does not necessarily follow the style of null hypothesis tested though (i.e.
self-contained versus
competitive).
Figure 5.
Multi-dimensional scaling (MDS) plot showing the relationship between different gene set testing methods based on the rankings of the c2 (
a) and c5 (
b) gene sets on the Basal vs LP contrast.
Multi-dimensional scaling (MDS) plot showing the relationship between different gene set testing methods based on the rankings of the c2 (
a) and c5 (
b) gene sets on the Basal vs LP contrast.The significance of each gene set in a given collection for a selected contrast can be visualized using EGSEA’s
plotSummary method.The summary plot visualizes the gene sets as bubbles based on the − log
10 (
p-
value) (X-axis) and the average absolute log fold-change of the set genes (Y-axis). The sets that appear towards the top-right corner of this plot are most likely to be biologically relevant. EGSEA generates two types of summary plots: the directional summary plot (
Figure 6a), which colours the bubbles based on the regulation direction of the gene set (the direction of the majority of genes), and the ranking summary plot (
Figure 6b), which colours the bubbles based on the gene set ranking in a given collection (according to the
sort.by argument). The bubble size is based on the EGSEA
significance score in the former plot and the gene set size in the latter. For example, the summary plots of the KEGG pathways for the LP vs ML contrast show few significant pathways (
Figure 6). The blue colour labels on the ranking plot represents gene sets that do not appear in the top 10 gene sets that are selected based on the
sort.by argument, yet their EGSEA
significance scores are among the top 5 in the entire collection based on the
significance score. This is used to identify gene sets with high
significance scores that were not captured by the
sort.by score. The gene set IDs and more information about each set can be found in the EGSEA HTML report generated later.
Figure 6.
Summary plots of the significance of all gene sets in the KEGG collection for the LP vs ML contrast.
By default,
uses a gene set’s
p.adj score for the X-axis. This behaviour can be easily modified by assigning any of the available
scores into the parameter
x.axis, for example,
med.rank can be used to create an EGSEA summary plot (
Figure 7a) as follows:
Figure 7.
Summary plots of the significance of selected gene sets in the c2 collection for the LP vs ML contrast.
The x-axis in each plot is the
med.rank. A cut-off of 300 was used to select significant gene sets in the filtered plot (
b).
Summary plots of the significance of selected gene sets in the c2 collection for the LP vs ML contrast.
The x-axis in each plot is the
med.rank. A cut-off of 300 was used to select significant gene sets in the filtered plot (
b).The summary plot tends to become cluttered when the size of the gene set collection is very large as in
Figure 7a. The parameter
x.cutoff can be used to focus in on the significant gene sets rather than plotting the entire gene set collection, for example (
Figure 7b):Comparative summary plots can be also generated to compare the significance of gene sets between two contrasts, for example, the comparison between Basal vs LP and Basal vs ML (
Figure 8a) shows that most of the KEGG pathways are regulated in the same direction with relatively few pathways regulated in opposite directions (purple coloured bubbles in
Figure 8a). Such figures can be generated using the
plotSummary method as follows:
Figure 8.
Comparative summary plots of the significance of all gene sets in the KEGG collection for the comparison of the contrasts: Basal vs LP and Basal vs ML.
The
method has two useful parameters: (i)
use.names that can be used to display gene set names instead of gene set IDs and (ii)
interactive that can be used to generate an interactive version of this plot.The c5 collection of MSigDB and the Gene Ontology collection of GeneSetDB contain Gene Ontology (GO) terms. These collections are meant to be non-redundant, containing only a small subset of the entire GO and visualizing how these terms are related to each other can be informative.
EGSEA utilizes functionality from the
topGO package
[37] to generate GO graphs for the significant biological processes (BPs), cellular compartments (CCs) and molecular functions (MFs). The
method can generate such a display (
Figure 9) as follows:
Figure 9.
GO graphs of the top significant GO terms from the c5 gene set collection for the contrast Basal vs LP.
The GO graphs are coloured based on the values of the argument
sort.by, which in this instance was taken as
med.rank by default since this was selected when EGSEA was invoked. The top five most significant GO terms are highlighted by default in each GO category (MF, CC or BP). More terms can be displayed by changing the value of the parameter
noSig. However, this might generate very complicated and unresolved graphs. The colour of the nodes varies between red (most significant) and yellow (least significant). The values of the
sort.by scoring function are scaled between 0 and 1 to generate these graphs.Another way to visualize results at the experiment level is via a summary
bar plot. The method
can be used to generate a bar plot for the top
N gene sets in an individual collection for a particular contrast or from a comparative analysis across multiple contrasts. For example, the top 20 gene sets of the comparative analysis carried out on the c2 collection of MSigDB can be visualized in a
bar plot (
Figure 10) as follows:
Figure 10.
Bar plot of the
-log10(p-value) of the top 20 gene sets from the comparative analysis of the c2 collection.
The colour of the bars is based on the regulation direction of the gene sets, i.e., red for up-regulated, blue for down-regulated and purple for neutral regulation (in the case of the comparative analysis on experimental contrasts that show opposite behaviours). By default, the − log
10(
p.
ad j) values are plotted for the top 20 gene sets selected and ordered based on the
sort.by parameter. The parameters
bar.vals,
number and
sort.by of
can be changed to customize the
bar plot.When changes over multiple conditions are of interest, a
summary heatmap can be a useful visualization. The method
generates a heatmap of the top
N gene sets in the comparative analysis across all experimental conditions (
Figure 11). By default, 20 gene sets are selected based on the
sort.by parameter and the values plotted are the average log-fold changes at the set level for the genes regulated in the same direction as the set regulation direction, i.e.
avg.logfc.dir. The parameters
number, sort.by and
hm.vals of the
can be used to customize the summary heatmap. Additionally, the parameter
show.vals can be used to display the values of a specific EGSEA score on the heatmap cells. An example summary heatmap can be generated for the MSigDB c2 collection with the following code:
Figure 11.
Summary heatmaps for the top 20 gene sets from the c2 (
a) and KEGG (
b) collections obtained from the EGSEA comparative analysis.
Summary heatmaps for the top 20 gene sets from the c2 (
a) and KEGG (
b) collections obtained from the EGSEA comparative analysis.We find the heatmap view at both the gene set and summary level and the summary level bar plots to be useful summaries to include in publications to highlight the gene set testing results. The top differentially expressed genes from each contrast can be accessed from the
EGSEAResults object using the
method.To generate an EGSEA HTML report for this dataset, you can either set
report=TRUE when you invoke
or use the S4 method
as follows:The EGSEA report generated for this dataset is available online at
http://bioinf.wehi.edu.au/EGSEA/mam-rnaseq-egsea-report/index.html (
Figure 12). The HTML report is a convenient means of organising all of the results generated up to now, from the individual tables to the gene set level heatmaps, pathway maps and summary level plots. It can easily be shared with collaborators to allow them to explore their results more fully. Interactive tables of results via the
DT package (
https://CRAN.R-project.org/package=DT) and summary plots from
plotly (
https://CRAN.R-project.org/package=plotly) are integrated into the report using
htmlwidgets (
https://CRAN.R-project.org/package=htmlwidgets) and can be added by setting
interactive = TRUE in the command above. This option significantly increases both the run time and size of the final report due to the large number of gene sets in most collections.
Figure 12.
The EGSEA HTML report main page.
This summary page details the analysis parameters (methods combined and ranking options selected) and organises the gene set analysis results by contrast, with further separation by gene set collection. The final section on this page presents results from the comparative analysis. For each contrast and gene set collection analysed, links to tables of results and plots are provided.
The EGSEA HTML report main page.
This summary page details the analysis parameters (methods combined and ranking options selected) and organises the gene set analysis results by contrast, with further separation by gene set collection. The final section on this page presents results from the comparative analysis. For each contrast and gene set collection analysed, links to tables of results and plots are provided.This example completes our overview of EGSEA’s gene set testing and plotting capabilities for RNA-seq data. Readers can refer to the EGSEA vignette or individual help pages for further details on each of the above methods and classes.
Analysis of microarray data with EGSEA
The second dataset analysed in this workflow comes from Lim
et al. (2010)
[22] and is the microarray equivalent of the RNA-seq data analysed above. Support for microarray data is a new feature in EGSEA, and in this example, we show an express route for analysis according to the steps shown in
Figure 1, from selecting gene sets and building indexes, to configuring EGSEA, testing and reporting the results. First, the data must be appropriately preprocessed for an EGSEA analysis and to do this we make use of functions available in limma.
Reading, preprocessing and normalisation of microarray data
To analyse this dataset, we begin by unzipping the files downloaded from
http://bioinf.wehi.edu.au/EGSEA/arraydata.zip into the current working directory. Illumina BeadArray data can be read in directly using the
readIDAT and
readBGX functions from the
illuminaio package
[38]. However, a more convenient way is via the
read.idat function in
limma which uses these
illuminaio functions and outputs the data as an
EListRaw object for further processing.Next the
neqc function in
limma is used to carry out
normexp background correction and quantile normalisation on the raw intensity values using negative control probes
[39]. This is followed by log
2-transformation of the normalised intensity values and removal of the control probes.We then filter out probes that are consistently non-expressed or lowly expressed throughout all samples as they are uninformative in downstream analysis. Our threshold for expression requires probes to have a detection
p-value of less than 0.05 in at least 5 samples (the number of samples within each group). We next remove genes without a valid Entrez ID and in cases where there are multiple probes targeting different isoforms of the same gene, select the probe with highest average expression as the representative one to use in the EGSEA analysis. This leaves 7,123 probes for further analysis.
Setting up the linear model for EGSEA testing
As before, we need to set up an appropriate linear model
[29] and contrasts matrix to look for differences between the Basal and LP, Basal and ML and LP and ML populations. A batch term is included in the linear model to account for differences in expression that are attributable to the day the experiment was run.
1. Creating gene set collection indexes
We next extract the mouse c2, c5 and KEGG gene signature collections from the
EGSEAdata package and build indexes based on Entrez IDs that link between the genes in each signature and the rows of our expression matrix.
2. Configuring and 3. Testing with EGSEA
The same 11 base methods used previously in the RNA-seq analysis were selected for the ensemble testing of the microarray data using the function
egsea.ma. Gene sets were again prioritised by their median rank across the 11 methods.
4. Reporting EGSEA results
An HTML report that includes each of the gene set level and summary level plots shown individually for the RNA-seq analysis was then created using the
generateReport function. We complete our analysis by displaying the top ranked sets for the c2 collection from a comparative analysis across all contrasts.The EGSEA report generated for this dataset is available online at
http://bioinf.wehi.edu.au/EGSEA/mam-ma-egsea-report/index.html. Reanalysis of this data retrieves similar c2 gene sets to those identified by analysis of RNA-seq data. These included the
LIM gene signatures (sets 1, 2 and 3) as well as those derived from populations with similar cellular origin (set 4).
Discussion
In this workflow article, we have demonstrated how to use the
EGSEA package to combine the results obtained from different gene signature databases across multiple GSE methods to find an ensemble solution. A key benefit of an EGSEA analysis is the detailed and comprehensive HTML report that can be shared with collaborators to help them interpret their data. This report includes tables prioritising gene signatures according to the user specified analysis options, and both gene set specific and summary graphics, each of which can be generated individually using specific R commands. The approach taken by EGSEA is facilitated by the diverse range of gene set testing algorithms and plotting capabilities available within Bioconductor. EGSEA has been tailored to suit a limma-based differential expression analysis which continues to be a very popular and flexible platform for transcriptomic data. Analysts who choose an individual GSE algorithm to prioritise their results rather than an ensemble solution can still benefit from EGSEA’s comprehensive reporting capability.
Software availability
Code to perform this analysis can be found in the
EGSEA123 workflow package available from Bioconductor:
https://www.bioconductor.org/help/workflows/EGSEA123.Latest source code is available at:
https://github.com/mritchie/EGSEA123.Archived source code as at the time of publication is available at:
https://doi.org/10.5281/zenodo.1043436
[40].Software license: Artistic License 2.0.GSEA analysis methods do not all produce same results. Score-based gene set analysis methods like the Broad Institute GSEA tool are considered to perform better than normal Fisher’s exact test (overrepresentation analysis). But analysts often use methods they know to be less than ideal in order to reduce complexity and save time. So it is good to have a unified interface for GSEA analyses with R – it helps save programming time and reduces complexity. In addition EGSEA is a unique method that combines up to 12 gene set analysis methods into a single score. Independent test also corroborate that the tool using the 12 has more specificity and good sensitivity compared to using some of the tests alone.The EGSEA 1-2-3 workflow is easy to use and generate good-quality figures with the ggplot2 R package. So9me of the figures are novel compared to other packages e.g., scatter plots designed to compare different contrasts. It is also very useful that the tool can be applied to multiple contrasts at a time, although if there are too many contrasts then the number of plots becomes unwieldly (increases combinatorically).Some more technical comments:The results object is very complicated for retrieving individual method analysis results (although summaries are readily available). I quite like the "biobroom" Bioconductor package that does "tidy" data frames from limma results objects.All in all a very useful package both for automating the running of lots of methods at the same time and of course for the "ensemble" method. It is recommended to be considered to be part of a standard bioinformatics workflow.We have read this submission. We believe that we have an appropriate level of expertise to confirm that it is of an acceptable scientific standard.EGSEA is a new gene set analysis tool that combines results from multiple individual tools in R as to yield better results. The authors have published EGSEA methodology previously. This paper focuses on the practical analysis workflow based on EGSEA with specific examples. As EGSEA is a compound and complicated analysis procedure, this work serves as a valuable guidance for the users to make full use of this tool. I’ve gone through the workflow line by line, it seems to work well. However, authors can improve their work by addressing the following issues.There should be an R code script which includes all source code and concise comments like the one in company with the vignette in any Bioconductor package. It would be much easy for the users/reviewers to try the example code. It is not convenient to follow the code in this manuscript, the code need to be edit to remove the prompt symbols (> or +) at each line when copying/pasting.It takes too long to run the egsea analysis example on modest machine. It is advisable to show a lesser example in the workflow with only one gene set collection like kegg and just a few base methods like:gsa = egsea(voom.results=v, contrasts=contr.matrix,gs.annots=gs.annots$kegg, symbolsMap=symbolsMap,baseGSEAs=baseMethods[1:4], sort.by="med.rank",num.threads = 3, report = FALSE)The rank of the gsa results shown following the t = topSets(..) line is confusing. The p.adj for the top 1 gene set is not the smallest, actually much bigger than top 2, 6 and 8. Presumably, the gene sets are ranked by med.rank instead of p.adj here. However, the opposite was described in the text above near the egsea.sort() line: “Although p.adj is the default option for sorting EGSEA results for convenience, ...”In addition, there is big difference between the final rank and med.rank (e.g. 1 vs 36). This may suggest inconsistent results came from different base methods. This may also be due to the large number of gene sets being tested. Again, using a smaller gene set collection and a few base methods could make the ranking more consistent.All visualization functions, i.e. plotHeatmap, plotPathway, plotGOGraph, plotMethods, plotSummary and plotBars share largely the same set of arguments, they can have a unified wrapper function like plot.gsa() with an extra argument type to specify the plot type.Functions plotPathway, plotGOGraph are wrapper functions for those in the pathview and topGO package as the author noted in the text. It would be good to explicit show some message like “calling plotting function from pathview or topGO package etc”, just like the message when running egsea().HTML report of the results is a very valuable feature for the users. However, the code can run a long time, it would be helpful to add some progress reminder message to generateReport() function like egsea(). BTW, the KEGG Pathway graphs are not shown properly in the report example at
http://bioinf.wehi.edu.au/EGSEA/mam-rnaseq-egsea-report/index.html.I have read this submission. I believe that I have an appropriate level of expertise to confirm that it is of an acceptable scientific standard, however I have significant reservations, as outlined above.This F1000 software tool article describes the EGSEA package that incorporates many different gene set testing methods from various packages and also allows access to a wide array of gene sets from different databases through the accompanying EGSEAdata package. These packages will enable researchers to conveniently test many different methods and incorporate their results to get more robust biological insights
[1], and this article gives a well-written walk-through of how to use the packages.The biggest limitation I see it that EGSEA is focused only on human and mouse data (and rat? The article does not list rat but the help page for buildIdx() lists rat as one of the species). I understand that many of the gene set collections like MSigDB and GeneSetDB are only available for human/mouse, but KEGG currently lists 429 Eukaryotic organisms (
http://www.genome.jp/kegg/catalog/org_list.html) and GO terms are readily available for 19 species using BioC's pre-built OrgDB packages and hundreds of other through AnnotationHub. It is unclear whether EGSEA functions buildCustomIdx and buildGMTIdx that were "written to allow users to run EGSEA on gene set collections that may have been curated within a lab or downloaded from public databases and allow use of gene identifiers other than Entrez IDs" can be used to run EGSEA on additional species. If so, this should be clearly stated in both the Abstract and in the body of the article, plus an example given on how to use buildCustomIdx for another species. If there is some reason that EGSEA cannot currently extend to other species, this should be acknowledged as a limitation and future versions should strive to allow this (although not required before approval).Other issues to address before approval:I am unable to create the html report on my Windows machine, getting the following error:Build GO DAG topology ..........There are no adj nodes for node: GO:0061857Error in switch(type, isa = 0, partof = 1, -1) :EXPR must be a length 1 vectorHowever, I reported this error to the support site (
https://support.bioconductor.org/p/103640/#103748) and got a speedy reply from the author. It hopefully will be resolved soon, although there is a concern of why the error was not found on another Windows machine.I am concerned that as demonstrated in this paper, EGSEA seems to take the place of standard limma differential expression analysis, in that the model fitting takes place within the egsea() function. Certain gene set testing functions do need the individual expression values and not just the fitted values in an MArrayLM object but given the computational time (8 min as shown in the article code block and 19 min on my own computer) you should never run egsea() without first assessing the model fit on your own! Ideally the egsea function could be written to accept MArrayLM, or at least the article should clearly state that users should have first assessed the validity of the model fit through the usual workflow of Law
et al. (2016)
[2] prior to running EGSEA.I also wonder why there are different interfaces for voom-based analysis and microarray data given that both use EList objects. I understand that the voom weights need to be used internally, but limma's lmFit function handles both without trouble, although it was originally coded for microarray data and the voom functionality came later. Even if there needs to be a separate function egsea.ma() for non-voom, non-count data, it should still accept an EList object so that the user does not have to pull out the expression data and the grouping info.Back to the computational time required, there are several vague references to removing the roast method "to save time" and that the report generation "significantly" increases run time. it would be nice to have an example of the time required to run roast and the report generation for the computational architecture that created the article.I have read this submission. I believe that I have an appropriate level of expertise to confirm that it is of an acceptable scientific standard, however I have significant reservations, as outlined above.This article describes a gene set enrichment analysis (GSEA) workflow for the "Ensembl of GSEA" (EGSEA) R/Bioconductor software
package. EGSEA is an ensemble-like method recently published
[1] by the authors of this workflow that allows the user to simultaneously apply different GSEA algorithms on a high-throughput molecular profiling data set, by combining p-values associated with each algorithm using classical meta-analysis approaches such as the Fisher's method.Because the statistical methodology is already described in detail in the corresponding publication, the present software tool article focuses on showing a step-by-step workflow with EGSEA. However, the vignette of the software package already provides a very detailed description about how to use EGSEA through its 39 pages. Therefore, it would be useful for the interested reader to find upfront when he/she should be consulting the vignette and when he/she should be consulting this workflow. Besides this introductory aspects, the following issues should be addressed before approval:Below I also describe other issues that I would recommend to be considered in future versions of the software but which I do not consider them to be required for approval of this article:The code given in the article breaks, at least in my computer, more concretely, at this line:gsa = egsea(voom.results=v, contrasts=contr.matrix,gs.annots=gs.annots, symbolsMap=symbolsMap,baseGSEAs=baseMethods, sort.by="med.rank",num.threads = 8, report = FALSE)EGSEA analysis has started##------ Mon Nov 27 12:37:42 2017 ------##Log fold changes are estimated using limma package ...limma DE analysis is carried out ...Number of used cores has changed to 4in order to avoid CPU overloading.EGSEA is running on the provided data and c2 collection.......camera*....safe*...gage*.padog*....gsva*..fry*...plage*...globaltest*...zscore*...ora*...ssgsea*Error in temp.results[[baseGSEA]][[i]][names(gs.annot@idx), ] :incorrect number of dimensionswhile running it with the latest release version 1.6.0. This is strange since the package builds and runs the vignette without problems. So, this might be related to the different sample data sets. A possible hint may come from the fact that the 'buildIdx()' call is not returning the expected class of object, according to the workflow:class(gs.annots$s2)## [1] "NULL"summary(gs.annots$s2)## Length Class Mode## 0 NULL NULLThe workflow contains a rather high amount of code, often with a non-trivial use of externally instantiated objects and nested calls to functions. It would be helpful for the interested reader to be able to easily copy and paste the instructions, but the fact that R commands are given with the R shell '>' and '+' symbols makes it less easy. A non-expert user may even copy those characters and get an error. I would recommend removing those characters from the illustrated code, just as it happens with the vignette.The workflow assumes that the user has a 'DGEList' object with gene metadata including the mapping between Entrez identifiers' and HGNC symbols. This is a rather unrealistic assumption and I would recommend that the workflow starts building that object from scratch and showing how to build that table of gene metadata.The so-called "summary plot" shows the -log10 p-value on the x-axis and average absolute log fold-change of the set genes on the y-axis. Because this is in a way analogous to a rotated volcano plot, I would suggest to use the same arrangement of axes as in the volcano plot, which is a rather standardized display of significance and magnitude of the effects of interest.One of the key features of the Bioconductor project, to which the EGSEA package is contributing to, is enabling software interoperability through sharing the use of common data structures across different software packages. Using specialized data structures, where analogous ones have been already designed by the Bioconductor core team or by a wider community of developers, locks the user into that package and limits the possibilities of using it as a building block in other more complex workflows. I'm making this comment because I have the impression that the EGSEA package would benefit of using the infrastructure provided by the Bioconductor GSEABase
package, in which data structures are defined to store and access gene sets and collections of gene sets of different kinds. A salient feature of that infrastructure is the possibility to seamlessly map gene identifiers of different kinds. This would simplify and improve the user experience of EGSEA since mapping between genes coded with a particular kind of identifier, and gene sets defined with another kind, is one of the most common tasks in a GSEA-like analysis.I have read this submission. I believe that I have an appropriate level of expertise to confirm that it is of an acceptable scientific standard, however I have significant reservations, as outlined above.
Authors: Matthew E Ritchie; Belinda Phipson; Di Wu; Yifang Hu; Charity W Law; Wei Shi; Gordon K Smyth Journal: Nucleic Acids Res Date: 2015-01-20 Impact factor: 16.971
Authors: Di Wu; Elgene Lim; François Vaillant; Marie-Liesse Asselin-Labat; Jane E Visvader; Gordon K Smyth Journal: Bioinformatics Date: 2010-07-07 Impact factor: 6.937
Authors: Weijun Luo; Michael S Friedman; Kerby Shedden; Kurt D Hankenson; Peter J Woolf Journal: BMC Bioinformatics Date: 2009-05-27 Impact factor: 3.169
Authors: Aaron J Storey; Kevin S Naceanceno; Renny S Lan; Charity L Washam; Lisa M Orr; Samuel G Mackintosh; Alan J Tackett; Rick D Edmondson; Zhengyu Wang; Hong-Yu Li; Brendan Frett; Samantha Kendrick; Stephanie D Byrum Journal: Mol Omics Date: 2020-04-29
Authors: Christopher T Lee; Raymond G Cavalcante; Chee Lee; Tingting Qin; Snehal Patil; Shuze Wang; Zing T Y Tsai; Alan P Boyle; Maureen A Sartor Journal: NAR Genom Bioinform Date: 2020-02-06
Authors: Pauline Rettman; Matthew D Blunt; Rebecca J Fulton; Andres F Vallejo; Leidy Y Bastidas-Legarda; Laura España-Serrano; Marta E Polak; Aymen Al-Shamkhani; Christelle Retiere; Salim I Khakoo Journal: J Immunother Cancer Date: 2021-05 Impact factor: 13.751
Authors: Samantha J Emery-Corbin; Joshua J Hamey; Brendan R E Ansell; Balu Balan; Swapnil Tichkule; Andreas J Stroehlein; Crystal Cooper; Bernie V McInerney; Soroor Hediyeh-Zadeh; Daniel Vuong; Andrew Crombie; Ernest Lacey; Melissa J Davis; Marc R Wilkins; Melanie Bahlo; Staffan G Svärd; Robin B Gasser; Aaron R Jex Journal: Mol Biol Evol Date: 2020-12-16 Impact factor: 16.240
Authors: Michael Lacy; Christina Bürger; Annelie Shami; Maiwand Ahmadsei; Holger Winkels; Katrin Nitz; Claudia M van Tiel; Tom T P Seijkens; Pascal J H Kusters; Ela Karshovka; Koen H M Prange; Yuting Wu; Sanne L N Brouns; Sigrid Unterlugauer; Marijke J E Kuijpers; Myrthe E Reiche; Sabine Steffens; Andreas Edsfeldt; Remco T A Megens; Johan W M Heemskerk; Isabel Goncalves; Christian Weber; Norbert Gerdes; Dorothee Atzler; Esther Lutgens Journal: Nat Commun Date: 2021-06-18 Impact factor: 14.919