biosHeatmap: CUSTOMED HEATMAP.2 FOR BIOS USERS

biosHeatmapR Documentation

CUSTOMED HEATMAP.2 FOR BIOS USERS

Description

A tailored version of the heatmap.2 function in the gplots package, by giving the default values in the paramter list.

Usage

biosHeatmap(
  x,
  Rowv = TRUE,
  Colv = if (symm) "Rowv" else TRUE,
  distfun = dist,
  hclustfun = function(x) hclust(x, method = "ward.D2"),
  dendrogram = c("both", "row", "column", "none"),
  symm = FALSE,
  scale = c("none", "row", "column"),
  na.rm = TRUE,
  revC = identical(Colv, "Rowv"),
  add.expr,
  breaks,
  symbreaks = min(x < 0, na.rm = TRUE) || scale != "none",
  col = "greenred",
  na.color = "darkgray",
  colsep,
  rowsep,
  sepcolor = "white",
  sepwidth = c(0.05, 0.05),
  cellnote,
  notecex = 1,
  notecol = "cyan",
  trace = c("none", "column", "row", "both"),
  tracecol = "cyan",
  hline = median(breaks),
  vline = median(breaks),
  linecol = tracecol,
  margins = NULL,
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  labRow = NULL,
  labCol = NULL,
  cexMain = NULL,
  cexRow = pmin(1, 0.2 + 1/log10(nr)),
  cexCol = pmin(1, 0.2 + 1/log10(nc)),
  ColSideColors,
  RowSideColors,
  color.key.title = "Color Key",
  key = TRUE,
  keysize = 1.5,
  density.info = c("none", "histogram", "density"),
  denscol = tracecol,
  symkey = min(x < 0, na.rm = TRUE) || symbreaks,
  densadj = 0.25,
  zlim,
  lhei = c(1, 7),
  lwid = c(1, 7),
  lmat = NULL,
  ...
)

Arguments

x

A matrix

Rowv

Logical, whether row-wise dendrogram should be calculated

Colv

Logical, whether column-wise dendrogram should be calculated

distfun

Function, for calculating distance

hclustfun

Function, for hierarchical clustering. By default, the ward.D2 method is used.

dendrogram

Character, specify which dendrogram to be drawn. Note that Rowv and Colv determines whether dendrograms are calculated and rows or columns are reordered.

symm

Logical. Should the matrix be treated as symmetric

scale

Logical, should the matrix be row-scaled

na.rm

Logical, should NA values should be omitted

revC

Logical, should columns be reversed

add.expr

Expression

breaks

Numeric vector, where to set breaks. Can be missing.

symbreaks

Logical, should be breaks symmetric

col

Colors for the heatmap, by default green indicates low and red indicates high values

na.color

Color for NA cells, darkgray by default

colsep, rowsep

Integer vector, positions at which columns or rows are separated

sepcolor, sepwidth

Color and width of separating lines

cellnote

Cell labelling

notecex

Cell labelling font size

notecol

Cell labelling font color

trace

Logical , whether drawing tracing lines, by default not

tracecol

Level trace

hline

Level trace hline

vline

Level trace vline

linecol

Level trace color

margins

Margins of labs, automatically guessed if no value was provided

main, xlab, ylab

Heatmap title, X and Y axis labels

labRow, labCol

Row and column labels

cexMain, cexRow, cexCol

Title, row and column label font sizes

ColSideColors, RowSideColors

Column and row side colors

color.key.title

Color key title

key

Logical, whether key should be drawn

keysize

Key size

density.info

Logical, drawing density info in the key histogram, by default not

denscol

Logical, should density information be displayed

symkey

Logical, should the key be symmetric

densadj

densadj

zlim

zlim

lhei

Heights of rows

lwid

Widths of columns

lmat

lmat

...

Other paramters passed to heatmap.2 function

Details

Customed version of the heatmap.2, with the common settings used by JItao David Zhang

Value

See heatmap.2 in the gplots package.

Author(s)

Jitao David Zhang <jitao_david.zhang@roche.com>

Examples


set.seed(123)
test <- matrix(rnorm(100), nrow=10)
biosHeatmap(test)

## do not draw row-wise dendrogram
biosHeatmap(test, Rowv=FALSE, dendrogram="column")
## do not draw column-wise dendrogram
biosHeatmap(test, Colv=FALSE, dendrogram="row")
## do not re-sort columns/rows (e.g. for visualization purposes)
biosHeatmap(test, Rowv=FALSE, Colv=FALSE, dendrogram="none")

## define the color range by zlim
biosHeatmap(test, zlim=c(-5, 5))


bedapub/ribiosPlot documentation built on Sept. 1, 2023, 6:50 p.m.