View source: R/do_ActivityHeatmap.R
| do_ActivityHeatmap | R Documentation | 
Major contributions to this function:
Marc Elosua BayƩs for the core concept code and idea.
Pau Badia i Mompel for the network generation.
do_ActivityHeatmap(
  sample,
  input_gene_list,
  subsample = 2500,
  group.by = NULL,
  assay = NULL,
  slot = NULL,
  statistic = "ulm",
  number.breaks = 5,
  values.show = FALSE,
  values.threshold = NULL,
  values.size = 3,
  values.round = 1,
  use_viridis = FALSE,
  viridis.palette = "G",
  viridis.direction = -1,
  sequential.palette = "YlGnBu",
  sequential.direction = 1,
  diverging.palette = "RdBu",
  diverging.direction = -1,
  enforce_symmetry = TRUE,
  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",
  na.value = "grey75",
  font.size = 14,
  font.type = "sans",
  axis.text.x.angle = 45,
  flip = FALSE,
  colors.use = NULL,
  min.cutoff = NA,
  max.cutoff = NA,
  verbose = TRUE,
  return_object = FALSE,
  grid.color = "white",
  border.color = "black",
  flavor = "Seurat",
  nbin = 24,
  ctrl = 100,
  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 | 
 
  | 
input_gene_list | 
 
  | 
subsample | 
 
  | 
group.by | 
 
  | 
assay | 
 
  | 
slot | 
 
  | 
statistic | 
 
  | 
number.breaks | 
 
  | 
values.show | 
 
  | 
values.threshold | 
 
  | 
values.size | 
 
  | 
values.round | 
 
  | 
use_viridis | 
 
  | 
viridis.palette | 
 
  | 
viridis.direction | 
 
  | 
sequential.palette | 
 
  | 
sequential.direction | 
 
  | 
diverging.palette | 
 
  | 
diverging.direction | 
 
  | 
enforce_symmetry | 
 
  | 
legend.position | 
 
 
  | 
legend.length, legend.width | 
 
  | 
legend.framewidth, legend.tickwidth | 
 
  | 
legend.framecolor | 
 
  | 
legend.tickcolor | 
 
  | 
legend.type | 
 
 
  | 
na.value | 
 
  | 
font.size | 
 
  | 
font.type | 
 
 
  | 
axis.text.x.angle | 
 
  | 
flip | 
 
  | 
colors.use | 
 
  | 
min.cutoff, max.cutoff | 
 
  | 
verbose | 
 
  | 
return_object | 
 
  | 
grid.color | 
 
  | 
border.color | 
 
  | 
flavor | 
 
  | 
nbin | 
 
  | 
ctrl | 
 
  | 
plot.title.face, plot.subtitle.face, plot.caption.face, axis.title.face, axis.text.face, legend.title.face, legend.text.face | 
 
 
  | 
A list containing different plots.
  # Check Suggests.
  value <- SCpubr:::check_suggests(function_name = "do_ActivityHeatmap", 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"))
    
    # Genes have to be unique.
    genes <- list("A" = rownames(sample)[1:5],
                  "B" = rownames(sample)[6:10],
                  "C" = rownames(sample)[11:15])
    
    # Default parameters.
    p <- SCpubr::do_ActivityHeatmap(sample = sample,
                                    input_gene_list = genes,
                                    nbin = 1,
                                    ctrl = 5,
                                    flavor = "Seurat",
                                    subsample = NA,
                                    verbose = FALSE)
    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.