Learn R Programming

Seurat (version 2.3.4)

DoHeatmap: Gene expression heatmap

Description

Draws a heatmap of single cell gene expression using ggplot2.

Usage

DoHeatmap(object, data.use = NULL, use.scaled = TRUE, cells.use = NULL,
  genes.use = NULL, disp.min = -2.5, disp.max = 2.5, group.by = "ident",
  group.order = NULL, draw.line = TRUE, col.low = "#FF00FF",
  col.mid = "#000000", col.high = "#FFFF00", slim.col.label = FALSE,
  remove.key = FALSE, rotate.key = FALSE, title = NULL, cex.col = 10,
  cex.row = 10, group.label.loc = "bottom", group.label.rot = FALSE,
  group.cex = 15, group.spacing = 0.15, assay.type = "RNA",
  do.plot = TRUE)

Arguments

object

Seurat object

data.use

Option to pass in data to use in the heatmap. Default will pick from either object@data or object@scale.data depending on use.scaled parameter. Should have cells as columns and genes as rows.

use.scaled

Whether to use the data or scaled data if data.use is NULL

cells.use

Cells to include in the heatmap (default is all cells)

genes.use

Genes to include in the heatmap (ordered)

disp.min

Minimum display value (all values below are clipped)

disp.max

Maximum display value (all values above are clipped)

group.by

Groups cells by this variable. Default is object@ident

group.order

Order of groups from left to right in heatmap.

draw.line

Draw vertical lines delineating different groups

col.low

Color for lowest expression value

col.mid

Color for mid expression value

col.high

Color for highest expression value

slim.col.label

display only the identity class name once for each group

remove.key

Removes the color key from the plot.

rotate.key

Rotate color scale horizantally

title

Title for plot

cex.col

Controls size of column labels (cells)

cex.row

Controls size of row labels (genes)

group.label.loc

Place group labels on bottom or top of plot.

group.label.rot

Whether to rotate the group label.

group.cex

Size of group label text

group.spacing

Controls amount of space between columns.

assay.type

to plot heatmap for (default is RNA)

do.plot

Whether to display the plot.

Value

Returns a ggplot2 plot object

Examples

Run this code
# NOT RUN {
DoHeatmap(object = pbmc_small)

# }

Run the code above in your browser using DataLab