13  Disease enrichment analysis

We developed DOSE (Yu et al. 2015) package to promote the investigation of diseases. DOSE provides five methods for measuring semantic similarities among DO terms and gene products, hypergeometric model and gene set enrichment analysis (GSEA) for associating disease with gene list and extracting disease association insight from genome wide expression profiles.

13.1 Chapter overview

Aspect Disease and phenotype enrichment
Questions Are selected genes associated with disease/phenotype terms, or are disease gene sets enriched across a ranked profile?
Input Entrez IDs for ORA or a named ranked vector for GSEA; choose HDO, HPO, or MPO as appropriate.
Methods Disease Ontology and phenotype ORA/GSEA, plus Network of Cancer Gene enrichment.
Main functions enrichDO(), gseDO(), enrichNCG(), gseNCG().
Output enrichResult / gseaResult objects for filtering, comparison, and visualization.
Main limitations Interpretation depends on ontology and annotation coverage; NCG is a separately curated resource. Keep organism, ID type, universe, and ontology explicit.

13.2 Disease over-representation analysis

DOSE supports enrichment analysis of Disease Ontology (DO) (Schriml et al. 2011) and Network of Cancer Gene (An et al. 2016). NCG has not been updated since release 5.0, so enrichment results against it should be read as a historical resource. In addition, several visualization methods were provided by enrichplot to help interpreting semantic and enrichment results.

13.2.1 Over-representation analysis for disease ontology

In the following example, we selected genes with fold change above 1.5 as the differential genes and analyzed their disease association.

library(DOSE)
data(geneList)
gene <- names(geneList)[abs(geneList) > 1.5]
head(gene)
[1] "4312"  "8318"  "10874" "55143" "55388" "991"  
x <- enrichDO(gene          = gene,
              ont           = "HDO",
              pvalueCutoff  = 0.05,
              pAdjustMethod = "BH",
              universe      = names(geneList),
              minGSSize     = 5,
              maxGSSize     = 500,
              qvalueCutoff  = 0.05,
              readable      = FALSE)
head(x)
                       ID              Description GeneRatio  BgRatio
DOID:0060306 DOID:0060306    Meier-Gorlin syndrome     6/279  10/6288
DOID:10534     DOID:10534           stomach cancer    25/279 210/6288
DOID:5041       DOID:5041        esophageal cancer    18/279 132/6288
DOID:820         DOID:820              myocarditis     8/279  31/6288
DOID:1107       DOID:1107     esophageal carcinoma    16/279 117/6288
DOID:2799       DOID:2799 bronchiolitis obliterans     7/279  25/6288
             RichFactor FoldEnrichment oddsRatio   zScore       pvalue
DOID:0060306  0.6000000      13.522581 32.994505 8.538978 1.307449e-06
DOID:10534    0.1190476       2.683052  3.098532 5.345022 5.198449e-06
DOID:5041     0.1363636       3.073314  3.566243 5.187110 1.810709e-05
DOID:820      0.2580645       5.816164  7.682978 5.791909 4.392110e-05
DOID:1107     0.1367521       3.082070  3.558634 4.898162 5.136435e-05
DOID:2799     0.2800000       6.310538  8.565564 5.732447 7.575017e-05
                p.adjust       qvalue
DOID:0060306 0.001215927 0.0001883906
DOID:10534   0.002417279 0.0003745230
DOID:5041    0.005613199 0.0008696854
DOID:820     0.009553770 0.0014802208
DOID:1107    0.009553770 0.0014802208
DOID:2799    0.010484098 0.0016243620
                                                                                                                                       geneID
DOID:0060306                                                                                                   8318/81620/4174/990/23594/4998
DOID:10534   4312/2305/10403/259266/8140/81930/332/2146/8061/4318/3576/8792/6352/4288/3131/2952/347902/3572/563/7031/6926/3117/2018/2066/3169
DOID:5041                                            4312/3868/8140/7850/2146/4321/2921/4318/3576/6890/2952/563/7373/771/2018/2066/3169/11122
DOID:820                                                                                             6280/6279/3627/29851/8792/1493/2697/4982
DOID:1107                                                      4312/3868/8140/2146/4321/4318/3576/6890/2952/563/7373/771/2018/2066/3169/11122
DOID:2799                                                                                                  3627/6373/4283/3002/4318/6352/4582
             Count
DOID:0060306     6
DOID:10534      25
DOID:5041       18
DOID:820         8
DOID:1107       16
DOID:2799        7

The enrichDO() function requires an entrezgene ID vector as input, which is mostly the differential gene list from gene expression profile studies. Please refer to Section 18.1 if you need to convert other gene ID types to entrezgene ID.

