11 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 4 for more details).

11.1 MeSH over-representation analysis

First, we need to load/fetch species-specific MeSH annotation database:

#############################
## BioC 2.14 to BioC 3.13  ##
#############################
##
## library(MeSH.Hsa.eg.db)
## db <- MeSH.Hsa.eg.db
##
##---------------------------

# From BioC 3.14 (Nov. 2021, with R-4.2.0)
library(AnnotationHub)
library(MeSHDbi)
ah <- AnnotationHub(localHub=TRUE)
hsa <- query(ah, c("MeSHDb", "Homo sapiens"))
file_hsa <- hsa[[1]]
db <- MeSHDbi::MeSHDb(file_hsa)

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       pvalue
## D000705 D000705               Anaphase    26/100 232/26076 4.495523e-31
## D019926 D019926               Cyclin B    30/100 428/26076 1.061989e-29
## D018386 D018386           Kinetochores    24/100 224/26076 3.337217e-28
## D020090 D020090 Chromosome Segregation    26/100 362/26076 5.663108e-26
## D011123 D011123             Polyploidy    16/100 169/26076 3.951760e-18
## D016547 D016547                   <NA>    22/100 476/26076 6.849607e-18
##             p.adjust       qvalue
## D000705 2.036472e-27 1.360487e-27
## D019926 2.405404e-26 1.606957e-26
## D018386 5.039198e-25 3.366491e-25
## D020090 6.413470e-23 4.284588e-23
## D011123 3.580295e-15 2.391855e-15
## D016547 5.171453e-15 3.454845e-15
##                                                                                                                                                              geneID
## 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
## 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
## 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
## D020090                   55143/991/2305/9493/1062/9133/10403/7153/9787/11065/51203/22974/10460/4751/79019/55839/983/54821/4085/81930/332/7272/64151/9212/1111/6790
## D011123                                                                             55143/991/2305/9493/1062/4605/9133/7153/890/10232/4085/81620/332/9212/1111/6790
## D016547                                        55143/2305/9493/1062/10403/7153/23397/9787/22974/983/4085/81930/332/3832/64151/9212/1111/9055/3833/146909/10112/6790
##         Count
## D000705    26
## D019926    30
## D018386    24
## D020090    26
## D011123    16
## D016547    22

11.2 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.6734041 3.051544
## D000917 D000917          Antibody Formation     423       0.3867818 1.890781
## D000938 D000938    Antigen-Presenting Cells     368       0.4324886 2.100038
## D002842 D002842                  Chromatids     119       0.5955590 2.518940
## D004250 D004250 DNA Topoisomerases, Type II     230       0.4663823 2.136691
## D004271 D004271                 DNA, Fungal     255       0.4894945 2.286548
##         pvalue     p.adjust      qvalues rank                   leading_edge
## D000705  1e-10 1.953462e-08 1.552429e-08 1071  tags=35%, list=9%, signal=33%
## D000917  1e-10 1.953462e-08 1.552429e-08 2101 tags=33%, list=17%, signal=28%
## D000938  1e-10 1.953462e-08 1.552429e-08 2111 tags=36%, list=17%, signal=30%
## D002842  1e-10 1.953462e-08 1.552429e-08 1804 tags=35%, list=14%, signal=30%
## D004250  1e-10 1.953462e-08 1.552429e-08 1815 tags=30%, list=15%, signal=27%
## D004271  1e-10 1.953462e-08 1.552429e-08 1447 tags=24%, list=12%, signal=22%
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         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
## D000917 7153/10563/10232/332/6286/3002/891/6364/3161/29851/4102/2173/9156/6890/56992/952/1493/7037/10663/80380/7378/5551/133/768/1230/6772/6347/30848/639/914/3126/3112/4609/3945/3001/8000/3561/5111/6614/917/6472/1236/362/1719/3575/919/915/4067/608/3458/959/3903/1043/3702/925/5450/3351/50615/974/942/4100/8547/91860/578/3329/3514/1116/4072/2597/1234/916/7096/3383/4068/962/8884/5806/1514/100/3659/2919/3929/971/1476/10541/939/4678/3965/6891/9308/7422/930/5992/7439/26191/6504/117178/4282/6850/2395/7124/912/7783/5329/3569/7097/613/1410/5133/5743/7454/348/4151/3091/3119/5817/1133/551/1956/1830/7186/2213/5971/7490/8456/1959/2650/60489/6376/9021/3596/79444/7293/23415/2833/1080/356/1380/958/64663
## D000938                                   3627/4283/10232/6362/332/3002/3902/3620/10578/6364/23532/3595/4102/4061/3576/6890/952/8792/1493/6352/7804/7037/56833/3932/80380/5551/3559/1230/6772/51311/6347/30848/914/64581/3126/3112/10437/3945/5341/3561/2533/6351/6614/1236/10859/9332/3654/5698/1719/4050/919/4067/11184/3458/1520/959/3930/3702/5641/942/4100/1116/10288/6361/5788/976/916/7096/259197/3383/9466/4068/962/3937/6367/3394/1834/1514/3600/23457/923/940/3929/4793/971/4063/6360/9051/5588/6891/9308/81622/10148/6404/3738/5699/5047/929/4690/5604/7124/912/3569/7097/1378/613/5133/8772/5743/4055/7454/348/4151/3119/5817/951/1240/8440/2213/5971/3135/9047/6376/56915/9021/7293/2833/4478/356/958/1672
## D002842                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           991/1062/7153/55165/11065/10635/983/54821/4085/332/9212/1111/9232/1164/5347/701/10615/79075/9700/5888/2237/5984/699/5111/9401/1719/5982/9735/10051/5885/203068/100/5983/10592/4683/999/3014/3619/7454/10393/1663/7517
## D004250                                                                                                                                                                                                                                                                                                                                                     1062/7153/23397/983/54821/4085/81620/332/9212/1111/4174/4171/993/990/5347/9700/5888/23594/4998/3934/4175/4173/9918/699/50802/4609/5111/84823/641/1869/1029/1719/4904/4067/2178/7086/4176/2950/9585/4436/3066/578/995/1104/1019/637/5359/4172/916/5885/11200/1633/7027/2072/4839/10592/1244/142/23028/5160/3014/7124/5329/3619/10096/613/8772/5743/3091/9513
## D004271                                                                                                                                                                                                                                                                                                                                                                                       8318/55388/1062/7153/81620/51659/1111/4174/4171/993/990/2173/9156/9700/5888/23594/4998/4175/4173/2237/10926/5984/699/5341/5111/64785/641/1869/10535/1719/4904/8317/4938/4176/80142/10036/5435/5982/5499/30001/578/995/1104/2597/4172/5479/10606/11200/7428/1317/2072/5831/4839/80010/4360/5440/79924/4683/81034/63967/999

User can use visualization methods implemented in enrichplot to visualize these enrichment results. With these visualization methods, itโ€™s much easier to interpret enriched results.