-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy path11_meshes_enrichment.Rmd
61 lines (37 loc) · 1.69 KB
/
11_meshes_enrichment.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# MeSH enrichment analysis {#meshes-enrichment}
The `r Biocpkg("meshes")` package [@yu_meshes_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](#meshes-semantic-similarity) for more details).
## MeSH over-representation analysis {#meshes-ora}
First, we need to load/fetch species-specific MeSH annotation database:
```{r meshdb, warning=FALSE, cache=TRUE, eval=FALSE}
```
In this example, we use data source from `gendoo` and `C` (Diseases) category.
```{r enrichmesh, cache=TRUE, eval=FALSE}
library(meshes)
data(geneList, package="DOSE")
de <- names(geneList)[1:100]
x <- enrichMeSH(de, MeSHDb = db, database='gendoo', category = 'C')
```
```{r echo=FALSE}
## saveRDS(x, file="cache/enrichMeSH.rds")
x <- readRDS("cache/enrichMeSH.rds")
```
```{r}
head(x)
```
## MeSH gene set enrichment analysis {#meshes-gsea}
In the following example, we use data source from `gene2pubmed` and test category `G` (Phenomena and Processes).
```{r gsemesh, cache=TRUE, eval=FALSE}
y <- gseMeSH(geneList, MeSHDb = db, database = 'gene2pubmed', category = "G")
```
```{r echo=FALSE}
## saveRDS(y, file="cache/gseMeSH.rds")
y <- readRDS("cache/gseMeSH.rds")
```
```{r}
head(y)
```
User can use visualization methods implemented in `r Biocpkg("enrichplot")` to visualize these enrichment results. With [these visualization methods](#enrichplot), it's much easier to interpret enriched results.