Title: | Provides an R Interface to 'Enrichr' |
Version: | 3.4 |
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. |
Depends: | R (≥ 3.5.0) |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Encoding: | UTF-8 |
LazyData: | true |
Imports: | httr, curl, rjson, ggplot2, WriteXLS |
RoxygenNote: | 7.3.2 |
Suggests: | knitr, rmarkdown |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2025-02-02 17:17:05 UTC; wajid |
Author: | Wajid Jawaid [aut, cre] |
Maintainer: | Wajid Jawaid <wajid.jawaid@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2025-02-02 22:50:06 UTC |
enrichR package
Description
The enrichR package provides an R interface to all enrichR (https://maayanlab.cloud/Enrichr/) databases.
Author(s)
Wajid Jawaid wajid.jawaid@gmail.com
Upload background list using Speedrichr API
Description
Upload background list using Speedrichr API
Usage
.add_background(genes)
Arguments
genes |
gene list |
Details
Upload background list using Speedrichr API
Value
R object from JSON
Author(s)
I-Hsuan Lin i-hsuan.lin@manchester.ac.uk
Upload gene list using Speedrichr API
Description
Upload gene list using Speedrichr API
Usage
.add_list(genes)
Arguments
genes |
Input genes |
Details
Upload gene list using Speedrichr API
Value
R object that corresponds to the JSON object
Author(s)
I-Hsuan Lin i-hsuan.lin@manchester.ac.uk
Given a Enrichr output, order and subset criteria, returns a data frame accordingly
Description
Given a Enrichr output, order and subset criteria, returns a data frame accordingly
Usage
.enrichment_prep_df(df, showTerms = 20, orderBy = "P.value")
Arguments
df |
Enrichr output |
showTerms |
Number of terms to show. Default 20. |
orderBy |
Column for ordering. Default "P.value" |
Details
Given a Enrichr output, order and subset criteria, returns a data frame accordingly
Value
Data frame
Author(s)
I-Hsuan Lin i-hsuan.lin@manchester.ac.uk
FormatGenes
Description
Given an input, check format and return a character vector
Usage
.formatGenes(x, type = c("standard", "background"))
Arguments
x |
Vector or dataframe of genes with or without score |
type |
Depends on type of gene input |
Details
In standard analysis without background, crisp (symbols only) and fuzzy (with scores) gene sets are acceptable In analysis with background, only crisp gene sets are acceptable
Value
Character vector
Author(s)
I-Hsuan Lin i-hsuan.lin@manchester.ac.uk
Get enrichment result using Speedrichr API
Description
Get enrichment result using Speedrichr API
Usage
.get_backgroundenrich(uId, bId, db)
Arguments
uId |
user List ID |
bId |
background ID |
db |
background Type |
Details
Get enrichment result using Speedrichr API
Value
R object from JSON
Author(s)
I-Hsuan Lin i-hsuan.lin@manchester.ac.uk
onLoad hook to setup package options
Description
onLoad hook to setup package options
Usage
.onAttach(libname, pkgname)
Arguments
libname |
(Required). Library name |
pkgname |
(Required). Package name |
Details
onLoad hook to setup package options and to check connection to website
Author(s)
Wajid Jawaid wajid.jawaid@gmail.com
Internal function to check RCurlOptions
Description
Internal function to check RCurlOptions
Usage
.proxyOpts()
Details
Internal function to check RCurlOptions
Value
Named vector
Author(s)
I-Hsuan Lin i-hsuan.lin@manchester.ac.uk
Download and parse GMT files from Enrichr
Description
Download and parse GMT files from Enrichr
Usage
.read_gmt(db)
Arguments
db |
library |
Details
Download and parse GMT files from Enrichr
Value
List object
Author(s)
I-Hsuan Lin i-hsuan.lin@manchester.ac.uk
Example background genes
Description
This is a character vector which consists of 20,625 gene symbols taken from the Enrichr website.
Usage
data(background)
Format
vector
Examples
data(background)
length(background)
Gene enrichment using Enrichr
Description
Gene enrichment using Enrichr
Usage
enrichr(
genes,
databases = NULL,
background = NULL,
include_overlap = FALSE,
sleepTime = 1
)
Arguments
genes |
(Required). Character vector of Entrez gene symbols as input. A data.frame of gene symbols in first column is also acceptable, optionally a score denoting the degree of membership between 0 and 1 in the second column. |
databases |
(Required). Character vector of databases to search. See https://maayanlab.cloud/Enrichr/ for available databases. |
background |
(Optional). Character vector of Entrez gene symbols to be used as
background. A data.frame of gene symbols in first column is also acceptable.
Default is |
include_overlap |
(Optional). Download database in GMT format to include 'Overlap'
in the resulting data.frame when analysing with a background. Default is |
sleepTime |
(Optional) Time to wait (in seconds) between sending requests to the server to prevent the same results being returned as the previous request. Default is 1. |
Details
Gene enrichment using Enrichr, also, you can now try adding a background.
Value
Returns a list of data.frame of enrichment terms, p-values, ...
Author(s)
Wajid Jawaid wajid.jawaid@gmail.com
Examples
# data(input) # Load example input genes
# data(background) # Load example background genes
# dbs <- c("GO_Molecular_Function_2023", "GO_Cellular_Component_2023",
# "GO_Biological_Process_2023")
# if (getOption("enrichR.live")) {
# enriched1 <- enrichr(input, dbs)
# print(head(enriched1[[1]]))
# # Include background
# enriched2 <- enrichr(input, dbs, background = background)
# print(head(enriched2[[1]]))
# # Include background and add 'Overlap' info
# enriched3 <- enrichr(input, dbs, background = background, include_overlap = TRUE)
# print(head(enriched3[[1]]))
# }
790 gene symbols
Description
This is a character vector which consists of randomly selected 790 genes.
Usage
data(genes790)
Format
vector
Examples
data(genes790)
length(genes790)
Helper function for HTTP methods GET and POST
Description
Helper function
Usage
getEnrichr(method = "GET", url, ...)
Arguments
method |
(Required). HTTP method. Default is |
url |
(Required). URL address requested |
... |
(Optional). Additional parameters to pass to GET |
Details
Helper function for HTTP methods GET and POST
Value
same as GET
Author(s)
Wajid Jawaid wajid.jawaid@gmail.com
I-Hsuan Lin i-hsuan.lin@manchester.ac.uk
Example input genes
Description
This is a character vector which consists of 375 gene symbols taken from the Enrichr website.
Usage
data(input)
Format
vector
Examples
data(input)
length(input)
Look up available databases on Enrichr
Description
Look up available databases on Enrichr
Usage
listEnrichrDbs()
Details
Look up available databases on Enrichr
Value
A data.frame of available Enrichr databases
Author(s)
Wajid Jawaid wajid.jawaid@gmail.com
Examples
dbs <- listEnrichrDbs()
List Enrichr Websites
Description
List modEnrichr Websites
Usage
listEnrichrSites()
Details
List Enrichr Websites
Value
print Enrichr Website status
Author(s)
Alexander Blume
plotEnrich
Description
Visualise a Enrichr output as barplot
Usage
plotEnrich(
df,
showTerms = 20,
numChar = 40,
y = "Count",
orderBy = "P.value",
xlab = NULL,
ylab = NULL,
title = NULL
)
Arguments
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 |
Details
Visualise Enrichr result from a selected gene-set library as barplot.
Value
A ggplot
plot object
Author(s)
I-Hsuan Lin i-hsuan.lin@manchester.ac.uk
See Also
Examples
# data(input) # Load example input genes
# dbs <- c("GO_Molecular_Function_2023", "GO_Cellular_Component_2023",
# "GO_Biological_Process_2023")
# if (getOption("enrichR.live")) {
# enriched <- enrichr(input, dbs)
# print(head(enriched[[1]]))
# # Plot top 20 terms from "GO_Biological_Process_2023" and ordered by P-value
# plotEnrich(enriched[[3]], showTerms = 20, numChar = 50, y = "Count",
# orderBy = "P.value")
# }
printEnrich
Description
Print Enrichr results
Usage
printEnrich(
data,
prefix = "enrichr",
showTerms = NULL,
columns = c(1:9),
outFile = c("txt", "excel")
)
Arguments
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 |
outFile |
(Optional). Output file format, choose from "txt" and "excel". Default is "txt". |
Details
Print Enrichr results from the selected gene-set libraries to individual text files or a Excel spreadsheet.
Author(s)
Wajid Jawaid wajid.jawaid@gmail.com
I-Hsuan Lin i-hsuan.lin@manchester.ac.uk
Examples
# data(input) # Load example input genes
# if (getOption("enrichR.live")) {
# enrichRLive <- TRUE
# dbs <- listEnrichrDbs()
# if(is.null(dbs)) enrichRLive <- FALSE
# dbs <- c("GO_Molecular_Function_2023", "GO_Cellular_Component_2023",
# "GO_Biological_Process_2023")
# enriched <- enrichr(input, dbs)
# print(head(enriched[[1]]))
# # if (enrichRLive) printEnrich(enriched, outFile = "excel")
# }
Set Enrichr Website
Description
Set Enrichr Website
Usage
setEnrichrSite(site)
Arguments
site |
site requested |
Details
Set Enrichr Website
Value
Changes Enrichr Website connection
Author(s)
Alexander Blume