Merged visualization of proportion barplot and Chi-square residual heatmap between two variables of interest

EnrichPlots(
  seurat = NULL,
  var.1 = NULL,
  var.2 = NULL,
  limits = c(-20, 20),
  cols = NULL,
  pval = T,
  perm = 1000,
  padj.thresh = 0.05,
  alternative = c("two.sided", "less", "greater")
)

Arguments

seurat

a Seurat object containing Kandinsky data

var.1

character string, name of the first variable

var.2

character string, name of the second variable

limits

lower and upper residual caps for heatmap colour gradient

cols

color palette to use for plotting

pval

boolean, whether returning heatmap with cells annotated for significance or not (based on permutation test)

perm

numeric, number of var.1 and var.2 reshuffling to estimate enrichment pvalue between var.1 and var.2 via permutation test. Default is set to 1000

padj.thresh

numeric, adjusted pvalue threshold to define significant var.1/var.2 chisquare residuals

alternative

character string specifying the alternative hypothesis, must be one of "two.sided", "greater" (default) or "less".