14  MeSH enrichment analysis

The meshes package (Yu 2018) supports enrichment analysis (over-representation analysis and gene set enrichment analysis) of gene list or whole expression profile using MeSH annotation. Data source from gendoo, gene2pubmed and RBBH are all supported. User can select interesting category to test. All 16 categories of MeSH are supported. The analysis supports about 200 species (see also Chapter 23 for more details).

14.1 Chapter overview

Aspect MeSH enrichment
Questions Which MeSH concepts/categories associate with a gene set or are enriched across a ranked profile?
Input A gene vector or ranked vector, species-specific MeSHDb, and a source such as gendoo, gene2pubmed, or RBBH.
Methods ORA and GSEA with selectable MeSH category and data source.
Main functions enrichMeSH(), gseMeSH(); semantic comparisons use the meshes similarity functions.
Output enrichResult / gseaResult objects for downstream plotting and comparison.
Main limitations Results depend on database preparation, source, species coverage, and ID mapping; the same concepts may differ across sources.

14.2 MeSH over-representation analysis

First, we need to load/fetch species-specific MeSH annotation database, please refer to Chapter 23.

In this example, we use data source from gendoo and C (Diseases) category.

library(meshes)
data(geneList, package="DOSE")
de <- names(geneList)[1:100]
x <- enrichMeSH(de, MeSHDb = db, database='gendoo', category = 'C')
head(x)
             ID            Description GeneRatio   BgRatio RichFactor
D000705 D000705               Anaphase    26/100 232/26076 0.11206897
D019926 D019926               Cyclin B    30/100 428/26076 0.07009346
D018386 D018386           Kinetochores    24/100 224/26076 0.10714286
D020090 D020090 Chromosome Segregation    26/100 362/26076 0.07182320
D011123 D011123             Polyploidy    16/100 169/26076 0.09467456
D016547 D016547               Kinesins    22/100 476/26076 0.04621849
        FoldEnrichment oddsRatio   zScore       pvalue     p.adjust
D000705       29.22310  43.95303 26.79137 4.495523e-31 2.036472e-27
D019926       18.27757  27.54271 22.36165 1.061989e-29 2.405404e-26
D018386       27.93857  40.69895 25.12335 3.337217e-28 5.039198e-25
D020090       18.72862  26.81145 21.07514 5.663108e-26 6.413470e-23
D011123       24.68734  32.14815 19.16801 3.951760e-18 3.580295e-15
D016547       12.05193  15.85576 15.09898 6.849607e-18 5.171453e-15
              qvalue
D000705 1.360487e-27
D019926 1.606957e-26
D018386 3.366491e-25
D020090 4.284588e-23
D011123 2.391855e-15
D016547 3.454845e-15
                                                                                                                                                             geneID
D000705                    4085/991/54821/3832/6790/22974/983/9133/332/4751/81930/55165/10232/11065/2305/1111/6241/9055/220134/9493/7153/9212/7272/10112/1062/10403
D019926 4085/991/3832/6790/5080/22974/983/83461/9133/332/10232/11065/55872/8208/2305/3868/1111/23397/9055/9493/7153/890/4605/64151/7272/10112/1062/9787/81620/10403
D018386                             4085/991/55839/54821/3832/79019/6790/22974/983/332/4751/81930/11065/55143/1111/9055/220134/7153/9212/7272/1062/9787/10460/10403
D020090                   4085/991/55839/51203/54821/79019/6790/22974/983/9133/332/4751/81930/11065/55143/2305/1111/9493/7153/64151/9212/7272/1062/9787/10460/10403
D011123                                                                             4085/991/6790/9133/332/10232/55143/2305/1111/9493/7153/890/4605/9212/1062/81620
D016547                                        4085/3832/6790/22974/3833/983/332/81930/146909/55143/2305/1111/23397/9055/9493/7153/64151/9212/10112/1062/9787/10403
        Count
D000705    26
D019926    30
D018386    24
D020090    26
D011123    16
D016547    22

14.3 MeSH gene set enrichment analysis

In the following example, we use data source from gene2pubmed and test category G (Phenomena and Processes).

y <- gseMeSH(geneList, MeSHDb = db, database = 'gene2pubmed', category = "G")
head(y)
             ID                Description setSize enrichmentScore      NES
