View source: R/do_PathwayActivityPlot.R
do_PathwayActivityPlot | R Documentation |
Plot Pathway Activities from decoupleR using Progeny prior knowledge.
do_PathwayActivityPlot(
sample,
activities,
group.by = NULL,
split.by = NULL,
slot = "scale.data",
statistic = "norm_wmean",
pt.size = 1,
border.size = 2,
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,
min.cutoff = NA,
max.cutoff = NA,
number.breaks = 5,
diverging.palette = "RdBu",
diverging.direction = -1,
use_viridis = FALSE,
viridis.palette = "G",
viridis.direction = -1,
sequential.palette = "YlGnBu",
sequential.direction = 1,
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"
)
sample |
|
activities |
|
group.by |
|
split.by |
|
slot |
|
statistic |
|
pt.size |
|
border.size |
|
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 |
|
min.cutoff, max.cutoff |
|
number.breaks |
|
diverging.palette |
|
diverging.direction |
|
use_viridis |
|
viridis.palette |
|
viridis.direction |
|
sequential.palette |
|
sequential.direction |
|
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 |
|
A ggplot2 object.
# Check Suggests.
value <- SCpubr:::check_suggests(function_name = "do_PathwayActivityPlot", 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.
progeny_activities <- readRDS(system.file("extdata/progeny_activities_example.rds",
package = "SCpubr"))
# General heatmap.
out <- SCpubr::do_PathwayActivityPlot(sample = sample,
activities = progeny_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()`.")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.