PhysioHeatmap: Drawing Heatmap of CalculatePhysioMap's Output

Description Usage Arguments Value Examples

View source: R/HeatMapPlotter.R

Description

Draws a custom heatmap based on the result matrix generated by CalculatePhysioMap() function.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
PhysioHeatmap(
  PhysioResults,
  ColorLevels = 100,
  Width = 7,
  Height = 7,
  main = "",
  PlotSize = NA,
  SymmetricColoring = FALSE,
  RowColCex = NA,
  KeyLabelCex = NA,
  SpaceClustering = FALSE,
  Space = NA,
  ReducedPlotting = FALSE
)

Arguments

PhysioResults

Matrix of scores generated by CalculatePhysioMap().

ColorLevels

An integer indicating how many colors to use when plotting the heatmap. Default is 100.

Width

Width of the output plot, in inches. Default is 7.

Height

Height of the output plot, in inches. Default is 7.

main

The title of the heatmap. Default is an empty string (no title).

PlotSize

A numerical value with which you can zoom in and out of the heatmap. Default is NA, which makes PhysioHeatmap choose the PlotSize automatically.

SymmetricColoring

Logical value that determines if color coding should distribute symmetrically around 0. Default is false, which means colors will be distributed from minimum to maximum value of PhysioResults.

RowColCex

Row and column cex (a numerical value giving the amount by which plotting text and symbols should be magnified). Default is NA, in which case PhysioHeatmap itself assigns a value to RowColCex based on PhysioResults size.

KeyLabelCex

Colorkey text labels cex (a numerical value giving the amount by which plotting text and symbols should be magnified relative). Default is NA, in which case PhysioHeatmap itself assigns a value to KeyLabelCex based on PhysioResults size.

SpaceClustering

Logical value for choosing if the rows of PhysioResults (Space axes) should be ordered using hierarchical clustering. Default is FALSE.

Space

Space with which PhysioResults is calculated. It is needed if SpaceClustering is TRUE.

ReducedPlotting

Logical or numeric value indicating if only important rows in PhysioResults should be plotted. If ReducedPlotting is FALSE, all rows of PhysioResults are plotted. If ReducedPlotting is TRUE, for each sample (column in PhysioResults) only the 10 most important rows (axes in Space) are selected and plotted. And the case of ReducedPlotting being a numerical value, e.g. N, is similar to ReducedPlotting == TRUE, except rather than 10, the N most important rows are kept.

Value

PhysioHeatmap returns(Invisibly) a 'TRUE' logical value.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
randMatInpt <-
   matrix(data = rnorm(n = 4000, mean = 10, sd = 20), nrow = 400)
rownames(randMatInpt) <- paste("ROWS", 1:400)
colnames(randMatInpt) <- paste("Sample", 1:10)

randMatRef <-
   matrix(data = rnorm(n = 12000, mean = 10, sd = 20), nrow = 400)
rownames(randMatRef) <- paste("ROWS", 1:400)
colnames(randMatRef) <- paste("Space", 1:30)

res <-
   calculatePhysioMap(InputData = randMatInpt, Space = randMatRef)

PhysioHeatmap(PhysioResults = res,
             main = "Heatmap Testing")
PhysioHeatmap(
   PhysioResults = res,
   main = "Heatmap Testing",
   ColorLevels = 3
)
PhysioHeatmap(
   PhysioResults = res,
   main = "Heatmap Testing",
   SpaceClustering = TRUE,
   Space = randMatRef
)
PhysioHeatmap(
   PhysioResults = res,
   main = "Heatmap Testing",
   ReducedPlotting = 2
)

JRC-COMBINE/PhysioSpaceMethods documentation built on July 27, 2021, 12:53 p.m.