do_TFActivityPlot {SCpubr} | R Documentation |
Plot TF Activities from decoupleR using Dorothea prior knowledge.
Description
Plot TF Activities from decoupleR using Dorothea prior knowledge.
Usage
do_TFActivityPlot(
sample,
activities,
n_tfs = 25,
slot = "scale.data",
statistic = "norm_wmean",
tfs.use = NULL,
group.by = NULL,
split.by = NULL,
na.value = "grey75",
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,
enforce_symmetry = TRUE,
diverging.palette = "RdBu",
diverging.direction = -1,
use_viridis = FALSE,
viridis.palette = "G",
viridis.direction = -1,
sequential.palette = "YlGnBu",
sequential.direction = 1,
min.cutoff = NA,
max.cutoff = NA,
number.breaks = 5,
flip = FALSE,
return_object = FALSE,
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"
)
Arguments
sample |
|
activities |
|
n_tfs |
|
slot |
|
statistic |
|
tfs.use |
|
group.by |
|
split.by |
|
na.value |
|
legend.position |
|
legend.length , legend.width |
|
legend.framewidth , legend.tickwidth |
|
legend.framecolor |
|
legend.tickcolor |
|
legend.type |
|
font.size |
|
font.type |
|
axis.text.x.angle |
|
enforce_symmetry |
|
diverging.palette |
|
diverging.direction |
|
use_viridis |
|
viridis.palette |
|
viridis.direction |
|
sequential.palette |
|
sequential.direction |
|
min.cutoff , max.cutoff |
|
number.breaks |
|
flip |
|
return_object |
|
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 |
|
Value
A ggplot2 object.
Examples
# Check Suggests.
value <- SCpubr:::check_suggests(function_name = "do_TFActivityPlot", 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"))
# Define your activities object.
dorothea_activities <- readRDS(system.file("extdata/dorothea_activities_example.rds",
package = "SCpubr"))
# General heatmap.
out <- SCpubr::do_TFActivityPlot(sample = sample,
activities = dorothea_activities)
p <- out$heatmaps$average_scores
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()`.")
}