build.heatmaps: Build heatmaps

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/build_heatmaps.R

Description

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

Usage

1
2
3
    build.heatmaps(exp_data, cluster.MEM = "none", cluster.medians = "none", 
    cluster.IQRs = "none", newWindow.heatmaps=FALSE, display.thresh = 0, 
    output.files = FALSE, labels = FALSE, only.MEMheatmap = FALSE)

Arguments

exp_data

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.

newWindow.heatmaps

TRUE or FALSE; whether or not to pop out new windows to display the MEM, median, and IQR heatmaps

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 txt file containing MEM labels (row names), and txt files containing 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. X11 is used to open plots in a new window. When windows open, user must click within the window to permit R to print the heatmap to that window (the window will remain blank until user clicks on it).

Author(s)

Kirsten Diggins, Sierra Barone, Jonathan Irish

References

Diggins et al., Nature Methods, 2017

See Also

MEM, heatmap.2, hclust

Examples

1
2
3
4
5
6
7
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

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

JonathanIrish/MEMv3 documentation built on July 14, 2019, 10:43 p.m.