my heatmap with gplot I have been trying heatmap with gplot as i wanted to get a zscore in my plot, i use pheatmap but since it doesn't give that zscore thing ,I'm trying to use glpot library ,here is my code i can't get the dimension right either the sample names are missed or the gene ID
library(gplots)
file1<- read.csv('new_dev.txt',header = T)
class(file1)
dat <- data.frame(file1)
dim(dat)
names(dat)
head(dat)
rownames(dat) <-dat$gene
head(dat)
dim(dat)
head(dat)
dat.tdy <- dat[,2:6]
dat.n <- scale(t(dat.tdy))
dat.tn <- t(dat.n)
round(colMeans(dat.n),1)
apply(dat.n,2,sd)
d1 <- dist(dat.n,method = "euclidean", diag = FALSE, upper = FALSE)
d2 <- distdat.tn,method = "euclidean", diag = FALSE, upper = TRUE)
c1 <- hclust(d1, method = "ward.D2", members = NULL)
# Clustering distance between proteins using Ward linkage
c2 <- hclust(d2, method = "ward.D2", members = NULL)
macolor = colorRampPalette(c("navyblue", "white", "red"))(100)
row_names <- rownamesdat.tn)
heatmap.2dat.tn, Rowv=as.dendrogram(c2),col =macolor
,scale="row", margin=c(3.1, 5),trace='none',labRow = row_names,
symkey=FALSE,symbreaks=FALSE,dendrogram="both",
density.info='density', denscol="red",lhei=c(1,2),
lwid=c(1,1), keysize=0.1, key.par = list(cex=0.5))
dev.off()
Any suggestion or improvement would be highly appreciated.
so the graphics issue is due to the scaling promlem because i tweaked margin the lhei ,lwid etc okay i will go through it