I am trying to show differentially expressed genes based on their log fold change on the heatmap using pheatmap, however, no desired picture yet. There are 3 samples under a treatment that compared with control, the minimum and maximum log fold change are -8.5 and +9.3, respectively, so I used threshold (Thr) of 8 to determine the color key range. Also, there are some missing value in data that specified with the sign of "-", in fact, the gene X is DE just in sample 3, so it missed in the samples 1 and 2. Could you please let me know how the pheatmap handle such values?
I used the below commands for creating heatmap:
data <- read.delim("heat.txt", header=T) rnames <- data[,1] mat <- data.matrix(data[,2:ncol(data)]) rownames(mat) <- rnames Thr <- 8 mat[mat < -thr] <- -thr mat[mat > thr] <- thr pheatmap(mat, breaks=seq(from=-thr, to=thr), cluster_col=FALSE, cluster_row=FALSE, cellwidth=15, cellheight=5)
I have modified commands several times, but this dirty picture was regenerated.
As you could see: 1) The height of the heatmap is not adjusted and I don't know how to set it to have the whole picture with high resolution, could you please help me in this setting?
2) There is just blue color instead of the color spectrum. Actually, I want to show even small differences between samples (say one unit) using the color key. Please kindly help me what should I do?
As it's my first experience, your help is really required. I would appreciate it in advance.