View source: R/do_TermEnrichmentPlot.R
do_TermEnrichmentPlot | R Documentation |
Display the enriched terms for a given list of genes.
do_TermEnrichmentPlot(
enriched_terms,
nchar_wrap = 20,
nterms = 10,
font.size = 14,
font.type = "sans",
plot.title = NULL,
plot.subtitle = NULL,
plot.caption = NULL,
legend.position = "bottom",
legend.type = "colorbar",
colors.use = NULL,
text_labels_size = 4,
legend.length = 30,
legend.width = 1,
legend.framewidth = 0.5,
legend.tickwidth = 0.5,
legend.framecolor = "grey50",
legend.tickcolor = "white",
plot.title.face = "bold",
plot.subtitle.face = "plain",
plot.caption.face = "italic",
axis.title.face = "bold",
axis.text.face = "plain",
legend.title.face = "bold",
legend.text.face = "plain"
)
enriched_terms |
|
nchar_wrap |
|
nterms |
|
font.size |
|
font.type |
|
plot.title, plot.subtitle, plot.caption |
|
legend.position |
|
legend.type |
|
colors.use |
|
text_labels_size |
|
legend.length, legend.width |
|
legend.framewidth, legend.tickwidth |
|
legend.framecolor |
|
legend.tickcolor |
|
plot.title.face, plot.subtitle.face, plot.caption.face, axis.title.face, axis.text.face, legend.title.face, legend.text.face |
|
A ggplot2 object with enriched terms.
# Check Suggests.
value <- SCpubr:::check_suggests(function_name = "do_TermEnrichmentPlot", passive = TRUE)
if (isTRUE(value)){
# Consult the full documentation in https://enblacar.github.io/SCpubr-book/
# Define your enriched terms.
enriched_terms <- readRDS(system.file("extdata/enriched_terms_example.rds", package = "SCpubr"))
enriched_terms$GO_Cellular_Component_2021 <- NULL
enriched_terms$Azimuth_Cell_Types_2021 <- NULL
# Default plot.
p <- SCpubr::do_TermEnrichmentPlot(enriched_terms = enriched_terms)
p
} else if (base::isFALSE(value)){
message("This function can not be used without its suggested packages.")
message("Check out which ones are needed using `SCpubr::state_dependencies()`.")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.