Question: Creating Heatmaps Of Diffrentially Expressed Genes In Agilent Two-Color Array Analysis
3
gravatar for Ly
7.7 years ago by
Ly130
Ly130 wrote:

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,])
gene limma heatmap • 5.0k views
ADD COMMENTlink modified 4.9 years ago by aodaaodaslman20110 • written 7.7 years ago by Ly130
3
gravatar for Sean Davis
7.7 years ago by
Sean Davis25k
National Institutes of Health, Bethesda, MD
Sean Davis25k wrote:

Take a look at the gplots package, for example, at the heatmap.2 function. Something like this should give you an idea:

d = matrix(rnorm(26*26),ncol=26)
heatmap.2(d,labRow=letters[1:26],labCol=letters[1:26])

You'll just substitute your MA$M[C.top,], labRow=genenames[C.top], and labCol=samplenames. heatmap.2 has many tweaks for better visualization, so you may need to play a bit to get things just right.

ADD COMMENTlink written 7.7 years ago by Sean Davis25k
1

Thanks you so much Sean! I did try this with some modifications of my own and it worked perfectly! Again, thank you.

ADD REPLYlink written 7.7 years ago by Ly130
1

Hi Ly, if you like the answer upvote and accept it.

ADD REPLYlink written 7.7 years ago by Istvan Albert ♦♦ 80k

Hi Sean,

Like the above question even I'm facing the same problem to get heatmap of differential expressed genes. Could you please hep me. I'm working on Human Gene 2.0 ST array. I have used "xps" package for the analysis.

scheme.exon <- import.exon.scheme("Scheme",filedir=scmdir,layoutfile=paste(libdir,"HuGene-2_0-st.clf",sep="/"),schemefile=paste(libdir,"HuGene-2_0-st.pgf",sep="/"),probeset=paste(anndir,"HuGene-2_0-st-v1.na35.hg19.probeset.csv",sep="/"),transcript=paste(anndir,"HuGene-2_0-st-v1.na35.hg19.transcript.csv",sep="/"),verbose=TRUE)

##Reading CEL Info
#Import CEL-files by giving the path where all .CEL files are present

celfiles <- dir(path = "D:/GeneST_Analyse/ProjectName/CELfiles", pattern = "*.CEL$", all.files = FALSE, full.names = FALSE, recursive = FALSE, ignore.case = FALSE)
data.exon <- import.data(scheme.exon,"tmp_data_exon",filedir=rootdir,celfiles=celfiles,celdir=celdir,verbose=FALSE)

unlist(treeNames(data.exon))

[1] "X_8__HuGene_2_0_st_.cel" "E__HuGene_2_0_st_.cel"  
[3] "GG7__HuGene_2_0_st_.cel" "J__HuGene_2_0_st_.cel"  
[5] "O__HuGene_2_0_st_.cel"   "T__HuGene_2_0_st_.cel"

data.rma <- rma(data.exon, "tmp_exonRMA", filedir=rootdir, verbose=FALSE, exonlevel="affx+core", option="transcript", background="antigenomic")

>data.rma

UNIT_ID   UN       X       E       GG7     J     O
0      17127159 353.568 335.295 221.717 815.654 684.85
1      17127161 11.0842 7.01459 7.33511 11.2121 12.6268
2      17127163 221.647 226.774 136.274 431.32  392.533
3      17127165 5.02182 3.41172 4.12834 6.90306 4.91183

unifltr <- UniFilter(foldchange=c(1.5,"both"), unifilter=c(0.05,"pval"))

rma.ufr <- unifilter(data.rma, "tmp_exonUnifilter", filedir=rootdir , filter=unifltr, group=c("GrpA","GrpA","GrpA","GrpB","GrpB","GrpB"), xps.fltr=rma.pfr, verbose=FALSE)

tmp2 <- validData(rma.ufr)

tmp2 has differential expressed genes.

UN          ID    St      M1    M2       SE    DOF  PV        PA            FC
17127159    0   -5.9    297.3   765.7   0.22    4   0.003   0.00389231  2.57536
17127163    2   -3.87   189.914 492.307 0.3548  4   0.0179  0.01795     2.59226
17127167    4   -3.8908 339.136 855.276 0.3429  4   0.0176  0.017       2.52192
17127171    6   -3.922  390.44  986.365 0.340   4   0.0172179   0.01721 2.52627
17127175    8   -4.715  536.072 1210.65 0.2492  4   0.00920158  0.00920 2.258

How can I get a heatmap for this?

ADD REPLYlink modified 3.3 years ago by Istvan Albert ♦♦ 80k • written 3.3 years ago by Vasu340
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: 1527 users visited in the last hour