The ont parameter can be “HDO” (Human Disease Ontology), “HPO” (Human Phenotype Ontology) or “MPO” (Mouse Phenotype Ontology). pvalueCutoff setting the cutoff value of p value and adjusted p value; pAdjustMethod setting the p value correction methods, include the Bonferroni correction (“bonferroni”), Holm (“holm”), Hochberg (“hochberg”), Hommel (“hommel”), Benjamini & Hochberg (“BH”) and Benjamini & Yekutieli (“BY”) while qvalueCutoff is used to control q-values.

The universe sets the background gene universe for testing. If users do not explicitly set this parameter, enrichDO() will set the universe to all human genes that have DO annotation.

The minGSSize (and maxGSSize) indicate that only those DO terms whose overlap with the provided universe has size in [minGSSize, maxGSSize] are tested. When no universe is set, enrichDO() uses all annotated genes as the background, so the bound applies to the raw annotation size instead. Pass a character universe to use the overlap rule; this matches the GO enrichment behavior described in Tuning minGSSize and maxGSSize; to disable the upper cap, set maxGSSize = Inf.

The readable is a logical parameter that indicates whether the entrezgene IDs will be mapped to gene symbols or not, see also Section 18.2.

13.2.2 Over-representation analysis for the network of cancer gene

Network of Cancer Gene (NCG) (An et al. 2016) is a manually curated repository of cancer genes. NCG release 5.0 (Aug. 2015) collects 1,571 cancer genes from 175 published studies. The database has not been updated since that release, so the genes it contributes should be read as a historical snapshot rather than a current cancer gene census. DOSE supports analyzing gene list and determine whether they are enriched in genes known to be mutated in a given cancer type.

NCG is a remote service served by the KCL group and can fail transiently, so the calls in this chapter are wrapped in the retry() helper defined in _common.R; readers who prefer a single attempt can simply drop the wrapper in their own analysis.

gene2 <- names(geneList)[abs(geneList) > 3]
ncg <- retry(enrichNCG(gene2))
head(ncg)
 [1] ID             Description    GeneRatio      BgRatio        RichFactor    
 [6] FoldEnrichment oddsRatio      zScore         pvalue         p.adjust      
[11] qvalue         geneID         Count         
<0 rows> (or 0-length row.names)

13.2.3 DisGeNET support has been removed

enrichDGN(), enrichDGNv() and gseDGN() no longer exist. DOSE used to provide over-representation and GSEA against DisGeNET (Piñero et al. 2015), an integrative resource of gene-disease associations. DisGeNET changed its licence from CC BY-NC-SA to a proprietary one, so the data can no longer be redistributed with the package, and the functions and their bundled datasets were removed in DOSE 4.7.0 (June 2026).

If you have code calling them, use the Disease Ontology route instead:

## over-representation
x <- enrichDO(gene, ont = "HDO")

## GSEA
y <- gseDO(geneList, ont = "HDO")

ont = "HDO" is the human Disease Ontology and is the default. This is a genuine change of data source: DO annotates genes to disease terms, whereas DisGeNET aggregated gene-disease associations from several sources, so the results are not interchangeable. DisGeNET itself is still available for direct download from its own website under its current terms.

13.3 Disease gene set enrichment analysis

13.3.1 gseDO function

In the following example, in order to speed up the compilation of this document, only gene sets with size above 120 were tested and only 100 permutations were performed.

library(DOSE)
data(geneList)
y <- gseDO(geneList,
           minGSSize     = 120,
           pvalueCutoff  = 0.2,
           pAdjustMethod = "BH",
           verbose       = FALSE)
head(y, 3)
                       ID                          Description setSize
DOID:612         DOID:612     primary immunodeficiency disease     236
DOID:0050338 DOID:0050338 primary bacterial infectious disease     125
DOID:0080599 DOID:0080599       Coronavirus infectious disease     137
             enrichmentScore      NES       pvalue     p.adjust       qvalue
DOID:612           0.4516799 2.064718 1.379359e-10 2.234561e-08 1.306761e-08
DOID:0050338       0.4377124 1.821599 1.555252e-05 5.444475e-04 3.183903e-04
DOID:0080599       0.4190428 1.799325 3.696041e-05 7.484483e-04 4.376891e-04
             rank                   leading_edge
