Learn R Programming

WGCNA (version 1.73)

labeledHeatmap.multiPage: Labeled heatmap divided into several separate plots.

Description

This function produces labaled heatmaps divided into several plots. This is useful for large heatmaps where labels on individual columns and rows may become unreadably small (or overlap).

Usage

labeledHeatmap.multiPage(
   # Input data and ornaments
   Matrix, 
   xLabels, yLabels = NULL,
   xSymbols = NULL, ySymbols = NULL,
   textMatrix = NULL, 

# Paging options rowsPerPage = NULL, maxRowsPerPage = 20, colsPerPage = NULL, maxColsPerPage = 10, addPageNumberToMain = TRUE,

# Further arguments to labeledHeatmap zlim = NULL, signed = TRUE, main = "", ...)

Value

None.

Arguments

Matrix

numerical matrix to be plotted in the heatmap.

xLabels

labels for the columns. See Details.

yLabels

labels for the rows. See Details.

xSymbols

additional labels used when xLabels are interpreted as colors. See Details.

ySymbols

additional labels used when yLabels are interpreted as colors. See Details.

textMatrix

optional text entries for each cell. Either a matrix of the same dimensions as Matrix or a vector of the same length as the number of entries in Matrix.

rowsPerPage

optional list in which each component is a vector specifying which rows should appear together in each plot. If not given, will be generated automatically based on maxRowsPerPage below and the number of rows in Matrix.

maxRowsPerPage

integer giving maximum number of rows appearing on each plot (page).

colsPerPage

optional list in which each component is a vector specifying which columns should appear together in each plot. If not given, will be generated automatically based on maxColsPerPage below and the number of rows in Matrix.

maxColsPerPage

integer giving maximum number of columns appearing on each plot (page).

addPageNumberToMain

logical: should plot/page number be added to the main title of each plot?

zlim

Optional specification of the extreme values for the color scale. If not given, will be determined from the input Matrix.

signed

logical: should the input Matrix be converted to colors using a scale centered at zero?

main

Main title for each plot/page, optionally with the plot/page number added.

...

other arguments to function labeledHeatmap.

Author

Peter Langfelder

Details

The function labeledHeatmap is used to produce each plot/page; most arguments are described in more detail in the help file for that function.

In each plot/page labeledHeatmap plots a standard heatmap plot of an appropriate sub-rectangle of Matrix and embellishes it with row and column labels and/or with text within the heatmap entries. Row and column labels can be either character strings or color squares, or both.

To get simple text labels, use colorLabels=FALSE and pass the desired row and column labels in yLabels and xLabels, respectively.

To label rows and columns by color squares, use colorLabels=TRUE; yLabels and xLabels are then expected to represent valid colors. For reasons of compatibility with other functions, each entry in yLabels and xLabels is expected to consist of a color designation preceded by 2 characters: an example would be MEturquoise. The first two characters can be arbitrary, they are stripped. Any labels that do not represent valid colors will be considered text labels and printed in full, allowing the user to mix text and color labels.

It is also possible to label rows and columns by both color squares and additional text annotation. To achieve this, use the above technique to get color labels and, additionally, pass the desired text annotation in the xSymbols and ySymbols arguments.

If rowsPerPage (colsPerPage) is not given, rows (columns) are allocated automatically as uniformly as possible, in contiguous blocks of size at most maxRowsPerPage (maxColsPerPage). The allocation is performed by the function allocateJobs.

See Also

The workhorse function labeledHeatmap for the actual heatmap plot;

function allocateJobs for the allocation of rows/columns to each plot.