cytof_heatmap: Heatmap plot of cluster mean value results

Description Usage Arguments Value Examples

View source: R/cytof_postProcess.R

Description

Heatmap plot of cluster mean value results

Usage

1
2
3
4
5
cytof_heatmap(data, baseName = "Cluster", scaleMethod = "none",
  dendrogram = c("both", "row", "column", "none"), colPalette = c("bluered",
  "greenred", "spectral1", "spectral2"), cex_row_label = NULL,
  cex_col_label = NULL, key.par = list(mgp = c(1.5, 0.5, 0), mar = c(3, 2.5,
  3.5, 1)), keysize = 1.4, margins = c(5, 5))

Arguments

data

A matrix with rownames and colnames

baseName

The name as a prefix in the title of the heatmap.

scaleMethod

Method indicating if the values should be centered and scaled in either the row direction or the column direction, or none. The default is 'none'.

dendrogram

Control the dengrogram on row or column, selection includes 'both', 'row', 'column', 'none'.

colPalette

Use selected colour palette, includes 'bluered', 'greenred', 'spectral1' and 'spectral2'.

cex_row_label

Text size for row labels.

cex_col_label

Text size for column labels.

key.par

Graphical parameters for the color key.

keysize

Numeric value indicating the size of the key.

margins

Numeric vector of length 2 containing the margins (see par(mar= *)) for column and row names, respectively.

Value

A heatmap object from gplots

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
m1 <- c(rnorm(300, 10, 2), rnorm(400, 4, 2), rnorm(300, 7))
m2 <- c(rnorm(300, 4), rnorm(400, 16), rnorm(300, 10, 3))
m3 <- c(rnorm(300, 16), rnorm(400, 40, 3), rnorm(300, 10))
m4 <- c(rnorm(300, 7, 3), rnorm(400, 30, 2), rnorm(300, 10))
m5 <- c(rnorm(300, 27), rnorm(400, 40, 1),rnorm(300, 10))
c <- c(rep(1,300), rep(2,400), rep(3,300))
rnames <- paste(paste('sample_', c('A','B','C','D'), sep = ''), 
rep(1:250,each = 4), sep='_') 
exprs_cluster <- data.frame(cluster = c, m1 = m1, m2 = m2, m3 = m3, m4 = m4, m5 = m5)
row.names(exprs_cluster) <- sample(rnames, 1000)
cluster_mean <- aggregate(. ~ cluster, data = exprs_cluster, mean)
rownames(cluster_mean) <- paste("cluster_", cluster_mean$cluster, sep = "")
cytof_heatmap(cluster_mean[, -which(colnames(cluster_mean) == "cluster")])

Example output

Loading required package: ggplot2
Loading required package: plyr
Warning message:
no DISPLAY variable so Tk is not available 

cytofkit documentation built on Nov. 1, 2018, 3:50 a.m.