Question: R / cummeRbund : difficulty changing x-axis labels in gg / ggplot class while generating heatmap
0
gravatar for irritable_phd_syndrom
2.7 years ago by
irritable_phd_syndrom60 wrote:

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)
[1] "gg"     "ggplot"
> h

How do I change the labels to something more meaningful (e.g. tissue-1, tissue-2, etc.)?

cummerbund R • 954 views
ADD COMMENTlink modified 2.7 years ago • written 2.7 years ago by irritable_phd_syndrom60
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1855 users visited in the last hour