makepHeatmap: plots a heatmap

View source: R/makeRiverPlots.R

makepHeatmapR Documentation

plots a heatmap

Description

plots a heatmap

Usage

makepHeatmap(
  mx,
  nCol = 200,
  col = "default",
  maxVal = "default",
  minVal = "default",
  label = "",
  DEsaturation = log2(10),
  reverseGradient = F,
  border_color = NA,
  cluster_rows = F,
  cluster_cols = F,
  ...
)

Arguments

mx

numeric. The matrix to be plotted.

nCol

numeric. The number of colours in the gradient. Default 200.

col

character. The colour scheme to be used. The default 'default' gives a scale adapted for freqwuencies between 0 and 1, with extra attention to values close to 0. 'sunset' is a easier on the eye, but has less ability to resolve values close to the lowest value. 'DE' is meant for differential expression, and sets 0 to black, with red and blue gradient towards positive and negative values, saturating at the DEsaturation parameter.

maxVal

numeric. Only for internal use. Default 'default'.

minVal

numeric. Only for internal use. Default 'default'.

label

character. The label for the colour scale on the side. Default ”.

DEsaturation

numeric. The value where the colour saturates when col='DE'. Default log2(10).

...

remaining arguments are passed to base heatmap(...)

Details

This function is a wrapped pheatmap() function with some changed colours and defaults. Depends on pheatmap package, which is not a superFreq dependency, so need to load that library before using this.

Examples

#random matrix to plot, centered around 0. Plot in 'DE' colours.
mx = matrix(rt(400, df=10), nrow=100)
makeHeatmap(mx, col='DE')

#random matrix to plot, between 0 and 1. Plot in default and sunset colours.
mx = matrix(runif(400), nrow=100)
makeHeatmap(mx)
makeHeatmap(mx, col='sunset')


ChristofferFlensburg/superFreq documentation built on Nov. 15, 2023, 6:15 a.m.