Plots an heatmap of the counts (raw, normalized, or imputed). It is possible to perform a scaling (z-score) by row or by column.

heatmap.counts(
  DEprot.object,
  which.data = "imputed",
  contrast = NULL,
  top.n = NULL,
  sample.subset = NULL,
  protein.subset = NULL,
  group.by.metadata.column = NULL,
  scale = NULL,
  clust.rows = TRUE,
  clust.columns = TRUE,
  distance.method = "euclidean",
  clustering.method = "complete",
  palette = RColorBrewer::brewer.pal(n = 9, name = "Blues"),
  high.color = "firebrick",
  low.color = "#2166AC",
  mid.color = "white",
  na.color = "gray",
  cell.border.color = NA,
  cell.border.width = 0.5,
  show.protein.names = FALSE,
  title = NULL,
  use.uncorrected.pvalue = FALSE
)

Arguments

DEprot.object

An object of class DEprot or DEprot.analyses.

which.data

String indicating which type of counts should be used. One among: 'raw', 'normalized', 'norm', 'imputed', 'imp'. Default: "imputed".

contrast

Numeric vector indicating the position of the contrast to use for the plotting. Only differential proteins in this contrast will be shown. Option available only for an object of class DEprot.analyses. Default: NULL (non differential protein selection).

top.n

Numeric value indicated the top differentially expressed proteins to consider for the contrast selected. The rank is based on the product of log2Fc and -log10Padj. Option available only for an object of class DEprot.analyses. Default: NULL (all differential proteins of that contrast).

sample.subset

Character vector indicating a subset of samples to display. The identifiers must correspond to a IDs in the column.id column of the object's metadata. Default: NULL (all samples are shown).

protein.subset

Character vector indicating a subset of proteins to display. The identifiers must correspond to the row.names of the counts table (equivalent to the prot.id column of the fold change table of DEprot.analyses object). This options is can be used in combination with contrast and top.n. Default: NULL (all proteins are shown).

group.by.metadata.column

String indicating a column from the metadata table. This column will be used to define sample groups, and for each group it will be computed a mean of the counts. Default: NULL (no groups).

scale

String indicating whether Z-scores should be computed. Possible choices: "row" or "column". Default: NULL (no scaling),

clust.rows

Logical value indicating whether heatmap rows (proteins) should be clustered. Default: TRUE.

clust.columns

Logical value indicating whether heatmap columns (samples or groups) should be clustered. Default: TRUE.

distance.method

The distance measure to be used. This must be one of "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski". Any unambiguous substring can be given. Default: "euclidean".

clustering.method

The agglomeration method to be used. This should be (an unambiguous abbreviation of) one of "ward.D", "ward.D2", "single", "complete", "average" (= UPGMA), "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC). Default: complete"}.}\item{palette}{List of colors to use for the color gradient of the heatmap. This parameters is used when raw-counts are plotted. For scaled data see the high, low and mid parameters. Default: \code{RColorBrewer::brewer.pal(n = 9, name = "Blues")}.}\item{high.color}{String indicating the color to use for positive Z-score for scaled data. Default: \code{"indianred"}.}\item{low.color}{String indicating the color to use for negative Z-score for scaled data. Default: \code{"#2166AC" (blue).

mid.color

String indicating the color to use for the 0 Z-score value for scaled data. Default: "white".

na.color

String indicating the color to use for the NA values in the heatmap. Default: "gray".

cell.border.color

String indicating the color to use for the individual cells border. Default: NA (no border).

cell.border.width

Numeric value indicating the width of the cell border line. Ignored when cell.border.color = NA. Default: 0.5.

show.protein.names

Logical value to indicate whether the protein names should be displayed. Default: FALSE.

title

String indicating the title to use, markdown formatting supported. Default: NULL (automatic title).

use.uncorrected.pvalue

Logical value indicating whether it should be used the normal p-value instead of the adjusted one (differential proteins numbers are recomputed). Default: FALSE, padj is used.

Value

A DEprot.contrast.heatmap object, which contains the heatmap and the hclust object used to order the rows.