heatmap returns a heatmap plot and a list of genes in the plot

heatMap(
  object,
  norm.method = "quant",
  annotation.col = c("class", "segment", "region"),
  ngenes = 200,
  scale.by.row.or.col = "row",
  show.rownames = FALSE,
  show.colnames = FALSE,
  clustering.method = "average",
  cluster.rows = TRUE,
  cluster.cols = TRUE,
  clustering.distance.rows = "correlation",
  clustering.distance.cols = "correlation",
  annotation.row = NA,
  breaks.by.values = seq(-3, 3, 0.05),
  heatmap.color = colorRampPalette(c("blue", "white", "red"))(120)
)

Arguments

object

object Normalized NanoStringGeoMxSet object to use for heatmap. It is a S4 object.

norm.method

normalization method quant: Upper quartile (Q3) normalization and neg: background normalization (Default: quant)

annotation.col

the annotations shown on right side of the heatmap (Default: c("class", "segment", "region"))

ngenes

Number of high CV genes to cluster and plot (Default: 200)

scale.by.row.or.col

Scale.by perform z-scaling. Choices are "row", "column" and "none" (Default: "row")

show.rownames

Boolean specifying if row names are be shown. (Default: FALSE)

show.colnames

Boolean specifying if column names are be shown. (Default: FALSE)

clustering.method

Clustering method used. Accepts the same values as . hclust. e.g "ward.D", "ward.D2", "single", "complete", "average" . (Default: "average")

cluster.rows

Boolean values determining if rows should be clustered or hclust object (Default: TRUE)

cluster.cols

Boolean values determining if cols should be clustered or hclust object (Default: TRUE)

clustering.distance.rows

Distance for clustering by rows (correlation, or euclidean) (Default: "correlation")

clustering.distance.cols

Distance for clustering by cols (correlation, or euclidean) (Default: "correlation")

annotation.row

A data frame that specifies the annotations shown on left side of the heatmap (Default: NA)

breaks.by.values

A sequence of numbers that covers the range of values in mat (Deafult: seq(-3, 3, 0.05), provides 120 colors)

heatmap.color

Colors of heatmap to match breaks above (Default: colorRampPalette( c("blue", "white", "red"))(120))

Value

A list containing the plot genes data matrix, and the heatmap plot

Details

Clustering high CV Genes and making a heatmap

  1. Exploring the normalized data by calculating the coefficient of variation (CV) for each gene (g) using the formula CVg=SDg/meang.

  2. We then identify genes with high CVs that should have large differences across the various profiled segments.

  3. This unbiased approach can reveal highly variable genes across the study.

  4. We plot the results using unsupervised hierarchical clustering, displayed as a heatmap.

This function will run pheatmap from the GeoMxTools package.