D000705 D000705                   Anaphase     208       0.6734042 3.001720
D018386 D018386               Kinetochores     194       0.6293151 2.839466
D051738 D051738 Origin Recognition Complex      65       0.7215645 2.687916
D019926 D019926                   Cyclin B     399       0.5417028 2.610667
D049468 D049468               Prometaphase      26       0.8614331 2.608087
D011123 D011123                 Polyploidy     160       0.5966375 2.595049
        pvalue     p.adjust       qvalue rank                   leading_edge
D000705  1e-10 1.916604e-08 8.869359e-09 1071  tags=35%, list=9%, signal=33%
D018386  1e-10 1.916604e-08 8.869359e-09  759  tags=26%, list=6%, signal=25%
D051738  1e-10 1.916604e-08 8.869359e-09 1077  tags=45%, list=9%, signal=41%
D019926  1e-10 1.916604e-08 8.869359e-09 1499 tags=30%, list=12%, signal=27%
D049468  1e-10 1.916604e-08 8.869359e-09  370  tags=54%, list=3%, signal=52%
D011123  1e-10 1.916604e-08 8.869359e-09 1077  tags=31%, list=9%, signal=29%
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       core_enrichment
D000705                                                                                                                                                                                                                                    991/2305/9493/1062/9133/10403/7153/6241/55165/11065/220134/22974/4751/983/54821/10232/4085/81930/332/3832/7272/9212/1111/9055/10112/6790/891/24137/9232/1164/11004/990/5347/29127/701/11130/57405/1894/9700/5888/56992/4998/10733/29899/699/4609/1063/5111/5688/5709/26271/55055/51053/641/5698/1719/3925/5693/8317/5713/3930/5721/5691/10051/5685/8568/4172/23481/5690/5684/5885/5686/5695
D018386                                                                                                                                                                                                                                                                                                                                               55143/991/1062/10403/7153/9787/11065/220134/22974/10460/4751/79019/55839/983/54821/4085/81930/332/3832/7272/9212/1111/9055/6790/891/11004/5347/29127/701/11130/79682/57405/10615/1894/2491/9700/5888/23594/54801/29899/1058/11135/699/6491/1063/55055/8317/4112/10036/79980/9735
D051738                                                                                                                                                                                                                                                                                                                                                                                                                                                                          8318/55388/890/81620/1111/4174/4171/990/5347/898/23594/4998/4175/4173/10926/6502/4609/5111/84823/51053/1869/1719/8317/5427/4176/10036/1019/4172/11200
D019926 991/2305/9493/1062/3868/4605/9133/10403/7153/23397/9787/11065/55872/83461/22974/890/983/10232/4085/5080/81620/332/3832/7272/64151/8208/1111/9055/10112/6790/891/24137/9232/4001/4171/1164/11004/993/990/5347/701/1894/9700/5888/7083/898/56992/4998/4288/10733/1163/9134/4173/6502/6772/994/9918/699/4609/3945/1063/5111/5688/84823/5709/26271/51053/1869/330/1029/5698/4904/4067/5693/5902/7032/430/5713/10036/9585/1302/5721/2810/5691/5499/578/9088/1116/995/10051/867/5685/1019/2597/8568/2023/5690/5684/5885/5686/5695/11200/10263/10213/10059/4839/3195/6873/7534/1476/5588/10592/63967/7164/999/1020/5699/899/5714/1994
D049468                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         55143/991/1062/10403/4085/1111/5347/29127/701/79682/1894/9700/699/4609
D011123                                                                                                                                                                                                                                                                                                                                                                         55143/991/2305/9493/1062/4605/9133/7153/890/10232/4085/81620/332/9212/1111/6790/891/9232/990/5347/701/9700/5888/898/23594/4998/6502/2537/6772/1058/699/4609/5111/10397/26271/51053/1869/1719/4830/3925/2821/9585/2810/2120/353/58/2956/1019/2539/11200
        log2err
D000705     NaN
D018386     NaN
D051738     NaN
D019926     NaN
D049468     NaN
D011123     NaN

Users can use visualization methods implemented in enrichplot to visualize these enrichment results. With these visualization methods, see also Chapter 26, it’s much easier to interpret enriched results.

14.4 Next steps

References

Yu, Guangchuang. 2018. “Using Meshes for MeSH Term Enrichment and Semantic Analyses.” Bioinformatics 34 (21): 3766–67. https://doi.org/10.1093/bioinformatics/bty410.