genericheatmap2: heatmap.2 plot

Description Usage Arguments Details Examples

View source: R/heatmap2-plot.R

Description

heatmap.2 plot

Usage

1
2
3
4
5
6
7
8
9
genericheatmap2(data, main = "cluster analysis", breaks = seq(-1, 1,
  length.out = 257), col = gplots::colorpanel(256, "blue", "beige", "red"),
  dendrogram = "row", scale = "none", Rowv = T, Colv = T,
  labRow = rownames(data), sepcolor = "black", colsep = c(1, 2, 3),
  sepwidth = c(0.025, 0.025), rowsep = c(1:nrow(data)), key = T,
  keysize = 1, symkey = TRUE, density.info = "none", trace = "none",
  cexRow = 0.5, cexCol = 0.8, margin = c(5, 8), font.axis = 1,
  lmat = matrix(c(4, 2, 3, 1), nrow = 2, ncol = 2), lhei = c(0.08, 0.7),
  lwid = c(0.3, 0.7), ...)

Arguments

data

a matrix, see examples

Details

Please see heatmap.2

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
data(heatmap_data)
metaname <- names(heatmap_data)[4:length(heatmap_data)]
subTime <- singleTime <- c("week4","week8")
tmp_dataset<- data <- metabolite_data_subset
baseline_data <-data[which(data$time %in% c("baseline")),];
dataLen <- length(baseline_data);
propData = data.frame(BL = rep(0,dataLen-3));
for (singleTime in subTime)
{
    inditmp_dataset <- tmp_dataset[which(tmp_dataset$time %in% singleTime),];
    for ( i in 4:dataLen)
    {
        inditmp_dataset[,i] <-  inditmp_dataset[,i] - baseline_data[,i];
    }
    is.na(inditmp_dataset[4:dataLen]) <- sapply(inditmp_dataset[4:dataLen],is.infinite);
    tmp_dataset2 <- as.data.frame(colMeans(inditmp_dataset[4:dataLen], na.rm = T));
    names(tmp_dataset2) <- singleTime;
    propData <- cbind(propData,tmp_dataset2 );
}
tmpMat <- as.matrix(propData[c('BL',subTime)]);
tmpHeatmap2 <- genericheatmap2(tmpMat);

ShouyeLiu/metaboliteUtility documentation built on May 6, 2019, 9:07 a.m.