knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "./tools/README-"
)

CRAN_Status_Badge Project Status: Active - The project has reached a stable, usable state and is being actively developed. CRAN mirror downloads

Installation

enrichR can be installed from Github or from CRAN.

Github

library(devtools)
install_github("wjawaid/enrichR")

CRAN

The package can be downloaded from CRAN using:

install.packages("enrichR")

Usage example

enrichR provides an interface to the Enrichr database [@kuleshov_enrichr:_2016] hosted at https://maayanlab.cloud/Enrichr/.

By default human genes are selected otherwise select your organism of choice. (This functionality was contributed by Alexander Blume)

library(enrichR)
listEnrichrSites()
setEnrichrSite("Enrichr") # Human genes

Then find the list of all available databases from Enrichr.

dbs <- listEnrichrDbs()
head(dbs)
library(knitr)
kable(head(dbs[c(1:6),-4]))

View and select your favourite databases. Then query enrichr, in this case I have used genes associated with embryonic haematopoiesis.

dbs <- c("GO_Molecular_Function_2015", "GO_Cellular_Component_2015", "GO_Biological_Process_2015")
enriched <- enrichr(c("Runx1", "Gfi1", "Gfi1b", "Spi1", "Gata1", "Kdr"), dbs)

Now view the results table.

enriched[["GO_Biological_Process_2015"]]

You can give many genes.

data(genes790)
length(genes790)
head(enrichr(genes790, c('LINCS_L1000_Chem_Pert_up'))[[1]])
x <- head(enriched[["GO_Biological_Process_2015"]])
x[,1] <- gsub("GO:", "GO_", x[,1])
kable(x)

Plot Enrichr GO-BP output. (Plotting function contributed by I-Hsuan Lin)

plotEnrich(enriched[[3]], showTerms = 20, numChar = 40, y = "Count", orderBy = "P.value")

References



wjawaid/enrichR documentation built on April 25, 2023, 10:10 p.m.