This package implements the pathway analysis method SIGORA. For an in depth description of the method, please see our manuscript in PeerJ. In short: a GPS (gene pair signature) is a (weighted) pair of genes that as a combination occurs only in a single pathway within a pathway repository.
A query list is a vector containing a gene list of interest (e.g. genes that are differentially expressed in a particular condition). A present GPS is a GPS for which both components are in the query list. SIGORA identifies relevant pathways based on the over-representation analysis of their (present) GPS.
A thought experiment: Imagine you randomly selected 3 KEGG pathways, and then randomly selected a total of 50 genes from all genes that that are associated with any of these pathways. Using traditional methods (hypergeometric test using individual genes), how many pathways would you estimate to show up as statistically overrepresented in this “query list” of 50 genes?
Let us do this experiment! Everything related to human KEGG Pathways
can be found in kegH. A function to randomly select \(n\) genes from \(m\) randomly selected pathways is
genesFromRandomPathways. The traditional overrepresentation
analysis (which is the basis for many popular tools) is available
through ora. Putting these together:
## Randomly selected pathways are:
## hsa04218
## hsa00590
## hsa04917
## [1] "hsa04218" "hsa00590" "hsa04917"
## [1] "9134" "91860" "5499" "22800" "1111" "90550"
## [7] "6776" "1874" "8792" "4051" "28996" "22808"
## [13] "1557" "890" "5594" "493869" "5606" "8600"
## [19] "2876" "100137049" "83447" "894" "1030" "1559"
## [25] "11145" "4773" "1573" "4893" "7248" "5296"
## [31] "293" "3708" "2053" "147746" "874" "1081"
## [37] "23291" "3803" "8681" "292" "2878" "2678"
## [43] "391013" "824" "5605" "3972" "4616" "85417"
## [49] "891" "5291"
## Traditional ORA identifies many significant pathways!
ora(geneList = a1[["genes"]], GPSrepo = kegH)## pathwyid description success
## 1 hsa04218 Cellular senescence 31
## 2 hsa00590 Arachidonic acid metabolism 14
## 3 hsa04917 Prolactin signaling pathway 11
## 4 hsa05166 HTLV-I infection 15
## 5 hsa04912 GnRH signaling pathway 10
## 6 hsa00591 Linoleic acid metabolism 7
## 7 hsa04370 VEGF signaling pathway 8
## 8 hsa04068 FoxO signaling pathway 10
## 9 hsa04664 Fc epsilon RI signaling pathway 8
## 10 hsa04750 Inflammatory mediator regulation of TRP channels 9
## 11 hsa04014 Ras signaling pathway 12
## 12 hsa04072 Phospholipase D signaling pathway 10
## 13 hsa05161 Hepatitis B 10
## 14 hsa04110 Cell cycle 9
## 15 hsa05223 Non-small cell lung cancer 7
## 16 hsa05231 Choline metabolism in cancer 8
## 17 hsa04140 Autophagy - animal 9
## 18 hsa05214 Glioma 7
## 19 hsa05220 Chronic myeloid leukemia 7
## 20 hsa04921 Oxytocin signaling pathway 9
## 21 hsa05203 Viral carcinogenesis 10
## 22 hsa04726 Serotonergic synapse 8
## 23 hsa04022 cGMP-PKG signaling pathway 9
## 24 hsa05213 Endometrial cancer 6
## 25 hsa04270 Vascular smooth muscle contraction 8
## 26 hsa04730 Long-term depression 6
## 27 hsa04210 Apoptosis 8
## 28 hsa04910 Insulin signaling pathway 8
## 29 hsa05221 Acute myeloid leukemia 6
## 30 hsa04720 Long-term potentiation 6
## 31 hsa05205 Proteoglycans in cancer 9
## 32 hsa05218 Melanoma 6
## 33 hsa04662 B cell receptor signaling pathway 6
## 34 hsa04611 Platelet activation 7
## 35 hsa04913 Ovarian steroidogenesis 5
## 36 hsa04012 ErbB signaling pathway 6
## 37 hsa04114 Oocyte meiosis 7
## 38 hsa00592 alpha-Linolenic acid metabolism 4
## 39 hsa05210 Colorectal cancer 6
## 40 hsa04650 Natural killer cell mediated cytotoxicity 7
## 41 hsa05167 Kaposi's sarcoma-associated herpesvirus infection 8
## 42 hsa04371 Apelin signaling pathway 7
## 43 hsa04915 Estrogen signaling pathway 7
## 44 hsa05215 Prostate cancer 6
## 45 hsa04914 Progesterone-mediated oocyte maturation 6
## 46 hsa05224 Breast cancer 7
## 47 hsa04660 T cell receptor signaling pathway 6
## 48 hsa04015 Rap1 signaling pathway 8
## 49 hsa04810 Regulation of actin cytoskeleton 8
## 50 hsa04024 cAMP signaling pathway 8
## 51 hsa05211 Renal cell carcinoma 5
## 52 hsa05230 Central carbon metabolism in cancer 5
## 53 hsa04217 Necroptosis 7
## 54 hsa05216 Thyroid cancer 4
## 55 hsa04115 p53 signaling pathway 5
## 56 hsa05164 Influenza A 7
## 57 hsa04918 Thyroid hormone synthesis 5
## 58 hsa04010 MAPK signaling pathway 9
## 59 hsa04722 Neurotrophin signaling pathway 6
## 60 hsa01521 EGFR tyrosine kinase inhibitor resistance 5
## 61 hsa04380 Osteoclast differentiation 6
## 62 hsa00565 Ether lipid metabolism 4
## pathwaySize pvalues Bonfer
## 1 160 2.015e-40 3.304600e-38
## 2 63 1.518e-18 2.489520e-16
## 3 70 6.203e-13 1.017292e-10
## 4 219 5.903e-12 9.680920e-10
## 5 93 3.811e-10 6.250040e-08
## 6 29 5.518e-10 9.049520e-08
## 7 59 3.915e-09 6.420600e-07
## 8 131 1.128e-08 1.849920e-06
## 9 68 1.247e-08 2.045080e-06
## 10 100 1.556e-08 2.551840e-06
## 11 232 2.655e-08 4.354200e-06
## 12 148 3.660e-08 6.002400e-06
## 13 162 8.665e-08 1.421060e-05
## 14 124 1.029e-07 1.687560e-05
## 15 66 2.282e-07 3.742480e-05
## 16 98 2.282e-07 3.742480e-05
## 17 137 2.435e-07 3.993400e-05
## 18 75 5.556e-07 9.111840e-05
## 19 76 6.089e-07 9.985960e-05
## 20 153 6.248e-07 1.024672e-04
## 21 201 6.528e-07 1.070592e-04
## 22 115 7.871e-07 1.290844e-04
## 23 167 1.307e-06 2.143480e-04
## 24 58 2.079e-06 3.409560e-04
## 25 132 2.248e-06 3.686720e-04
## 26 60 2.546e-06 4.175440e-04
## 27 136 2.816e-06 4.618240e-04
## 28 137 2.976e-06 4.880640e-04
## 29 66 4.481e-06 7.348840e-04
## 30 67 4.897e-06 8.031080e-04
## 31 204 6.844e-06 1.122416e-03
## 32 72 7.474e-06 1.225736e-03
## 33 82 1.592e-05 2.610880e-03
## 34 124 1.643e-05 2.694520e-03
## 35 49 1.691e-05 2.773240e-03
## 36 85 1.959e-05 3.212760e-03
## 37 128 2.021e-05 3.314440e-03
## 38 25 2.044e-05 3.352160e-03
## 39 86 2.095e-05 3.435800e-03
## 40 131 2.350e-05 3.854000e-03
## 41 186 2.833e-05 4.646120e-03
## 42 137 3.142e-05 5.152880e-03
## 43 138 3.293e-05 5.400520e-03
## 44 97 4.164e-05 6.828960e-03
## 45 99 4.674e-05 7.665360e-03
## 46 147 4.942e-05 8.104880e-03
## 47 103 5.844e-05 9.584160e-03
## 48 210 6.739e-05 1.105196e-02
## 49 213 7.449e-05 1.221636e-02
## 50 214 7.699e-05 1.262636e-02
## 51 69 9.011e-05 1.477804e-02
## 52 69 9.011e-05 1.477804e-02
## 53 162 9.163e-05 1.502732e-02
## 54 37 1.006e-04 1.649840e-02
## 55 72 1.105e-04 1.812200e-02
## 56 170 1.241e-04 2.035240e-02
## 57 74 1.259e-04 2.064760e-02
## 58 295 1.264e-04 2.072960e-02
## 59 119 1.308e-04 2.145120e-02
## 60 79 1.718e-04 2.817520e-02
## 61 128 1.952e-04 3.201280e-02
## 62 47 2.586e-04 4.241040e-02
## Now let us try sigora with the same input
sigoraRes <- sigora(
GPSrepo = kegH,
queryList = a1[["genes"]],
level = 4
)## pathwy.id description pvalues Bonferroni successes
## 1 hsa04218 Cellular senescence 1.669e-108 5.090e-106 56.68
## 2 hsa00590 Arachidonic acid metabolism 3.125e-41 9.531e-39 21.83
## PathwaySize N sample.size
## 1 2037.98 452219.2 87.58
## 2 606.97 452219.2 87.58
## [1] "hsa04218" "hsa00590" "hsa04917"
You might want to rerun the above few lines of code with different
values for seed and convince yourself that there indeed is
a need for a new way of pathway analysis.
The current version of the package comes with precomputed GPS
repositories for KEGG human and mouse
(kegH and kegM respectively), as well as for
Reactome human and mouse (reaH and
reaM respectively). The package provides a function for
creating GPS repositories from a user’s own gene-function repository of
choice (e.g. Gene Ontology Biological Processes). The
following section describes this process of creating one’s own GPS
repository using the PCI-NCI pathways from National
Cancer Institute as an example.
You can create your own GPS repositories using the
makeGPS() function. There are no particular requirements on
the format of your source repository, except: it should be provided
either a tab delimited file or a data frame with three columns in the
following order:
## pathwayId pathwayName
## 1 pi3kplctrkpathway Trk receptor signaling mediated by PI3K and PLC-gamma
## 2 pi3kplctrkpathway Trk receptor signaling mediated by PI3K and PLC-gamma
## 3 pi3kplctrkpathway Trk receptor signaling mediated by PI3K and PLC-gamma
## 4 pi3kplctrkpathway Trk receptor signaling mediated by PI3K and PLC-gamma
## 5 pi3kplctrkpathway Trk receptor signaling mediated by PI3K and PLC-gamma
## 6 pi3kplctrkpathway Trk receptor signaling mediated by PI3K and PLC-gamma
## gene
## 1 ENSG00000140992
## 2 ENSG00000196689
## 3 ENSG00000142208
## 4 ENSG00000145675
## 5 ENSG00000138741
## 6 ENSG00000152495
## Create a SigObject, using "saveFile" for future reuse
nciH <- makeGPS(pathwayTable = nciTable, saveFile = NULL)## Elapsed: 0.8224277 secs
To preform the SIGORA method, use the function sigora.
For traditional over-representation analysis, use the function
ora. An example of the former with our new GPS is included
below:
## Mapped identifiers from Symbol to Ensembl.Gene.ID...
## pathwy.id description pvalues Bonferroni successes
## 1 il23pathway IL23-mediated signaling events 5.494e-64 1.049e-61 36.27
## 2 il27pathway IL27-mediated signaling events 3.164e-34 6.043e-32 18.14
## 3 il12_2pathway IL12-mediated signaling events 3.188e-12 6.089e-10 13.20
## 4 il1pathway IL1-mediated signaling events 1.115e-09 2.130e-07 8.42
## 5 il4_2pathway IL4-mediated signaling events 1.070e-05 2.044e-03 9.03
## PathwaySize N sample.size
## 1 172.95 46257.95 93.08
## 2 65.51 46257.95 93.08
## 3 420.16 46257.95 93.08
## 4 156.05 46257.95 93.08
## 5 687.89 46257.95 93.08
Simply provide a file name to the saveFile parameter of
sigora, i.e. (for the above experiment):
## pathwy.id description pvalues Bonferroni successes
## 1 hsa04218 Cellular senescence 1.669e-108 5.090e-106 56.68
## 2 hsa00590 Arachidonic acid metabolism 3.125e-41 9.531e-39 21.83
## PathwaySize N sample.size
## 1 2037.98 452219.2 87.58
## 2 606.97 452219.2 87.58
You will notice that the file also contains the list of the relevant genes from the query list in each pathway. The genes are listed as human readable gene symbols and sorted by their contribution to the statistical significance of the pathway.
Mappings between ENSEMBL IDs, ENTREZ IDs and Gene Symbols are performed automatically.
You can, for instance, create a GPS repository using ENSEMBL IDs and perform Signature Overrepresentation Analysis using this repository on a list of ENTREZ IDs.
data(kegH, idmap)
barplot(
table(kegH$L1$degs),
col = "red",
main = "functions per gene in KEGG human pathways",
ylab = "frequency",
xlab = "number of functions per gene"
)## Elapsed: 0.8099508 secs
ils <- grep(
"^IL", idmap[, "Symbol"], value = TRUE
)
## Signature over-representation analysis
sigRes.ilnci <- sigora(
queryList = ils, GPSrepo = nciH, level = 3
)## Mapped identifiers from Symbol to Ensembl.Gene.ID...
## pathwy.id description pvalues Bonferroni successes
## 1 il23pathway IL23-mediated signaling events 5.494e-64 1.049e-61 36.27
## 2 il27pathway IL27-mediated signaling events 3.164e-34 6.043e-32 18.14
## 3 il12_2pathway IL12-mediated signaling events 3.188e-12 6.089e-10 13.20
## 4 il1pathway IL1-mediated signaling events 1.115e-09 2.130e-07 8.42
## 5 il4_2pathway IL4-mediated signaling events 1.070e-05 2.044e-03 9.03
## PathwaySize N sample.size
## 1 172.95 46257.95 93.08
## 2 65.51 46257.95 93.08
## 3 420.16 46257.95 93.08
## 4 156.05 46257.95 93.08
## 5 687.89 46257.95 93.08
## R version 4.6.1 (2026-06-24)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 26.04.1 LTS
##
## Matrix products: default
## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.32.so; LAPACK version 3.12.0
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## time zone: Etc/UTC
## tzcode source: system (glibc)
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] sigora_3.3.18
##
## loaded via a namespace (and not attached):
## [1] digest_0.6.39 R6_2.6.1 fastmap_1.2.0 xfun_0.62
## [5] maketools_1.3.2 cachem_1.1.0 knitr_1.52 htmltools_0.5.9
## [9] rmarkdown_2.32 buildtools_1.0.0 lifecycle_1.0.5 cli_3.6.6
## [13] sass_0.4.10 jquerylib_0.1.4 slam_0.1-56 compiler_4.6.1
## [17] sys_3.4.3 tools_4.6.1 evaluate_1.0.5 bslib_0.12.0
## [21] yaml_2.3.12 otel_0.2.0 jsonlite_2.0.0 rlang_1.3.0