Introduction

After DE analysis, functional enrichment analysis is often performed to interpret the results.

DEbPeak provides two kinds of functional enrichment analysis based on clusterProfiler for peak-related data:

  • Gene ontology (GO) analysis with DA peak binding genes
  • Kyoto Encyclopedia of Genes and Genomes (KEGG) pathway enrichment analysis with DA peak binding genes

Gene Set Enrichment Analysis (GSEA) is not available for peak-related data.


Example data

The data used here are from In vivo CD8+ T cell CRISPR screening reveals control by Fli1 in infection and cancer:

  • RNA-seq data: the sgCtrl vs sgFli1 RNA sequencing at D8 Cl13 p.i., the raw data are stored in GSE149838
  • ATAC-seq data: sgCtrl vs sgFli1 ATAC sequencing at D9 Cl13 p.i., the raw data are stored in GSE149836

Count matrix

The raw data:

# read the raw data
atac.counts = utils::read.table(file = "/home/songyabing/R/learn/tmp/DEbPeak/GSE149836_combUnionReadsWithLabels.txt",
                                sep = "\t", header = T)
head(atac.counts)
##    chr   start     end X290_1_S4 X290_2_S5 X360_1_S6 X360_2_S7 R_1_S2 R_2_S3
## 1 chr1 3131803 3131948         2        15         0         3      4      0
## 2 chr1 3210046 3210121         0         1         0         1      0      0
## 3 chr1 3265577 3265648         3         2         0         8      5      2
## 4 chr1 3345206 3345286         3         2         1         0      2      1
## 5 chr1 3505380 3505504         3         4         0        12      4      2
## 6 chr1 3513642 3513745         0         0         2         3     13      2

To perform analysis (including Quality Control), we need to preprocess the data (row: feature, column: sample):

# read the processed data, the feature is consist of peak region, gene symbol and annotated binding region.
atac.counts.file = system.file("extdata", "RA_ATAC_count.txt", package = "DEbPeak")
atac.counts = utils::read.table(file = atac.counts.file, sep = "\t", header = T)
head(atac.counts)
##                                                    Fli1KO_1 Fli1KO_2 Fli1KO_3
## chr1_GL456211_random:112828-112899|LOC100041034|DI        4        6       14
## chr1_GL456211_random:113055-113190|LOC100041034|DI        7       13       10
## chr1_GL456211_random:147874-147989|LOC100041034|DI       15       16       22
## chr1_GL456211_random:167241-167436|LOC100041034|DI       53       40       43
## chr1_GL456211_random:174677-174747|LOC100041034|I         9        6       17
## chr1_GL456211_random:199244-199444|LOC100041034|DI       23       14       26
##                                                    Fli1KO_4 WT_1 WT_2
## chr1_GL456211_random:112828-112899|LOC100041034|DI       12   10    3
## chr1_GL456211_random:113055-113190|LOC100041034|DI       11   21   31
## chr1_GL456211_random:147874-147989|LOC100041034|DI       14   23   27
## chr1_GL456211_random:167241-167436|LOC100041034|DI       54   39   46
## chr1_GL456211_random:174677-174747|LOC100041034|I         6   14   10
## chr1_GL456211_random:199244-199444|LOC100041034|DI       11   27   46

If you have raw bam files of input/control and treatment samples and sample metadata, DEbPeak provides PeakMatrix to prepare the above count matrix.

Sample metadata

And, we also need the sample metadata:

# read the processed data
atac.meta.file = system.file("extdata", "RA_ATAC_meta.txt", package = "DEbPeak")
atac.meta = utils::read.table(file = atac.meta.file, sep = "\t", header = T)
head(atac.meta)
##          condition
## Fli1KO_1        KO
## Fli1KO_2        KO
## Fli1KO_3        KO
## Fli1KO_4        KO
## WT_1            WT
## WT_2            WT

Create DESeqDataSet

With above data, we can create DESeqDataSet object:

suppressWarnings(suppressMessages(library(DESeq2)))
# create dds
dds.atac <- DESeq2::DESeqDataSetFromMatrix(
  countData = atac.counts, colData = atac.meta,
  design = ~condition
)
## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors

Load packages


Differential Expression Analysis

We will use DESeq2 as example:

# set control level
dds.atac$condition <- relevel(dds.atac$condition, ref = "WT")
# conduct differential expressed genes analysis
dds.atac <- DESeq(dds.atac)
## estimating size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## -- note: fitType='parametric', but the dispersion trend was not well captured by the
##    function: y = a/x + b, and a local regression fit was automatically substituted.
##    specify fitType='local' or 'mean' to avoid this message next time.
## final dispersion estimates
## fitting model and testing
# extract results
dds.atac.results <- results(dds.atac,contrast=c("condition",'KO','WT'))
dds.atac.results.ordered <- dds.atac.results[order(dds.atac.results$log2FoldChange,decreasing = TRUE),]
head(dds.atac.results.ordered)
## log2 fold change (MLE): condition KO vs WT 
## Wald test p-value: condition KO vs WT 
## DataFrame with 6 rows and 6 columns
##                                           baseMean log2FoldChange     lfcSE
##                                          <numeric>      <numeric> <numeric>
## chr8:94825359-94825432|Ciapin1|P          12.10658        6.43921   1.52702
## chr3:105628355-105628501|Ddx20|I          11.18000        6.32317   1.52344
## chr1:118440678-118440831|2900060B14Rik|I   7.83684        5.79091   1.56965
## chr1:165368382-165368517|Dcaf6|I           6.14017        5.43928   1.61963
## chr16:59434969-59435053|Gabrr3|I           5.70677        5.34867   1.63142
## chr11:20780454-20780545|Aftph|DI           5.39047        5.26962   1.63661
##                                               stat      pvalue       padj
##                                          <numeric>   <numeric>  <numeric>
## chr8:94825359-94825432|Ciapin1|P           4.21686 2.47728e-05 0.00126570
## chr3:105628355-105628501|Ddx20|I           4.15058 3.31633e-05 0.00159881
## chr1:118440678-118440831|2900060B14Rik|I   3.68931 2.24864e-04 0.00689256
## chr1:165368382-165368517|Dcaf6|I           3.35834 7.84110e-04 0.01786577
## chr16:59434969-59435053|Gabrr3|I           3.27854 1.04345e-03 0.02191561
## chr11:20780454-20780545|Aftph|DI           3.21985 1.28258e-03 0.02530960

