plotEnrich | R Documentation |
Visualise a Enrichr output as barplot
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 i-hsuan.lin@manchester.ac.uk
ggplot
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")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.