build_heatmaps: Build heatmaps

View source: R/build_heatmaps.R

build_heatmapsR Documentation

Build heatmaps

Description

Takes matrix list generated from MEM as input and outputs MEM labels, heatmap of population median values, and heatmap of MEM scores.

Usage

build_heatmaps(
    MEM_values,
    cluster.MEM = "both",
    cluster.medians = "none",
    cluster.IQRs = "none",
    display.thresh = 1,
    output.files = FALSE,
    labels = FALSE,
    only.MEMheatmap = FALSE)

Arguments

MEM_values

List of matrices generated as output from MEM aka MEM_values

cluster.MEM

"none","row","col",or "both"; which dimension(s) of the MEM heatmap to hierarchically cluster. See Details for more information.

cluster.medians

"none","row","col",or "both"; which dimension(s) of the median heatmap to cluster. If "none", the median row and column order will match order of the MEM heatmap.

cluster.IQRs

"none","row","col",or "both"; which dimension(s) of the IQR heatmap to cluster. If "none", the IQR row and column order will match order of the MEM heatmap.

display.thresh

Numeric; 0-10. Markers with enrichment scores that are equal to or greater than display.thresh will be displayed as row names on MEM heatmap.

output.files

TRUE or FALSE; If TRUE, output of build_heatmaps will be written to folder output folder that is created as a subdirectory of the working directory. Written files include a PDF of the MEM heatmap as well as txt files containing MEM labels (row names), MEM scores, medians, and IQR values.

labels

TRUE or FALSE; whether or not to include MEM labels in the MEM heatmap

only.MEMheatmap

TRUE or FALSE; whether to only show MEM heatmap or all relevant heatmaps (MEM, median, IQR)

Details

Heatmaps are clustered using the default complete linkage hierarchical clustering in the hclust function. See heatmap.2 and hclust for more information.

Value

Heatmaps of median, IQR, and MEM values on each population; optionally written to file.

Author(s)

Kirsten Diggins, Sierra Lima, Jonathan Irish

References

Diggins et al., Nature Methods, 2017

See Also

MEM, heatmap.2, hclust

Examples

# Use output from MEM function or use example data with 

data(MEM_values)

build_heatmaps(
  MEM_values,
  cluster.MEM = "both",
  cluster.medians = "none",
  cluster.IQRs = "none",
  display.thresh = 1,
  output.files = TRUE,
  labels = FALSE,
  only.MEMheatmap = FALSE)

cytolab/cytoMEM documentation built on Sept. 13, 2023, 7:28 a.m.