我同样也能够生成热力图:
args <- commandArgs(TRUE);
matrix_a <- read.table(args[1], sep='\t', header=T, row.names=1);
location <- args[2];
matrix_d <- dist(matrix_a);
hc <- hclust(matrix_d,"average");
mypng <- function(filename = "mydefault.png") {
png(filename)
}
options(device = "mypng")
plot(hc);
matrix_a <- read.table("Arda_list.txt.binary.matrix.txt", sep='\t', header=T, row.names=1);
mtscaled <- as.matrix(scale(matrix_a))
heatmap(mtscaled, Colv=F, scale='none')
我尝试按照Christopher Bare的帖子http://digitheadslabnotebook.blogspot.com/2011/06/drawing-heatmaps-in-r.html进行操作,但是我似乎漏掉了什么。任何想法都将不胜感激。我附上了我得到的热图和树形图像,第三张图片来自Christopher Bare的帖子。谢谢。