Hi. I am trying to create a heatmap from my data after I have analyzed it using Limma. I can get a list of genes that are shown to be significant in my analysis but would like to locate the same genes in my original data matrix to make a heat map of it. This is what I've done (below) but I can't seem to get the legions right. I would like to have the row names be the gene and rename the column. Any help to this problem will be much appreciated. Thanks in advance.
targets<-readTargets("HxMtargets.txt")
RG <- read.maimages(targets,source="agilent",columns= list( R = "rMeanSignal", G = "gMeanSignal", Rb = "rBGUsed", Gb = "gBGUsed", Rb.real = "rBGMeanSignal", Gb.real = "gBGMeanSignal"), annotation = c("FeatureNum","Row","Col","ProbeName","ControlType","GeneName", "Description","SystematicName"))
MA<-normalizeWithinArrays(RG,method="loess")
f<-factor(targets$Cy3,levels=c("Control","Twowks","Tumor"))
design<-model.matrix(~0+f)
colnames(design) <- c("Control","Twowks","Tumor")
fit<-lmFit(MA, design)
contrast.matrix<-makeContrasts(Control,Twowks,Tumor,Tumor-Control,Tumor-Twowks, Twowks-Control, levels=design)
fit2<-contrasts.fit(fit,contrast.matrix)
fit2<-eBayes(fit2)
C.top<-as.numeric(rownames(topTable(fit2, coef=1,n=50)))
heatmap(MA$M[C.top,])