I'm trying to display some data on heatmap in R comparing expression levels across cyclin types & body parts. If you look at the data below you can see that the expression of cyclin A1 in the brain is the same as cyclin A2 in the brain. However, when we look at the heatmap they are displayed as different colours. I've tried normalising the data using the scale argument by column (default seems to be row) but that just results in any data without a difference in variance coming out as blank (e.g. brain cyclin A1 & A2 would be displayed as white despite their being expression).
I've attached my code below for a different organism (but the same code was used)- how is it best to fix this?
#Anolis carelinensis Cyclin A
#importing data- Anolis carelinensis
AnolisA<-read.csv(file.choose(),header=TRUE)
#all data in the matrix must be numerical
#therefore I need to remove the left column
AnolisA2<-AnolisA[-grep('X', colnames(AnolisA))]
#converting dataframe to a matrix
AnolisA3<-as.matrix(AnolisA2)
#builting the heatmap
heatmap(AnolisA3)
#remove dendogram and reordering of columns/rows
#no scale argument applied because we are interested in the variation
#between both organs and cyclin types
heatmap(AnolisA3, Colv=NA, Rowv=NA)
#adding axis labels
heatmap(AnolisA3, Colv=NA, Rowv=NA, xlab="Organ", ylab="Cyclin")
#creating a vector for column names
rowname<-c("A1","A2")
#altering labels
#labRow- change row names
rownames(AnolisA3)<-rowname
#cexCol- alters column text size
heatmap(AnolisA3, Colv=NA, Rowv=NA, xlab="Organ", ylab="Cyclin",cexCol=1,cexRow=1.5,margins=c(11,4))