Learn R Programming

tinyarray (version 3.0.0)

ggheat: ggheat

Description

draw heatmap plot with annotation by ggplot2

Usage

ggheat(
  dat,
  group,
  cluster = FALSE,
  color = c("#2874C5", "white", "#f87669"),
  legend_color = c("#2874C5", "#f87669", "#e6b707", "#868686", "#66C2A5", "#FC8D62",
    "#8DA0CB", "#E78AC3", "#A6D854", "#FFD92F", "#E5C494", "#B3B3B3"),
  show_rownames = NULL,
  show_colnames = TRUE,
  cluster_rows = FALSE,
  cluster_cols = FALSE,
  groupname = "group",
  expname = "exp",
  fill_mid = TRUE,
  rotate_rownames = NULL
)

Value

a ggplot object

Arguments

dat

expression matrix for plot

group

group for expression colnames

cluster

logical,cluster in both rows and column or not, default F,now replaced by cluster_rows and cluster_cols.

color

color for heatmap

legend_color

color for legend

show_rownames

logical or NULL. When NULL, the function shows x-axis labels for up to 100 rows, rotates them 45 degrees for 9 to 100 rows, and hides them above 100 rows.

show_colnames

logical,show colnames in plot or not, default T

cluster_rows

logical, if rows (on the plot) should be clustered, default F

cluster_cols

logical, if column (on the plot) should be clustered, default F

groupname

name of group legend

expname

name of exp legend

fill_mid

use median value as geom_tile fill midpoint

rotate_rownames

logical or NULL. When NULL, the function uses the automatic rotation rule described in show_rownames.

Author

Xiaojie Sun