feature_heatmap: feature heatmap

jj_feature_heatmapR Documentation

feature heatmap

Description

feature heatmap

Usage

jj_plot_heatmap(
  obj,
  features_use,
  group_vec,
  scale_data = TRUE,
  show_top_annot = TRUE,
  row_annot = NULL,
  return_matrix = FALSE,
  cluster_rows = T,
  cluster_columns = T,
  transpose = F,
  ...
)

jj_plot_dotplot(
  obj,
  features_use,
  group_vec,
  scale_data = FALSE,
  cluster_rows = TRUE,
  cluster_columns = TRUE,
  cap_top = NULL,
  cap_bottom = NULL,
  transpose = F,
  max_size = 6
)

Arguments

obj

Seurat object or matrix with features in rows and cells in columns

features_use

Features to plot from the Seurat active assay or the matrix

group_vec

vector with group annotation, has to have length equal to ncol(obj)

scale_data

scale feature-wise (i.e. the columns of the heatmap)

show_top_annot

if TRUE and features_use is a named vector, the names are used as top annotation

row_annot

either TRUE/FALSE to show colour bar by group from group_vec or a HeatmapAnnotation object

transpose

if TRUE, transpose the heatmap and show features as rows

column_colors

list with colour mapping for the column labels

group_annot_df

optional data.frame with group annotations to plot for the columns in jj_plot_dotplot

Examples

jj_plot_heatmap(pbmc_small, features_use = c('CD8A','KLRG1','CD79A','CD79B','CD3E'), group_vec = pbmc_small$groups, scale_data=F)
#pass named vector to features_use to show column annotation
jj_plot_heatmap(GetAssayData(pbmc_small), features_use = c(T='CD8A',T='KLRG1',B='CD79A',B='CD79B',T='CD3E', myeloid = 'CD14'), group_vec = pbmc_small$groups, row_annot = T)
#when transposing the heatmap, the row_annot is shown as top annotation
jj_plot_heatmap(GetAssayData(pbmc_small), features_use = c('CD8A','KLRG1','CD79A','CD79B','CD3E'), group_vec = pbmc_small$groups, transpose = T, row_annot = T)
jj_plot_heatmap(GetAssayData(pbmc_small), features_use = c('CD8A','KLRG1','CD79A','CD79B','CD3E'), group_vec = pbmc_small$groups, transpose = T, row_annot = HeatmapAnnotation(myannot = c('Group1', 'Group2'), col = list(myannot = c(Group1='green', Group2='cyan'))))
jj_plot_dotplot(GetAssayData(pbmc_small), features_use = c('CD8A','KLRG1','CD79A','CD79B','CD3E'), group_vec = pbmc_small$groups)

mathosi/jj documentation built on Feb. 25, 2024, 2:29 p.m.