cmapHeatmap: Function to create an annotated heatmap of gene scores

Description Usage Arguments Value Author(s)

View source: R/cmapHeatmap.R

Description

This function takes a numerical matrix (with samples in columns and genes in rows), preprocesses the data (if desired), determines the optimal height for the heatmap and calls the .ImagePlot function to create the final heatmap figure.

Usage

1
2
3
4
5
6
7
8
cmapHeatmap(x, reference.name, col.anno = NULL, row.anno = NULL,
  file.name = "heatmap", url.base = NULL, main = "Query gene scores",
  ColorRamp = colorRampPalette(c("#044381FF", "grey95", "grey95",
  "firebrick"))(100), col.col = c(down = "black", up = "grey"),
  row.col = c(correlated = "#1B9E77", anticorrelated = "#044381FF", over =
  "#1B9E77", under = "#044381FF"), order.by.score = TRUE,
  cluster.rows = TRUE, score.cap = c(-5, 5),
  ylab = "Significant datasets")

Arguments

x

numerical matrix with samples in rows and genes in columns.

reference.name

character, names of the reference cmap, used to construct the html image reference

col.anno

character vector with column annotations to be displayed as (horizontal) annotation bar above the heatmap. If not NULL, must contain one elment for each column of 'x'.

row.anno

character vector with row annotations to be displayed as (vertical) annotation to the right of the heatmap. If not NULL, must contain one element for each row of 'x'.

file.name

character, the path and filename (without suffix) to save the png file to

url.base

character, prefix for the html image reference

main

Character, main title of the plot

ColorRamp

vector of colors used for the heatmap, e.g. generated by a call to colorRampPalette

col.col

named vector with a color for each level of col.anno (e.g. c(up="firebrick", down="blue"))

row.col

named vector with a color for each level of row.anno (e.g. c(correlated="firebrick",anticorrelated="#044381FF"))

order.by.score

logical, should gene scores be reordered independently for each sample ?

cluster.rows

logical, perform hierarchical clustering on significant gene sets ?

score.cap

numerical vector of length two, specifying the limits of the color scale. Scores > max( score.cap) or < min(score.cap) will be set to score.cap. Default: c(-5,5)

ylab

character, y-axis label

Value

list with two elements, 1. image.html: a character string with html code with the image tag refering to the output png 2. row.order: integer vector with thw row.order obtained after hierarchical clustering or NULL if no clustering was performed

Author(s)

Thomas Sandmann


gCMAPWeb documentation built on April 28, 2020, 8:23 p.m.