prepare_heatmap_data2: Function to prepare data for a heatmap: scaling, dendrograms,...

Description Usage Arguments Details

View source: R/heatmap.n2.R

Description

Function to prepare data for a heatmap: scaling, dendrograms, ...

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
prepare_heatmap_data2(
  x,
  labRow = NA,
  labCol = NA,
  Rowv = NULL,
  Colv = NULL,
  reorder = c(TRUE, TRUE),
  distfun = dist,
  hclustfun = hclust,
  rowMembers = NULL,
  colMembers = NULL,
  spacer = 1,
  scale = "none",
  trim = NULL,
  zlim = NULL,
  col = NULL,
  filter = c(TRUE, TRUE),
  add.sig = FALSE,
  pv = NULL
)

Arguments

x

(numeric). Numeric matrix.

labRow

(character). Custom row labels.

labCol

(character). Custom column labels.

Rowv

(dendrogram or integer). Custom dendrogram object or integer vector giving the ordering index for rows.

Colv

(dendrogram or integer). Custom dendrogram object or integer vector giving the ordering index for columns

reorder

(logical). Boolean of length 2 for rows and columns. Should rows and/or columns be reordered according to Rowv/Colv?

distfun

(function). Distance function. Defaults to dist.

hclustfun

(function). Hierarchical clustering function. Defaults to hclust.

rowMembers

(character). Group vector to split rows by.

colMembers

(character). Group vector to split columns by.

spacer

(integer). Length 1 integer used as spacer to separate groups (see rowMembers/colMembers). Defaults to 1.

scale

(character). One of "row", "column" or "none": By which dimension should data be scaled? Defaults to "none".

trim

(numeric). Value to "cut off" data distribution. Values and both ends of the distribution, larger or smaller, respectively, will be made equal to +/-trim. Defaults to NULL, no trimming.

zlim

(numeric). Value to set the ranges for plotting x and y values. Supports both symmetrical (with default NULL) and asymmetrical (NA) automatic zlim. Used for zooming.

col

(character) Name (acronym) of the colour palette to use. Can be one of "RdBkGn" (c("green", "black", "red")), "BuYl" (c("blue", "yellow")), "BuWtRd" (c("blue", "white", "red")) or a valid name used by brewer.pal. Defaults to NULL which will set "RdBkGn".

filter

(integer or logical.) For filtering rows/columns: TRUE (=1.0) = remove rows/columns with only NAs, 0.5 = remove if >= 50 per cent NAs, etc. Defaults to c(TRUE, TRUE).

add.sig

(logical). Should significance asterixes be drawn?

pv

(numeric). Matrix of the same dimensions as x with P-Values for correlation significance.

Details

This function is used by heatmap.n2 and should not be called bu the user directly. It is only documented because its arguments are passed by the main function when given there.


heatmapFlex documentation built on Aug. 19, 2021, 9:07 a.m.