GO enrichment

Different from those in RNA-seq Functional Enrichment Analysis (RNA-seq), we need to use data.type to indicate that the data are from peak-related data, and peak.anno.key to specify the peak binding to which region are used for analysis, available peak.anno.key values are: Promoter, 5' UTR, 3' UTR, Exon, Intron, Downstream, Distal Intergenic, All.

# save results to working directory
# ConductFE(deres = dds.atac.results.ordered, data.type = "ATAC", peak.anno.key = "All", 
#           gene.type = "SYMBOL", signif = "padj", l2fc.threshold = 0, enrich.type = "GO")
# return list of results
all.go.results=ConductFE(deres = dds.atac.results.ordered, data.type = "ATAC", peak.anno.key = "All", 
                         gene.type = "SYMBOL", signif = "padj", l2fc.threshold = 0,enrich.type = "GO",str.width = 50, save = F)

Up regulated genes

Overview

up.go.res=all.go.results[["UP"]][["GO"]]
up.go.res.table=up.go.res[["table"]]
head(up.go.res.table)
##            ONTOLOGY         ID                                Description
## GO:0022407       BP GO:0022407           regulation of cell-cell adhesion
## GO:0045785       BP GO:0045785       positive regulation of cell adhesion
## GO:0050863       BP GO:0050863            regulation of T cell activation
## GO:0007159       BP GO:0007159               leukocyte cell-cell adhesion
## GO:1903037       BP GO:1903037 regulation of leukocyte cell-cell adhesion
## GO:0042098       BP GO:0042098                       T cell proliferation
##            GeneRatio   BgRatio       pvalue     p.adjust       qvalue
## GO:0022407   98/2024 427/23328 1.834990e-19 1.083928e-15 7.992829e-16
## GO:0045785   98/2024 435/23328 7.213431e-19 2.130487e-15 1.571009e-15
## GO:0050863   80/2024 321/23328 2.362160e-18 4.651093e-15 3.429690e-15
## GO:0007159   82/2024 345/23328 1.894198e-17 2.797257e-14 2.062682e-14
## GO:1903037   76/2024 309/23328 3.723402e-17 4.398827e-14 3.243671e-14
## GO:0042098   59/2024 213/23328 3.896259e-16 3.835867e-13 2.828547e-13
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              geneID
## GO:0022407 Malt1/Ubash3b/Myo10/Anxa1/Prkcq/Cd81/Rasgrp1/Blm/Havcr2/Twsg1/Il20rb/Pik3r1/Cd6/Glmn/Ccl5/Nr4a3/Casp3/Cd3e/Ifng/Prkca/Cited2/Dusp10/Zmiz1/Nck1/Peli1/Serpine2/Cdkn2a/Ikzf1/Cd4/Adam19/Mad1l1/Cd44/Ptprc/Il12rb1/Cd28/Slamf1/Cd86/Cd47/Thy1/Vtcn1/Adam8/Tgfbr2/Muc4/Nf2/Ets1/Cd244a/Mbp/Runx3/Card11/Ccl28/Nfat5/Rhoh/Il2/Prkcz/Zfp608/Pag1/Runx1/Notch1/Cd80/Abl1/Tnfaip3/Itgb2/Aif1/Akna/Ptafr/Dusp22/Nfkbiz/Ccr2/Il6/Lck/Tnfaip8l2/Itgal/Lgals3/Cyld/Rdx/Piezo1/Ndfip1/Ptpn22/Zc3h12a/Coro1a/Tnfrsf14/Cdh1/Egr3/Jak1/Trpv4/Ctla4/Nck2/Adora2a/Il21/Cblb/Itpkb/Src/Rgcc/Gata3/Magi2/Cyrib/Il6st/Nckap1l
## GO:0045785                 Malt1/Itgav/Myo10/Anxa1/Prkcq/Cd81/Braf/Rasgrp1/Itga2/Blm/Havcr2/Crkl/Cd6/Nedd9/Ccl5/Nr4a3/Cd3e/Nrp1/Cdk6/Ifng/Prkca/Rin2/Cited2/Dusp10/Zmiz1/Nck1/Rac1/Ikzf1/Cd4/Adam19/Cd44/Ptprc/Il12rb1/Cd28/Slamf1/Cd86/Cd47/Thy1/Ptk2b/Lims1/Atm/Vtcn1/Adam8/Tgfbr2/Ets1/Cd244a/Prkce/Prex1/Jup/Runx3/Card11/P2ry12/Ccl28/Nfat5/Fbln1/Rhoh/Il2/Prkcz/Runx1/Cd80/Abl1/Itgb2/Aif1/Ptafr/Nfkbiz/Csf1/Ccr2/Ldb1/Dock5/Ptprj/Ppp3ca/Il6/Lck/Iqgap1/Itgal/Cyld/Vav1/Piezo1/Itga3/Ptpn22/Adgrg1/Coro1a/Tnfrsf14/Cdh1/Smad3/Egr3/Jak1/Nck2/Col16a1/Il21/Itpkb/Src/Itgb3/Itgb1bp1/Gata3/Cyrib/Il6st/Nckap1l
## GO:0050863                                                                                                             Malt1/Anxa1/Prkcq/Cd81/Braf/Rasgrp1/Blm/Havcr2/Csk/Twsg1/Il20rb/Cd6/Glmn/Ccl5/Casp3/Cd3e/Ifng/Dusp10/Zmiz1/Tnfrsf1b/Nck1/Peli1/Cdkn2a/Ikzf1/Cd4/Mad1l1/Cd44/Ptprc/Il12rb1/Cd28/Slamf1/Cd86/Cd47/Thy1/Vtcn1/Adam8/Tgfbr2/Cd244a/Tox/Sit1/Runx3/Card11/Prdm1/Rhoh/Mapk8ip1/Il2/Prkcz/Zfp608/Pag1/Runx1/Cd80/Abl1/Aif1/Sos1/Dusp22/Nfkbiz/Ccr2/Il6/Lck/Tnfaip8l2/Itgal/Lgals3/Cyld/Ndfip1/Ptpn22/Zc3h12a/Coro1a/Tnfrsf14/Egr3/Rac2/Ctla4/Nck2/Adora2a/Il21/Cblb/Itpkb/Gata3/Cyrib/Il6st/Nckap1l
## GO:0007159                                                                                              Malt1/Anxa1/Prkcq/Cd81/Jam2/Rasgrp1/Blm/Havcr2/Twsg1/Il20rb/Cd6/Glmn/Ccl5/Nr4a3/Casp3/Cd3e/Ifng/Dusp10/Zmiz1/Nck1/Peli1/Cdkn2a/Ikzf1/Cd4/Mad1l1/Cd44/Ptprc/Il12rb1/Cd28/Slamf1/Cd86/Cd47/Thy1/Cx3cr1/Vtcn1/Adam8/Tgfbr2/Ets1/Cd244a/Selplg/Sema4d/Runx3/Card11/Ccl28/Nfat5/Rhoh/Stk10/Il2/Prkcz/Zfp608/Pag1/Runx1/Cd80/Itgb2/Aif1/Ptafr/Dusp22/Nfkbiz/Ccr2/Il6/Lck/Tnfaip8l2/Itgal/Lgals3/Cyld/Ndfip1/Ptpn22/Zc3h12a/Coro1a/Tnfrsf14/Egr3/Rac2/Ctla4/Nck2/Adora2a/Il21/Cblb/Itpkb/Gata3/Cyrib/Il6st/Nckap1l
## GO:1903037                                                                                                                                   Malt1/Anxa1/Prkcq/Cd81/Rasgrp1/Blm/Havcr2/Twsg1/Il20rb/Cd6/Glmn/Ccl5/Nr4a3/Casp3/Cd3e/Ifng/Dusp10/Zmiz1/Nck1/Peli1/Cdkn2a/Ikzf1/Cd4/Mad1l1/Cd44/Ptprc/Il12rb1/Cd28/Slamf1/Cd86/Cd47/Thy1/Vtcn1/Adam8/Tgfbr2/Ets1/Cd244a/Runx3/Card11/Ccl28/Nfat5/Rhoh/Il2/Prkcz/Zfp608/Pag1/Runx1/Cd80/Itgb2/Aif1/Ptafr/Dusp22/Nfkbiz/Ccr2/Il6/Lck/Tnfaip8l2/Itgal/Lgals3/Cyld/Ndfip1/Ptpn22/Zc3h12a/Coro1a/Tnfrsf14/Egr3/Ctla4/Nck2/Adora2a/Il21/Cblb/Itpkb/Gata3/Cyrib/Il6st/Nckap1l
## GO:0042098                                                                                                                                                                                                                                          Malt1/Anxa1/Prkcq/Cd81/Rasgrp1/Blm/Havcr2/Twsg1/Il20rb/Cd6/Glmn/Ccl5/Casp3/Cd3e/Ifng/Tnfrsf1b/Nck1/Peli1/Cdkn2a/Cd4/Mad1l1/Cd44/Ptprc/Il12rb1/Cd28/Slamf1/Cd86/Fyn/Vtcn1/Tgfbr2/Cd244a/Card11/Mapk8ip1/Il2/Cd80/Dock2/Abl1/Itgb2/Aif1/Sos1/Cxcr4/Ccr2/Itgad/Il6/Itgal/Lgals3/Ndfip1/P2rx7/Ptpn22/Coro1a/Tnfrsf14/Rac2/Ctla4/Nck2/Il21/Cblb/Il6st/Fkbp1a/Nckap1l
##            Count
## GO:0022407    98
## GO:0045785    98
## GO:0050863    80
## GO:0007159    82
## GO:1903037    76
## GO:0042098    59

