View source: R/do_LoadingsPlot.R
do_LoadingsPlot | R Documentation |
Compute a heatmap summary of the top and bottom genes in the PCA loadings for the desired PCs in a Seurat object.
do_LoadingsPlot(
sample,
group.by = NULL,
subsample = NA,
dims = 1:10,
top_loadings = 5,
assay = "SCT",
slot = "data",
grid.color = "white",
border.color = "black",
number.breaks = 5,
na.value = "grey75",
legend.position = "bottom",
legend.title = "Expression",
legend.type = "colorbar",
legend.framewidth = 0.5,
legend.tickwidth = 0.5,
legend.length = 20,
legend.width = 1,
legend.framecolor = "grey50",
legend.tickcolor = "white",
font.size = 14,
font.type = "sans",
axis.text.x.angle = 45,
use_viridis = FALSE,
sequential.direction = 1,
sequential.palette = "YlGnBu",
viridis.palette = "G",
viridis.direction = -1,
diverging.palette = "RdBu",
diverging.direction = -1,
flip = FALSE,
min.cutoff.loadings = NA,
max.cutoff.loadings = NA,
min.cutoff.expression = NA,
max.cutoff.expression = NA,
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 |
|
group.by |
|
subsample |
|
dims |
|
top_loadings |
|
assay |
|
slot |
|
grid.color |
|
border.color |
|
number.breaks |
|
na.value |
|
legend.position |
|
legend.title |
|
legend.type |
|
legend.framewidth , legend.tickwidth |
|
legend.length , legend.width |
|
legend.framecolor |
|
legend.tickcolor |
|
font.size |
|
font.type |
|
axis.text.x.angle |
|
use_viridis |
|
sequential.direction |
|
sequential.palette |
|
viridis.palette |
|
viridis.direction |
|
diverging.palette |
|
diverging.direction |
|
flip |
|
min.cutoff.loadings , max.cutoff.loadings |
|
min.cutoff.expression , max.cutoff.expression |
|
plot.title.face , plot.subtitle.face , plot.caption.face , axis.title.face , axis.text.face , legend.title.face , legend.text.face |
|
A ggplot2 object.
# Check Suggests.
value <- SCpubr:::check_suggests(function_name = "do_LoadingsPlot", 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"))
p <- SCpubr::do_LoadingsPlot(sample = sample,
dims = 1:2)
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.