View source: R/Seurat.Utils.Visualization.R
scBarplotEnrichr | R Documentation |
This function creates a bar plot of GO enrichment analysis results using the
enrichplot::barplot.enrichResult
function. It also allows saving the plot to a file.
scBarplotEnrichr(
df.enrichment,
tag = "...",
universe = df.enrichment@universe,
title = paste("GO Enriched Terms", tag),
subtitle = kppws("Input: ", substitute_deparse(df.enrichment)),
caption = paste0("Input genes: ", length(df.enrichment@gene), " | Enriched terms: ",
nrow(df.enrichment), " | background genes: ", length(universe)),
save = TRUE,
w = 10,
h = 10,
also.pdf = FALSE,
...
)
df.enrichment |
Data frame. Enrichment results from GO analysis. Default: NULL. |
tag |
Character. Tag to be added to the title of the plot. Default: "in ...". |
universe |
Character. Background gene list (universe). Default: |
title |
Character. Title of the plot. Default: "GO Enrichment Analysis" followed by |
subtitle |
Character. Subtitle of the plot. Default: NULL. |
caption |
Character. Caption of the plot. Default: constructed from input parameters. |
save |
Logical. Whether to save the plot to a file. Default: |
w |
Width of the plot canvas, calculated as the width of an A4 page times |
h |
Height of the plot canvas, calculated as the height of an A4 page times |
also.pdf |
Save plot in both png and pdf formats. |
... |
Additional arguments passed to |
None. The function prints the plot and optionally saves it.
## Not run: ``
df.enrichment <- data.frame() # Example enrichment results data frame
plotGOEnrichment(df.enrichment)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.