Visualization

up.go.res[["plot"]]


Down regulated genes

Overview

down.go.res=all.go.results[["DOWN"]][["GO"]]
down.go.res.table = down.go.res[["table"]]
head(down.go.res.table)
##            ONTOLOGY         ID
## GO:0022407       BP GO:0022407
## GO:0007264       BP GO:0007264
## GO:1903034       BP GO:1903034
## GO:0007265       BP GO:0007265
## GO:0051056       BP GO:0051056
## GO:0010543       BP GO:0010543
##                                                        Description GeneRatio
## GO:0022407                        regulation of cell-cell adhesion   89/1843
## GO:0007264               small GTPase mediated signal transduction   88/1843
## GO:1903034                      regulation of response to wounding   47/1843
## GO:0007265                         Ras protein signal transduction   69/1843
## GO:0051056 regulation of small GTPase mediated signal transduction   58/1843
## GO:0010543                       regulation of platelet activation   19/1843
##              BgRatio       pvalue     p.adjust       qvalue
## GO:0022407 427/23328 1.509144e-17 8.866221e-14 6.155719e-14
## GO:0007264 437/23328 2.135011e-16 6.271594e-13 4.354298e-13
## GO:1903034 186/23328 5.015682e-13 9.822378e-10 6.819568e-10
## GO:0007265 350/23328 1.095362e-12 1.608813e-09 1.116981e-09
## GO:0051056 271/23328 2.087054e-12 2.452289e-09 1.702597e-09
## GO:0010543  38/23328 8.510919e-12 8.333608e-09 5.785932e-09
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               geneID
## GO:0022407                                                                    Mbp/Runx1/Zc3h12d/Pdcd1lg2/Lef1/Bcl10/Egr3/Sh2b3/Blk/Card11/Socs5/Cited2/Tmem131l/Crtam/Shb/Efnb1/Rasgrp1/Smad7/Il18/Pik3r1/Itga4/Il6st/Cd83/Prkca/Ass1/Adk/Nr4a3/Mdk/Tenm3/Stat5b/Twsg1/Itpkb/Abat/Ndfip1/Prkg1/Tnfrsf21/Epha7/Prkcq/Casp3/Ripor2/Icos/Cd9/Jak1/Tnfaip3/Tespa1/Cd74/Selp/Tnfrsf14/Zfp608/Gcnt2/Efnb2/Akna/H2-Aa/Icosl/Btla/Alox12/Tnr/Adrb2/Dusp10/Magi2/Tbx18/Ccr7/Bmp7/Socs6/Zc3h12a/Ifng/Scrib/Plpp3/Ccr5/Klf4/Syk/Myo10/Gm9733/Tnfsf4/Spta1/Serpine2/Ptger3/Il1b/Swap70/Il15/Gata3/Prkcd/Il1rl2/Arg1/Efna5/Il7/Ifnb1/Cx3cl1/Hspd1
## GO:0007264 Rsu1/Plk2/Map4k4/Arhgef1/Cyth1/Ctnnal1/Garnl3/Rapgef4/Heg1/Prex1/Rap2a/Akap13/Camk2d/Itsn1/Psd3/Ccdc88c/Arf6/Jun/Nucb2/Rasgrp1/Arhgef10/Farp1/Itgb1/Rhoc/Tiam1/Nrp1/Arhgap18/Arl6/Spry2/Arhgap26/Dennd4c/Celsr1/Itpkb/Rap1a/Plce1/Rasgef1a/Vangl2/Rras2/Fgd2/Rasa3/Arhgap25/Rhoq/Ripor2/Rap1gap2/Sos2/Vav3/Rasgrf1/Ralgapa2/Arhgef3/Trio/Dab2ip/Dgkz/Srgap1/Dok2/Rapgef5/Iqsec1/Iqsec2/Ralgps2/Cyth3/Ralgds/Arfgef1/Rapgef1/Arhgef33/Rap2b/Cdon/Prag1/Rnd3/Rgl1/Notch2/Arhgef12/Arhgap35/Arhgdib/Sipa1l1/Arhgap17/Arhgef37/Arhgap24/Spata13/Nckap1/Cdc42ep3/Rhobtb1/Rasgrp3/Iqsec3/Sdcbp/Arhgap32/Elmo1/Dock7/Cd2ap/Auts2
## GO:1903034                                                                                                                                                                                                                                                                                                                               Sh2b3/Blk/Ptprj/Itgb1/Pros1/Prkca/Mdk/Phldb2/Ntrk3/Abat/Prkg1/Apoh/Adam17/Prkcq/Cd9/Xylt1/Selp/Tlr4/Fgf2/Txk/Alox12/Tnr/Clec7a/Adrb2/Dusp10/Tec/Adra2a/Arfgef1/Cd109/D130043K22Rik/Ano6/Plpp3/Klf4/Syk/Epha4/Igf1r/Stk24/Pla2g4a/Cd36/Serpine2/Ptger3/Clasp2/Tspan8/Prkcd/Smoc2/Ptger4/Lrp1
## GO:0007265                                                                                                                                      Rsu1/Plk2/Map4k4/Arhgef1/Cyth1/Ctnnal1/Heg1/Prex1/Rap2a/Akap13/Camk2d/Itsn1/Psd3/Arf6/Jun/Rasgrp1/Arhgef10/Farp1/Itgb1/Tiam1/Nrp1/Arl6/Spry2/Dennd4c/Celsr1/Itpkb/Rap1a/Plce1/Rasgef1a/Vangl2/Rras2/Fgd2/Rasa3/Ripor2/Sos2/Vav3/Rasgrf1/Ralgapa2/Arhgef3/Trio/Dab2ip/Dgkz/Srgap1/Dok2/Iqsec1/Iqsec2/Ralgps2/Cyth3/Arfgef1/Rapgef1/Arhgef33/Rap2b/Prag1/Notch2/Arhgef12/Arhgap35/Arhgdib/Arhgap17/Arhgef37/Arhgap24/Spata13/Nckap1/Cdc42ep3/Rasgrp3/Iqsec3/Sdcbp/Arhgap32/Elmo1/Auts2
## GO:0051056                                                                                                                                                                                                  Map4k4/Arhgef1/Cyth1/Garnl3/Heg1/Prex1/Akap13/Camk2d/Itsn1/Psd3/Arf6/Rasgrp1/Arhgef10/Farp1/Itgb1/Tiam1/Nrp1/Arhgap18/Spry2/Arhgap26/Dennd4c/Itpkb/Plce1/Rasgef1a/Fgd2/Rasa3/Arhgap25/Ripor2/Rap1gap2/Sos2/Vav3/Rasgrf1/Ralgapa2/Arhgef3/Trio/Dab2ip/Dgkz/Iqsec1/Iqsec2/Ralgps2/Cyth3/Arfgef1/Rapgef1/Arhgef33/Cdon/Prag1/Notch2/Arhgef12/Arhgap35/Arhgdib/Sipa1l1/Arhgap17/Arhgef37/Arhgap24/Spata13/Iqsec3/Cd2ap/Auts2
## GO:0010543                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               Sh2b3/Blk/Ptprj/Prkca/Abat/Prkg1/Prkcq/Cd9/Selp/Tlr4/Txk/Alox12/Adrb2/Tec/Syk/Pla2g4a/Serpine2/Ptger3/Prkcd
##            Count
## GO:0022407    89
## GO:0007264    88
## GO:1903034    47
## GO:0007265    69
## GO:0051056    58
## GO:0010543    19

