Plots a heatmap of the proteins showing a temporal trend, with the rows split by cluster. The values displayed can be the measured mean at each timepoint or the smooth trajectory fitted by analyze.timecourse.

heatmap.timecourse(
  DEprot.timecourse.object,
  clusters = NULL,
  top.n = NULL,
  values = "zscore",
  reference.time = NULL,
  use.fitted = FALSE,
  order.by = "rank",
  group.subset = NULL,
  palette = NULL,
  low.color = "#2166AC",
  mid.color = "white",
  high.color = "firebrick",
  na.color = "gray",
  color.limits = c(NA, NA),
  cell.border.color = NA,
  cell.border.width = 0.5,
  panel.border = TRUE,
  panel.border.color = "black",
  show.protein.names = FALSE,
  protein.names.pattern = NULL,
  show.cluster.size = TRUE,
  title = NULL
)

Arguments

DEprot.timecourse.object

An object of class DEprot.timecourse.

clusters

Numeric value (or vector) indicating the cluster(s) to display. Default: NULL (all the clusters).

top.n

Numeric value indicating how many best-ranked proteins of each cluster should be displayed. Default: NULL (all the proteins).

values

String indicating the quantity displayed. One among: 'zscore' (row-wise Z-score, the scale on which the clustering was performed), 'log2FC' (log2 fold change relative to reference.time; the counts being already in log2, this is a simple subtraction), 'counts' (the log2 values as they are). Aliases are accepted ('fc', 'foldchange', 'log2', 'z', ...). Default: "zscore".

reference.time

Numeric value indicating the timepoint used as baseline when values is 'log2FC'. Default: NULL (the earliest timepoint).

use.fitted

Logic value indicating whether the fitted trajectories should be displayed (smooth heatmap, one column per grid point) instead of the mean measured value at each timepoint (one column per timepoint). Default: FALSE.

order.by

String indicating how the proteins should be sorted within each cluster. One among: 'rank' (the ranking stored in the object), 'membership' (most prototypical first), 'peak.time' (sorts the proteins by the moment of their maximal change, generating a wave-like pattern), 'amplitude' or 'hclust' (hierarchical clustering of the profiles). Default: "rank".

group.subset

String (or vector) indicating which group levels should be displayed when a group.column was used. Default: NULL (all the groups).

palette

Vector of colors used when values is 'counts'. Default: NULL, meaning that the 'mako' viridis palette is used.

low.color

String indicating the color of the lowest values (only for 'zscore' and 'log2FC'). Default: "#2166AC".

mid.color

String indicating the color of the values at zero (only for 'zscore' and 'log2FC'). Default: "white".

high.color

String indicating the color of the highest values (only for 'zscore' and 'log2FC'). Default: "firebrick".

na.color

String indicating the color used for the missing values. Default: "gray".

color.limits

Numeric vector of two elements indicating the limits of the color scale. Values outside the range are squished to the extremes. Default: c(NA, NA) (automatic and symmetric around zero).

cell.border.color

String indicating the color of the cell borders (ignored when use.fitted is TRUE). Default: NA.

cell.border.width

Numeric value indicating the width of the cell borders. Default: 0.5.

panel.border

Logic value indicating whether a border should be drawn around each facet, meaning around each cluster block. Default: TRUE.

panel.border.color

String indicating the color of the panel border. Default: "black".

show.protein.names

Logic value indicating whether the protein names should be displayed on the y-axis. Default: FALSE.

protein.names.pattern

String indicating a pattern to be passed to gsub in order to shorten the protein names displayed. Default: NULL (no changes in the IDs).

show.cluster.size

Logic value indicating whether the number of proteins should be added to the cluster labels. Default: TRUE.

title

String indicating the title of the plot. Default: NULL (automatic).

Value

A plot of class ggplot2.

Author

Sebastian Gregoricchio