View source: R/do_GroupwiseDEPlot.R
do_GroupwiseDEPlot | R Documentation |
Compute a heatmap with the results of a group-wise DE analysis.
do_GroupwiseDEPlot(
sample,
de_genes,
group.by = NULL,
number.breaks = 5,
top_genes = 5,
use_viridis = FALSE,
viridis.direction = -1,
viridis.palette.pvalue = "C",
viridis.palette.logfc = "E",
viridis.palette.expression = "G",
sequential.direction = 1,
sequential.palette.pvalue = "YlGn",
sequential.palette.logfc = "YlOrRd",
sequential.palette.expression = "YlGnBu",
assay = NULL,
slot = "data",
legend.position = "bottom",
legend.width = 1,
legend.length = 20,
legend.framewidth = 0.5,
legend.tickwidth = 0.5,
legend.framecolor = "grey50",
legend.tickcolor = "white",
legend.type = "colorbar",
font.size = 14,
font.type = "sans",
axis.text.x.angle = 45,
min.cutoff = NA,
max.cutoff = NA,
na.value = "grey75",
grid.color = "white",
border.color = "black",
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"
)
sample |
|
de_genes |
|
group.by |
|
number.breaks |
|
top_genes |
|
use_viridis |
|
viridis.direction |
|
viridis.palette.pvalue, viridis.palette.logfc, viridis.palette.expression |
|
sequential.direction |
|
sequential.palette.pvalue, sequential.palette.expression, sequential.palette.logfc |
|
assay |
|
slot |
|
legend.position |
|
legend.length, legend.width |
|
legend.framewidth, legend.tickwidth |
|
legend.framecolor |
|
legend.tickcolor |
|
legend.type |
|
font.size |
|
font.type |
|
axis.text.x.angle |
|
min.cutoff, max.cutoff |
|
na.value |
|
grid.color |
|
border.color |
|
plot.title.face, plot.subtitle.face, plot.caption.face, axis.title.face, axis.text.face, legend.title.face, legend.text.face |
|
A heatmap composed of 3 main panels: -log10(adjusted p-value), log2(FC) and mean expression by cluster.
# Check Suggests.
value <- SCpubr:::check_suggests(function_name = "do_GroupwiseDEPlot", passive = TRUE)
if (isTRUE(value)){
# Consult the full documentation in https://enblacar.github.io/SCpubr-book/
# Define your Seurat object.
sample <- readRDS(system.file("extdata/seurat_dataset_example.rds", package = "SCpubr"))
# Compute DE genes and transform to a tibble.
de_genes <- readRDS(system.file("extdata/de_genes_example.rds", package = "SCpubr"))
# Default output.
p <- SCpubr::do_GroupwiseDEPlot(sample = sample,
de_genes = de_genes)
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.