Visualization

down.go.res[["plot"]]


KEGG enrichment

# save results to working directory
# ConductFE(deres = dds.atac.results.ordered, data.type = "ATAC", peak.anno.key = "All", 
#           gene.type = "SYMBOL", signif = "padj", l2fc.threshold = 0,enrich.type = "KEGG")
all.kegg.results=ConductFE(deres = dds.atac.results.ordered, data.type = "ATAC", peak.anno.key = "All", 
                           gene.type = "SYMBOL", signif = "padj", l2fc.threshold = 0,enrich.type = "KEGG", str.width = 50, save = F)

Up regulated genes

Overview

up.kegg.res=all.kegg.results[["UP"]][["KEGG"]]
up.kegg.res.table=up.kegg.res[["table"]]
head(up.kegg.res.table)
##                ID
## mmu04660 mmu04660
## mmu05235 mmu05235
## mmu04650 mmu04650
## mmu04810 mmu04810
## mmu04658 mmu04658
## mmu04659 mmu04659
##                                                                                  Description
## mmu04660                      T cell receptor signaling pathway - Mus musculus (house mouse)
## mmu05235 PD-L1 expression and PD-1 checkpoint pathway in cancer - Mus musculus (house mouse)
## mmu04650              Natural killer cell mediated cytotoxicity - Mus musculus (house mouse)
## mmu04810                       Regulation of actin cytoskeleton - Mus musculus (house mouse)
## mmu04658                       Th1 and Th2 cell differentiation - Mus musculus (house mouse)
## mmu04659                              Th17 cell differentiation - Mus musculus (house mouse)
##          GeneRatio  BgRatio       pvalue     p.adjust       qvalue
## mmu04660    38/947 103/9270 3.713529e-13 1.229178e-10 7.974315e-11
## mmu05235    31/947  88/9270 2.190028e-10 3.624496e-08 2.351398e-08
## mmu04650    37/947 122/9270 5.540093e-10 6.112570e-08 3.965540e-08
## mmu04810    54/947 231/9270 3.281464e-09 2.715411e-07 1.761628e-07
## mmu04658    29/947  88/9270 4.956182e-09 3.280993e-07 2.128550e-07
## mmu04659    32/947 105/9270 7.133231e-09 3.482919e-07 2.259550e-07
##                                                                                                                                                                                                                                                                                                                                     geneID
## mmu04660                                                                                                                Malt1/Cd247/Nfkbia/Prkcq/Jun/Rasgrp1/Pik3r1/Grap2/Ikbkb/Cd3e/Ifng/Nck1/Cd4/Ptprc/Cd28/Pak4/Fyn/Nfatc1/Nfkb1/Raf1/Card11/Cd8a/Il2/Pik3r3/Sos1/Cd3d/Pik3ca/Lcp2/Pdcd1/Ppp3ca/Lck/Vav1/Pik3cd/Itk/Ctla4/Nck2/Fos/Cblb
## mmu05235                                                                                                                                                Cd247/Nfkbia/Prkcq/Jun/Rasgrp1/Batf/Pik3r1/Ikbkb/Cd3e/Ifng/Hif1a/Pten/Cd4/Cd28/Ifngr1/Nfatc1/Nfkb1/Raf1/Egf/Ptpn11/Pik3r3/Cd3d/Pik3ca/Pdcd1/Ppp3ca/Lck/Eml4/Pik3cd/Jak1/Fos/Map2k3
## mmu04650                                                                                                       Cd247/Klrd1/Braf/Sh3bp2/Pik3r1/Casp3/Klrb1c/Ifng/Prkca/Rac1/Ifnab/Prkcb/Ifngr1/Ptk2b/Fyn/Nfatc1/Cd244a/Raf1/Gzmb/Ptpn11/Raet1d/Pik3r3/Itgb2/Hcst/Sos1/Pik3ca/Lcp2/Klra8/Tnfsf10/Ppp3ca/Lck/Itgal/Vav1/Fasl/Pik3cd/Rac2/Prf1
## mmu04810 Itga9/Itgav/Arhgef12/Braf/Diaph3/Itga2/Crkl/Pik3r1/Fgf4/Pdgfrb/Rac1/Fgd3/Actn1/Pak4/Arpc3/Fgf20/Raf1/Myh9/Ppp1r12a/Pip4k2a/Spata13/Hc/Pip5k1b/Scin/Tmsb4x/Rras2/Actr3/Egf/Pik3r3/Ppp1r12c/Itgb2/Sos1/Cxcr4/Pik3ca/Actb/Itgad/Ppp1ccb/Itga1/Iqgap1/Itgal/Myl10/Pxn/C9/Rdx/Vav1/Itga3/F2r/Pik3cd/Rac2/Src/Itgb3/Rgcc/Baiap2/Nckap1l
## mmu04658                                                                                                                                                             Cd247/Nfkbia/Prkcq/Jun/Ikbkb/Cd3e/Ifng/H2-Eb2/Maf/Cd4/Il12rb1/Ifngr1/Nfatc1/Nfkb1/Runx3/Il2/Notch1/Cd3d/Il12rb2/Tyk2/Ppp3ca/Lck/Maml3/Rbpj/Stat4/Maml2/Jak1/Fos/Gata3
## mmu04659                                                                                                                                               Rora/Cd247/Nfkbia/Prkcq/Jun/Ikbkb/Cd3e/Ifng/Hif1a/H2-Eb2/Cd4/Il12rb1/Ifngr1/Tgfbr2/Nfatc1/Nfkb1/Il2/Runx1/Il22/Iltifb/Cd3d/Rxra/Tyk2/Ppp3ca/Il6/Lck/Smad3/Jak1/Fos/Il21/Gata3/Il6st
##          Count
## mmu04660    38
## mmu05235    31
## mmu04650    37
## mmu04810    54
## mmu04658    29
## mmu04659    32

