make.diffexp.heatmap: Make a heatmap of the most differentially expressed genes in...

View source: R/differential_expression.R

make.diffexp.heatmapR Documentation

Make a heatmap of the most differentially expressed genes in a cluster

Description

Given a seurat object, a table of differential expression fold changes and p-values, a cluster number, and a grouping variable name, make a heatmap that shows per-cell expression of the genes with the smallest differential expression p-values, ordered by fold change.

Usage

make.diffexp.heatmap(
  seurat,
  diff.exp,
  cluster,
  grouping.var,
  min.fc = 1,
  max.p = 0.001,
  max.features = 30
)

Arguments

seurat

A seurat object with defined clusters

diff.exp

A table of differential expression p-values and fold changes for all clusters, with columns feature, cluster, fold.change, and p.

cluster

The number of the cluster to plot expression for

grouping.var

The name of the metadata variable in seurat that cells were grouped by in differential expression analysis

min.fc

Minimum absolute value of fold change to include a feature in heatmap

max.p

Maximum differential expression p-value to include a feature in heatmap

max.features

Maximum number of features to include in the heatmap

Value

A ggplot object containing a heatmap with expression of at most max.features genes with the smallest differential expression p-values, ordered by fold change, for all cells in cluster, grouped by grouping.var.


WarrenLab/single-cell documentation built on June 10, 2022, 1:50 a.m.