ggheatmap: Heatmaps Using ggplot2 This function can be used to create...

Description Usage Arguments Details Value Author(s)

View source: R/ggheatmap.R

Description

Heatmaps Using ggplot2

This function can be used to create heatmaps with dendrograms similar to heatmap.2 using ggplot2 and ggdendro for a more "modern" and clean appearance.

Usage

1
2
3
ggheatmap(data, distance = "euclidean", linkage = "average",
  row_sort = TRUE, col_sort = TRUE, labframe = NULL, rlabframe = NULL,
  colbrew = "Set1", rcolbrew = "Set1", rtext = NULL, fill_title = NULL)

Arguments

data

a numeric matrix of expression, genes x samples, or a dist object

distance

a character string for dist, or a function which returns a dist object (default = "euclidean")

linkage

a character string for hclust to use for clustering (default = "average")

row_sort

a logical whether rows should be reordered based on clustering (default = TRUE)

col_sort

a logical whether columns should be reordered based on clustering (default = TRUE)

labframe

a data.frame of column labels (default = NULL)

rlabframe

a data.frame of row labels (default = NULL)

colbrew

a vector of strings same length as labframe specifying the colors to be used for column labels, if length is 1 same palette is repeated, see Details regarding valid strings (default = "Set1")

rcolbrew

a vector of strings same length as rlabframe specifying the colors to be used for row labels, if length is 1 same palette is repeated, see Details regarding valid strings (default = "Set1")

rtext

a vector of strings with text annotations for rows of heatmap (default = NULL)

fill_title

a character string specifying the fill title (default = NULL)

Details

Valid choices of color palettes are listed in RColorBrewer::brewer.pal.info

Value

a ggplot object

Author(s)

Patrick Kimes


pkimes/pkimes documentation built on May 25, 2019, 8:20 a.m.