Visualization

up.kegg.res[["plot"]]


Down regulated genes

Overview

down.kegg.res=all.kegg.results[["DOWN"]][["KEGG"]]
down.kegg.res.table=down.kegg.res[["table"]]
head(down.kegg.res.table)
##                ID
## mmu04971 mmu04971
## mmu04022 mmu04022
## mmu04510 mmu04510
## mmu04724 mmu04724
## mmu04014 mmu04014
## mmu04625 mmu04625
##                                                                    Description
## mmu04971                   Gastric acid secretion - Mus musculus (house mouse)
## mmu04022               cGMP-PKG signaling pathway - Mus musculus (house mouse)
## mmu04510                           Focal adhesion - Mus musculus (house mouse)
## mmu04724                    Glutamatergic synapse - Mus musculus (house mouse)
## mmu04014                    Ras signaling pathway - Mus musculus (house mouse)
## mmu04625 C-type lectin receptor signaling pathway - Mus musculus (house mouse)
##          GeneRatio  BgRatio       pvalue     p.adjust       qvalue
## mmu04971    22/847  75/9270 4.949399e-07 0.0001077581 7.988485e-05
## mmu04022    37/847 173/9270 6.570615e-07 0.0001077581 7.988485e-05
## mmu04510    39/847 203/9270 5.476379e-06 0.0005987508 4.438749e-04
## mmu04724    26/847 114/9270 8.932193e-06 0.0007324399 5.429833e-04
## mmu04014    42/847 235/9270 1.574604e-05 0.0009435154 6.994610e-04
## mmu04625    25/847 112/9270 1.965326e-05 0.0009435154 6.994610e-04
##                                                                                                                                                                                                                                                                     geneID
## mmu04971                                                                                                                             Itpr1/Itpr2/Plcb4/Camk2d/Prkacb/Atp1b3/Ezr/Kcnj1/Prkca/Atp1a1/Atp4a/Car2/Calm2/Adcy7/Hrh2/Kcnk10/Kcnj2/Kcnj16/Chrm3/Calm5/Mylk3/Plcb1
## mmu04022                    Pde2a/Itpr1/Ppp3ca/Itpr2/Atp2b1/Plcb4/Pik3cg/Atp1b3/Mef2d/Irs2/Atp1a1/Mef2a/Prkg1/Calm2/Insr/Ppp3r1/Cnga1/Nfatc1/Cacna1d/Adrb2/Adra2a/Adcy7/4930544G11Rik/Mef2b/Agtr1b/Gtf2i/Pde3a/Irag1/Ppp1cb/Pln/Kcnmb1/Atp2b4/Raf1/Calm5/Mylk3/Plcb1/Vdac2
## mmu04510                       Mylpf/Jun/Ccnd2/Pik3r1/Itga4/Itgb1/Prkca/Col6a1/Actn1/Itga7/Rap1a/Sos2/Vav3/Rasgrf1/Itga2/Fyn/Myl12b/Shc3/Tnr/Ccnd3/Bcar1/4930544G11Rik/Rapgef1/Pak3/Itga9/Lama3/Mapk8/Flt1/Arhgap35/Itgb8/Igf1r/Hgf/Bcl2/Ppp1cb/Parvg/Raf1/Pdgfc/Vcl/Mylk3
## mmu04724                                                                                             Itpr1/Ppp3ca/Itpr2/Grk3/Slc1a2/Plcb4/Prkacb/Gng7/Prkca/Slc38a1/Gls2/Gng2/Ppp3r1/Slc38a2/Cacna1d/Shank1/Adcy7/Slc1a7/Homer1/Slc1a3/Pla2g4a/Grm5/Gria3/Grik4/Plcb1/Grm7
## mmu04014 Fasl/Arf6/Prkacb/Gng7/Rasgrp1/Kit/Pik3r1/Prkca/Tiam1/Fgf18/Ets2/Rap1a/Plce1/Rras2/Rasa3/Gng2/Sos2/Rasgrf1/Rasa1/Calm2/Ralgapa2/Insr/Fgf2/Shc3/Rapgef5/Ralgds/4930544G11Rik/Pak3/Rgl1/Mapk8/Flt1/Igf1r/Hgf/Pla2g4a/Plaat3/Rasgrp3/Fgf9/Raf1/Efna5/Pdgfc/Calm5/Htr7
## mmu04625                                                                                                  Relb/Itpr1/Ppp3ca/Itpr2/Bcl10/Egr3/Jun/Pik3r1/Rras2/Calm2/Ppp3r1/Nfatc1/Clec7a/4930544G11Rik/Mapk8/Arhgef12/Syk/Mapkapk2/Clec4e/Il1b/Bcl3/Prkcd/Raf1/Ccl22/Calm5
##          Count
## mmu04971    22
## mmu04022    37
## mmu04510    39
## mmu04724    26
## mmu04014    42
## mmu04625    25

