I am trying to generate the heat map plots from the cummeRbund package (see p22). It generates the plot. However initially, the values in
h$data$variable were [q1,q2,q3,q4,...,q18] (which were set by a previous program in a particular data file located in
../cuffdiff). Below, I changed the values of
h$data$variable to something more meaningful to me, however when I plot, the x-axis still has q1,q2,etc for the x-axis labels.
library("cummeRbund") cuffset<-readCufflinks(dir = "../cuffdiff", gtfFile="../cuffmerge/merged.gtf", genome="GRCh38") cuffdat<-genes(cuffset) myGeneIds<-rownames(countMatrix(cuffdat)) myGenes<-getGenes(cuffset,myGeneIds) h<-csHeatmap(myGenes,cluster='both') h$data$variable[h$data$variable == "q1"]<-"tissue-1" h$data$variable[h$data$variable == "q2"]<-"tissue-2" h$data$variable[h$data$variable == "q3"]<-"tissue-3" h$data$variable[h$data$variable == "q4"]<-"tissue-4" > > class(h)  "gg" "ggplot" > h
How do I change the labels to something more meaningful (e.g. tissue-1, tissue-2, etc.)?