-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathKEGG.rmd
60 lines (45 loc) · 1.63 KB
/
KEGG.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
## KEGG enrichment with DAVID
```{r results='hide', message=F}
require(magrittr)
require(DOSE)
require(RDAVIDWebService)
require(clusterProfiler)
```
```{r eval=F}
load("cache/gene.rda")
david_KEGG <- enrichDAVID(gene, idType="ENSEMBL_GENE_ID", annotation="KEGG_PATHWAY", david.user="[email protected]")
```
```{r echo=F}
load("cache/david_KEGG.rda")
```
```{r fig.width=7, fig.height=7, fig.align='center'}
summary(david_KEGG)[, -8]
```
Ribosome is the only term reported by DAVID consistent with the result reported in the supplemental file.
## KEGG enrichment with clusterProfiler
```{r eval=F}
eg=bitr(gene, "ENSEMBL", "ENTREZID", "org.Hs.eg.db")[, "ENTREZID"]
clusterProfiler_KEGG <- enrichKEGG(eg)
```
```{r echo=F}
load("cache/clusterProfiler_KEGG.rda")
```
```{r fig.width=10, fig.height=10}
dim(summary(clusterProfiler_KEGG))
head(summary(clusterProfiler_KEGG)[, -8])
dotplot(clusterProfiler_KEGG, showCategory=9)
```
## Compare KEGG enrichment result obtained from DAVID and clusterProfiler
```{r fig.width=10, fig.height=10}
merge_result(list(david=david_KEGG, clusterProfiler=clusterProfiler_KEGG)) %>%
plot(., showCategory=10)
```
+ DAVID's KEGG annotate 5085 genes in background while clusterProfiler use latest online version that annotate 6895 genes.
+ DAVID only annotate 83 genes, while clusterProfiler can annotate 104 genes of the gene list with 212 genes in total.
+ DAVID enrich `r nrow(summary(david_KEGG))` KEGG terms, while clusterProfiler enrich `r nrow(summary(clusterProfiler_KEGG))` KEGG terms.
+ All enriched terms reported in DAVID were also reported by clusterProfiler.
## Session info
```{r}
date()
sessionInfo()
```