Visualization

down.kegg.res[["plot"]]


Session info

## R version 4.0.3 (2020-10-10)
## Platform: x86_64-conda-linux-gnu (64-bit)
## Running under: CentOS Linux 7 (Core)
## 
## Matrix products: default
## BLAS/LAPACK: /home/softwares/anaconda3/envs/r4.0/lib/libopenblasp-r0.3.12.so
## 
## locale:
##  [1] LC_CTYPE=zh_CN.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=zh_CN.UTF-8        LC_COLLATE=zh_CN.UTF-8    
##  [5] LC_MONETARY=zh_CN.UTF-8    LC_MESSAGES=zh_CN.UTF-8   
##  [7] LC_PAPER=zh_CN.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=zh_CN.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] stats4    stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] org.Mm.eg.db_3.12.0         AnnotationDbi_1.52.0       
##  [3] DEbPeak_1.4.0               DESeq2_1.30.1              
##  [5] SummarizedExperiment_1.20.0 Biobase_2.50.0             
##  [7] MatrixGenerics_1.2.1        matrixStats_0.58.0         
##  [9] GenomicRanges_1.42.0        GenomeInfoDb_1.26.7        
## [11] IRanges_2.24.1              S4Vectors_0.28.1           
## [13] BiocGenerics_0.42.0        
## 
## loaded via a namespace (and not attached):
##   [1] rsvd_1.0.3                             
##   [2] ggvenn_0.1.9                           
##   [3] apeglm_1.12.0                          
##   [4] Rsamtools_2.6.0                        
##   [5] rsvg_2.1                               
##   [6] foreach_1.5.1                          
##   [7] rprojroot_2.0.2                        
##   [8] crayon_1.4.1                           
##   [9] V8_3.4.2                               
##  [10] MASS_7.3-58                            
##  [11] nlme_3.1-152                           
##  [12] backports_1.2.1                        
##  [13] sva_3.38.0                             
##  [14] GOSemSim_2.25.0                        
##  [15] rlang_1.1.0                            
##  [16] XVector_0.30.0                         
##  [17] readxl_1.4.2                           
##  [18] irlba_2.3.5                            
##  [19] limma_3.46.0                           
##  [20] GOstats_2.56.0                         
##  [21] BiocParallel_1.24.1                    
##  [22] rjson_0.2.20                           
##  [23] bit64_4.0.5                            
##  [24] glue_1.6.2                             
##  [25] DiffBind_3.0.15                        
##  [26] mixsqp_0.3-43                          
##  [27] pheatmap_1.0.12                        
##  [28] parallel_4.0.3                         
##  [29] DEFormats_1.18.0                       
##  [30] base64url_1.4                          
##  [31] tcltk_4.0.3                            
##  [32] DOSE_3.23.2                            
##  [33] haven_2.5.2                            
##  [34] tidyselect_1.2.0                       
##  [35] rio_0.5.27                             
##  [36] XML_3.99-0.6                           
##  [37] tidyr_1.3.0                            
##  [38] ggpubr_0.4.0                           
##  [39] GenomicAlignments_1.26.0               
##  [40] xtable_1.8-4                           
##  [41] ggnetwork_0.5.12                       
##  [42] magrittr_2.0.3                         
##  [43] evaluate_0.14                          
##  [44] ggplot2_3.4.2                          
##  [45] cli_3.6.1                              
##  [46] zlibbioc_1.36.0                        
##  [47] hwriter_1.3.2                          
##  [48] rstudioapi_0.14                        
##  [49] bslib_0.3.1                            
##  [50] GreyListChIP_1.22.0                    
##  [51] fastmatch_1.1-3                        
##  [52] BiocSingular_1.6.0                     
##  [53] xfun_0.30                              
##  [54] askpass_1.1                            
##  [55] clue_0.3-59                            
##  [56] gson_0.0.9                             
##  [57] cluster_2.1.1                          
##  [58] caTools_1.18.2                         
##  [59] tidygraph_1.2.0                        
##  [60] tibble_3.2.1                           
##  [61] ggrepel_0.9.1                          
##  [62] Biostrings_2.58.0                      
##  [63] png_0.1-7                              
##  [64] withr_2.5.0                            
##  [65] bitops_1.0-6                           
##  [66] ggforce_0.3.3                          
##  [67] RBGL_1.66.0                            
##  [68] plyr_1.8.6                             
##  [69] cellranger_1.1.0                       
##  [70] GSEABase_1.52.1                        
##  [71] pcaPP_2.0-1                            
##  [72] dqrng_0.2.1                            
##  [73] coda_0.19-4                            
##  [74] pillar_1.9.0                           
##  [75] gplots_3.1.1                           
##  [76] GlobalOptions_0.1.2                    
##  [77] cachem_1.0.4                           
##  [78] GenomicFeatures_1.42.2                 
##  [79] fs_1.5.0                               
##  [80] GetoptLong_1.0.5                       
##  [81] clusterProfiler_4.7.1                  
##  [82] DelayedMatrixStats_1.12.3              
##  [83] vctrs_0.6.2                            
##  [84] generics_0.1.0                         
##  [85] plot3D_1.4                             
##  [86] tools_4.0.3                            
##  [87] foreign_0.8-81                         
##  [88] NOISeq_2.34.0                          
##  [89] munsell_0.5.0                          
##  [90] tweenr_1.0.2                           
##  [91] fgsea_1.16.0                           
##  [92] DelayedArray_0.16.3                    
##  [93] fastmap_1.1.0                          
##  [94] compiler_4.0.3                         
##  [95] abind_1.4-5                            
##  [96] rtracklayer_1.50.0                     
##  [97] TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2
##  [98] GenomeInfoDbData_1.2.4                 
##  [99] gridExtra_2.3                          
## [100] edgeR_3.32.1                           
## [101] lattice_0.20-45                        
## [102] ggnewscale_0.4.7                       
## [103] AnnotationForge_1.32.0                 
## [104] utf8_1.2.1                             
## [105] dplyr_1.1.2                            
## [106] BiocFileCache_1.14.0                   
## [107] jsonlite_1.8.4                         
## [108] scales_1.2.1                           
## [109] graph_1.68.0                           
## [110] carData_3.0-4                          
## [111] sparseMatrixStats_1.2.1                
## [112] TFEA.ChIP_1.10.0                       
## [113] genefilter_1.72.1                      
## [114] car_3.0-11                             
## [115] doParallel_1.0.16                      
## [116] latticeExtra_0.6-29                    
## [117] R.utils_2.12.0                         
## [118] brew_1.0-6                             
## [119] checkmate_2.0.0                        
## [120] rmarkdown_2.14                         
## [121] openxlsx_4.2.3                         
## [122] pkgdown_1.6.1                          
## [123] cowplot_1.1.1                          
## [124] textshaping_0.3.6                      
## [125] forcats_1.0.0                          
## [126] downloader_0.4                         
## [127] BSgenome_1.58.0                        
## [128] igraph_1.4.99.9024                     
## [129] survival_3.2-10                        
## [130] numDeriv_2016.8-1.1                    
## [131] yaml_2.2.1                             
## [132] plotrix_3.8-2                          
## [133] systemfonts_1.0.4                      
## [134] ashr_2.2-47                            
## [135] SQUAREM_2021.1                         
## [136] htmltools_0.5.2                        
## [137] memoise_2.0.0                          
## [138] VariantAnnotation_1.36.0               
## [139] locfit_1.5-9.4                         
## [140] graphlayouts_0.7.1                     
## [141] batchtools_0.9.15                      
## [142] PCAtools_2.2.0                         
## [143] viridisLite_0.4.0                      
## [144] rrcov_1.7-0                            
## [145] digest_0.6.27                          
## [146] assertthat_0.2.1                       
## [147] rappdirs_0.3.3                         
## [148] emdbook_1.3.12                         
## [149] RSQLite_2.2.5                          
## [150] amap_0.8-18                            
## [151] yulab.utils_0.0.4                      
## [152] debugme_1.1.0                          
## [153] misc3d_0.9-1                           
## [154] data.table_1.14.2                      
## [155] blob_1.2.1                             
## [156] R.oo_1.24.0                            
## [157] ragg_0.4.0                             
## [158] labeling_0.4.2                         
## [159] splines_4.0.3                          
## [160] ggupset_0.3.0                          
## [161] RCurl_1.98-1.3                         
## [162] broom_1.0.4                            
## [163] hms_1.1.3                              
## [164] colorspace_2.0-0                       
## [165] BiocManager_1.30.16                    
## [166] shape_1.4.6                            
## [167] sass_0.4.1                             
## [168] GEOquery_2.58.0                        
## [169] Rcpp_1.0.9                             
## [170] mvtnorm_1.1-2                          
## [171] circlize_0.4.15                        
## [172] enrichplot_1.10.2                      
## [173] fansi_0.4.2                            
## [174] tzdb_0.3.0                             
## [175] truncnorm_1.0-8                        
## [176] ChIPseeker_1.33.0.900                  
## [177] R6_2.5.0                               
## [178] grid_4.0.3                             
## [179] lifecycle_1.0.3                        
## [180] ShortRead_1.48.0                       
## [181] zip_2.1.1                              
## [182] curl_4.3                               
## [183] ggsignif_0.6.3                         
## [184] jquerylib_0.1.3                        
## [185] robustbase_0.95-0                      
## [186] DO.db_2.9                              
## [187] Matrix_1.5-4                           
## [188] qvalue_2.22.0                          
## [189] desc_1.3.0                             
## [190] org.Hs.eg.db_3.12.0                    
## [191] RColorBrewer_1.1-2                     
## [192] iterators_1.0.13                       
## [193] stringr_1.5.0                          
## [194] DOT_0.1                                
## [195] ggpie_0.2.5                            
## [196] beachmat_2.6.4                         
## [197] polyclip_1.10-0                        
## [198] biomaRt_2.46.3                         
## [199] purrr_1.0.1                            
## [200] shadowtext_0.0.9                       
## [201] gridGraphics_0.5-1                     
## [202] mgcv_1.8-34                            
## [203] ComplexHeatmap_2.13.1                  
## [204] openssl_1.4.3                          
## [205] patchwork_1.0.0                        
## [206] bdsmatrix_1.3-4                        
## [207] codetools_0.2-18                       
## [208] invgamma_1.1                           
## [209] GO.db_3.12.1                           
## [210] gtools_3.8.2                           
## [211] prettyunits_1.1.1                      
## [212] dbplyr_2.3.2                           
## [213] R.methodsS3_1.8.1                      
## [214] gtable_0.3.0                           
## [215] DBI_1.1.1                              
## [216] highr_0.8                              
## [217] ggfun_0.0.6                            
## [218] httr_1.4.5                             
## [219] KernSmooth_2.23-18                     
## [220] stringi_1.5.3                          
## [221] progress_1.2.2                         
## [222] reshape2_1.4.4                         
## [223] farver_2.1.0                           
## [224] annotate_1.68.0                        
## [225] viridis_0.6.1                          
## [226] Rgraphviz_2.34.0                       
## [227] xml2_1.3.4                             
## [228] bbmle_1.0.24                           
## [229] systemPipeR_1.24.3                     
## [230] boot_1.3-28                            
## [231] readr_2.1.4                            
## [232] geneplotter_1.68.0                     
## [233] ggplotify_0.1.0                        
## [234] Category_2.56.0                        
## [235] DEoptimR_1.0-11                        
## [236] bit_4.0.4                              
## [237] scatterpie_0.1.7                       
## [238] jpeg_0.1-8.1                           
## [239] ggraph_2.0.5                           
## [240] pkgconfig_2.0.3                        
## [241] rstatix_0.7.0                          
## [242] knitr_1.37