Skip to contents

Functions to perform transformations on the matrix used for PlotHeatmap.

Usage

Transform.no(label = " ")

Transform.Z(label = "z score", center = TRUE, scale = TRUE)

Transform.VST(label = "VST")

Transform.logFC(label = "log2 FC", LFC.fun = NULL, columns = NULL, ...)

Arguments

label

label that is used for the heatmap legend

center

perform centering when computing Z scores (see scale)

scale

perform scaling when computing Z scores (see scale)

LFC.fun

function to compute log fold changes (default: PsiLFC, other viable option: NormLFC)

columns

which columns (i.e. samples or cells) to use as reference when computing log fold changes (see details)

...

further parameters passed down to LFC.fun

Value

A function that transforms a matrix.

Details

These functions should be used as transform parameter to PlotHeatmap. Available data transformations are

  • transform=Transform.Z(): compute z scores for each row; you can omit the usual centering or scaling by setting the respective parameters to false; see scale

  • transform=Transform.VST(): do a variance stabilizing transformation using vst

  • transform=Transform.logFC(): compute log2 fold changes to one or several reference columns; see below how to define them; fold changes are computed using the lfc package)

  • transform=Transform.no(): do not transform

The label to be used in the heatmap legend can be changed by specifying the label parameter.

For Transform.logFC, columns can be given as a logical, integer or character vector representing a selection of the columns (samples or cells).