Title: | Provides an R Interface to 'Enrichr' |
---|---|
Description: | Provides an R interface to all 'Enrichr' databases. 'Enrichr' is a web-based tool for analysing gene sets and returns any enrichment of common annotated biological features. Quoting from their website 'Enrichment analysis is a computational method for inferring knowledge about an input gene set by comparing it to annotated gene sets representing prior biological knowledge.' See <https://maayanlab.cloud/Enrichr/> for further details. |
Authors: | Wajid Jawaid [aut, cre] |
Maintainer: | Wajid Jawaid <[email protected]> |
License: | GPL (>= 2) |
Version: | 3.2 |
Built: | 2024-11-05 06:49:20 UTC |
Source: | CRAN |
The enrichR package provides an R interface to all enrichR (https://maayanlab.cloud/Enrichr/) databases.
Wajid Jawaid [email protected]
onLoad hook to setup package options
.onAttach(libname, pkgname)
.onAttach(libname, pkgname)
libname |
(Required). Library name |
pkgname |
(Required). Package name |
onLoad hook to setup package options and to check connection to website
Wajid Jawaid [email protected]
Gene enrichment using Enrichr
enrichr(genes, databases = NULL)
enrichr(genes, databases = NULL)
genes |
(Required). Character vector of gene names or data.frame of gene names in in first column and a score between 0 and 1 in the other. |
databases |
(Required). Character vector of databases to search. See https://maayanlab.cloud/Enrichr/ for available databases. |
Gene enrichment using Enrichr
Returns a list of data.frame of enrichment terms, p-values, ...
Wajid Jawaid [email protected]
dbs <- listEnrichrDbs() dbs <- c("GO_Molecular_Function_2018", "GO_Cellular_Component_2018", "GO_Biological_Process_2018") enriched <- enrichr(c("Runx1", "Gfi1", "Gfi1b", "Spi1", "Gata1", "Kdr"), dbs)
dbs <- listEnrichrDbs() dbs <- c("GO_Molecular_Function_2018", "GO_Cellular_Component_2018", "GO_Biological_Process_2018") enriched <- enrichr(c("Runx1", "Gfi1", "Gfi1b", "Spi1", "Gata1", "Kdr"), dbs)
This is a character vector which consists of randomly selected 790 genes.
vector
data(genes790) length(genes790)
data(genes790) length(genes790)
Helper function
getEnrichr(url, ...)
getEnrichr(url, ...)
url |
(Required). URL address requested |
... |
(Optional). Additional parameters to pass to GET |
Helper function for GET
same as GET
Wajid Jawaid [email protected]
I-Hsuan Lin [email protected]
Look up available databases on Enrichr
listEnrichrDbs()
listEnrichrDbs()
Look up available databases on Enrichr
A data.frame of available Enrichr databases
Wajid Jawaid [email protected]
dbs <- listEnrichrDbs()
dbs <- listEnrichrDbs()
List modEnrichr Websites
listEnrichrSites(...)
listEnrichrSites(...)
... |
(Optional Additional parameters) |
List Enrichr Websites
print Enrichr Website status
Alexander Blume
Visualise a Enrichr output as barplot
plotEnrich( df, showTerms = 20, numChar = 40, y = "Count", orderBy = "P.value", xlab = NULL, ylab = NULL, title = NULL )
plotEnrich( df, showTerms = 20, numChar = 40, y = "Count", orderBy = "P.value", xlab = NULL, ylab = NULL, title = NULL )
df |
(Required). A single data.frame from a list of Enrichr output. |
showTerms |
(Optional). Number of terms to show. Default is |
numChar |
(Optional). A single integer. Default is |
y |
(Optional). A character string. Default is |
orderBy |
(Optional). A character string. Default is |
xlab |
(Optional). A character string. Default is |
ylab |
(Optional). A character string. Default is |
title |
(Optional). A character string. Default is |
Visualise Enrichr result from a selected gene-set library as barplot.
A ggplot
2 plot object
I-Hsuan Lin [email protected]
if (getOption("enrichR.live")) { dbs <- listEnrichrDbs() enrichRLive <- TRUE if (is.null(dbs)) enrichRLive <- FALSE dbs <- c("GO_Molecular_Function_2018", "GO_Cellular_Component_2018", "GO_Biological_Process_2018") enriched <- enrichr(c("Runx1", "Gfi1", "Gfi1b", "Spi1", "Gata1", "Kdr"), dbs) # Plot top 20 terms from "GO_Biological_Process_2018" and ordered by P-value if (enrichRLive) { plotEnrich(enriched[[3]], showTerms = 20, numChar = 50, y = "Count", orderBy = "P.value") } }
if (getOption("enrichR.live")) { dbs <- listEnrichrDbs() enrichRLive <- TRUE if (is.null(dbs)) enrichRLive <- FALSE dbs <- c("GO_Molecular_Function_2018", "GO_Cellular_Component_2018", "GO_Biological_Process_2018") enriched <- enrichr(c("Runx1", "Gfi1", "Gfi1b", "Spi1", "Gata1", "Kdr"), dbs) # Plot top 20 terms from "GO_Biological_Process_2018" and ordered by P-value if (enrichRLive) { plotEnrich(enriched[[3]], showTerms = 20, numChar = 50, y = "Count", orderBy = "P.value") } }
Print Enrichr results
printEnrich( data, prefix = "enrichr", showTerms = NULL, columns = c(1:9), write2file = TRUE, outFile = c("txt", "excel") )
printEnrich( data, prefix = "enrichr", showTerms = NULL, columns = c(1:9), write2file = TRUE, outFile = c("txt", "excel") )
data |
(Required). Output list object from the |
prefix |
(Optional). Prefix of output file. Default is |
showTerms |
(Optional). Number of terms to show.
Default is |
columns |
(Optional). Columns from each entry of data.
Default is |
write2file |
(Optional). Set to TRUE if you would like this functino to output a file |
outFile |
(Optional). Output file format, choose from "txt" and "excel". Default is "txt". |
Print Enrichr results from the selected gene-set libraries to individual text files.
Wajid Jawaid [email protected]
I-Hsuan Lin [email protected]
if (getOption("enrichR.live")) { enrichRLive <- TRUE dbs <- listEnrichrDbs() if(is.null(dbs)) enrichRLive <- FALSE dbs <- c("GO_Molecular_Function_2018", "GO_Cellular_Component_2018", "GO_Biological_Process_2018") enriched <- enrichr(c("Runx1", "Gfi1", "Gfi1b", "Spi1", "Gata1", "Kdr"), dbs) if (enrichRLive) printEnrich(enriched, write2file = FALSE) }
if (getOption("enrichR.live")) { enrichRLive <- TRUE dbs <- listEnrichrDbs() if(is.null(dbs)) enrichRLive <- FALSE dbs <- c("GO_Molecular_Function_2018", "GO_Cellular_Component_2018", "GO_Biological_Process_2018") enriched <- enrichr(c("Runx1", "Gfi1", "Gfi1b", "Spi1", "Gata1", "Kdr"), dbs) if (enrichRLive) printEnrich(enriched, write2file = FALSE) }
Set Enrichr Website
setEnrichrSite(site)
setEnrichrSite(site)
site |
site requested |
Set Enrichr Website
Changes Enrichr Website connection
Alexander Blume