plotEnrich {enrichR} | R Documentation |
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
2 plot object
Author(s)
I-Hsuan Lin i-hsuan.lin@manchester.ac.uk
See Also
Examples
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")
}
}