DOID:612     2521 tags=43%, list=20%, signal=35%
DOID:0050338 1864 tags=38%, list=15%, signal=32%
DOID:0080599 1146  tags=24%, list=9%, signal=22%
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            core_enrichment
DOID:612     55388/7153/9837/29851/9636/1503/1493/7037/4173/3932/3559/6772/51311/3507/3561/917/3654/3574/3575/919/4860/915/22806/5693/4938/1535/3458/959/5336/11151/3702/925/4688/64135/28755/50615/974/1794/3689/5788/5424/916/7096/4068/3937/30009/5695/3394/10525/100/7374/3659/940/939/4689/5880/7128/6891/4210/6789/5699/930/6573/11322/204/6850/10095/7124/3569/7097/7852/8772/5692/64170/3119/1956/28985/1053/5971/1536/10125/8456/8625/3071/7293/4478/1380/958/5054/5591/9437/10379/54440/3570/3978/3593/10625/29927/3558/51371/735
DOID:0050338                                                                                                                                                                                                                                                                                     8685/3627/4283/3620/6364/4318/3576/6890/6352/54210/80380/6772/51311/6347/9332/3654/1535/3458/959/1594/942/1557/9235/1234/467/7096/6367/100/3600/6696/3549/6891/929/26191/4282/7124/912/5329/3569/4049/7097/56244/50506/5133/1118/3119/1956
DOID:0080599                                                                                                                                                                                                                                                                                                                                                            4312/6279/3627/4283/3002/6355/2921/3576/6352/3934/59272/713/3559/1230/6772/51311/6347/3561/6351/6590/3574/6354/3458/1520/4783/925/1991/1234/916/6374/1514/1088/2919
               log2err
DOID:612     0.8266573
DOID:0050338 0.5756103
DOID:0080599 0.5573322

13.3.2 gseNCG function

ncg <- retry(gseNCG(geneList,
                    pvalueCutoff  = 0.5,
                    pAdjustMethod = "BH",
                    verbose       = FALSE))
ncg <- setReadable(ncg, 'org.Hs.eg.db')
head(ncg, 3) 
                                                           ID
pan-gynecological and breast     pan-gynecological and breast
breast_fibroepithelial_tumours breast_fibroepithelial_tumours
pan-gastric                                       pan-gastric
                                                  Description setSize
pan-gynecological and breast     pan-gynecological and breast      43
breast_fibroepithelial_tumours breast_fibroepithelial_tumours      17
pan-gastric                                       pan-gastric      49
                               enrichmentScore       NES      pvalue  p.adjust
pan-gynecological and breast        -0.5263429 -1.678271 0.003781255 0.1640769
breast_fibroepithelial_tumours      -0.6421578 -1.662979 0.010655047 0.2157647
pan-gastric                         -0.4993799 -1.649388 0.004051281 0.1640769
                                   qvalue rank                   leading_edge
pan-gynecological and breast   0.09753237 2464 tags=40%, list=20%, signal=32%
breast_fibroepithelial_tumours 0.12825722 2700 tags=53%, list=22%, signal=42%
pan-gastric                    0.09753237 3280 tags=49%, list=26%, signal=36%
                                                                                                                                                              core_enrichment
pan-gynecological and breast                                            NIPBL/SPOP/ARID1A/RASA1/RB1/RNF43/MAP2K4/NF1/CTNNB1/TP53/PIK3R1/CDKN1B/CCND1/ARID5B/MAP3K1/TBX3/GATA3
breast_fibroepithelial_tumours                                                                                               SETD2/RB1/PCNX4/NF1/TP53/RARA/SYNE1/MAP3K1/ERBB4
pan-gastric                    BCOR/SOX9/TCF7L2/ATM/CALD1/SEMG2/HTR7/ARID1A/RASA1/RB1/TTBK2/RNF43/CTNNB1/TP53/BCL9/SMAD3/APC/ZFP36L2/TGFBR2/MUC6/MAP3K1/CACNA1C/ATP8B1/CYP4B1
                                 log2err
pan-gynecological and breast   0.4317077
breast_fibroepithelial_tumours 0.3807304
pan-gastric                    0.4070179

13.4 Next steps

References

An, Omer, Giovanni M. Dall’Olio, Thanos P. Mourikis, and Francesca D. Ciccarelli. 2016. “NCG 5.0: Updates of a Manually Curated Repository of Cancer Genes and Associated Properties from Cancer Mutational Screenings.” Nucleic Acids Research 44 (D1): D992–99. https://doi.org/10.1093/nar/gkv1123.
Piñero, Janet, Núria Queralt-Rosinach, Àlex Bravo, et al. 2015. “DisGeNET: A Discovery Platform for the Dynamical Exploration of Human Diseases and Their Genes.” Database 2015 (March): bav028. https://doi.org/10.1093/database/bav028.
Schriml, L. M., C. Arze, S. Nadendla, et al. 2011. “Disease Ontology: A Backbone for Disease Semantic Integration.” Nucleic Acids Research 40 (D1): D940–46. https://doi.org/10.1093/nar/gkr972.
Yu, Guangchuang, Li-Gen Wang, Guang-Rong Yan, and Qing-Yu He. 2015. “DOSE: An r/Bioconductor Package for Disease Ontology Semantic and Enrichment Analysis.” Bioinformatics 31 (4): 608–9. https://doi.org/10.1093/bioinformatics/btu684.