plot_heatmap: Heatmap of median marker expression

View source: R/plot_heatmap.R

plot_heatmapR Documentation

Heatmap of median marker expression

Description

Heatmap of median marker expression

Usage

plot_heatmap(
  df_samples,
  sample_info_names,
  protein_names,
  arrange_by_1,
  arrange_by_2 = "",
  cluster_cols = FALSE,
  fun = median
)

Arguments

df_samples

Data frame or tibble with proteins counts, cell condition, and group information

sample_info_names

Column names that contain information about the cell, e.g. donor, condition, file name, or cell type

protein_names

A vector of column names of protein to use in the analysis

arrange_by_1

Column name

arrange_by_2

Column name

cluster_cols

Apply hierarchical cluster to columns

fun

Summary statistics of marker expression

Value

pheatmap object

Examples

set.seed(23)
df <- generate_data()
protein_names <- names(df)[3:12]
df <- dplyr::mutate_at(df, protein_names, function(x) asinh(x/5))
CytoGLMM::plot_heatmap(df,
                       protein_names = protein_names,
                       sample_info_names = c("donor", "condition"),
                       arrange_by_1 = "condition")

ChristofSeiler/CytoGLMM documentation built on April 21, 2023, 3:38 a.m.