Hello,

I am using limma to analysis data from a two color agilent chip. I've made my venn diagram using the significant genes that I've acquired from limma. However, I am having trouble trying to link my gene in each compartment of the venn diagram back to the original data to make a heat map. This is what I have so far:

## Data Analysis

MA.l<-normalizeWithinArrays(RG,method="loess")

MA.lq<-normalizeBetweenArrays(MA.l,method="quantile")

MA.lqav<- avereps(MA.lq, ID=MA$genes$ProbeName)

design<- modelMatrix(targets, ref="Ref")

contrast.matrix<-makeContrasts(BxM-Control, cMyc-Control,MXH-Control, TxM-Control, levels=design)

contrast.matrix

Contrasts Levels BxM - Control cMyc - Control MXH - Control TxM - Control BxM 1 0 0 0 cMyc 0 1 0 0 Control -1 -1 -1 -1 MXH 0 0 1 0 TxM 0 0 0 1

fit<-lmFit(MA.lqav, design)

fit2<-contrasts.fit(fit, contrast.matrix)

fit2<-eBayes(fit2)

### Venn Diagram:

BxM.toptable<-topTable(fit2,coef=1, adjust="fdr", p.value=0.01 )

cMyc.toptable<-topTable(fit2,coef=2,n=40000, adjust="fdr", p.value=0.01)

MXH.toptable<-topTable(fit2,coef=3 ,n=40000, adjust="fdr", p.value=0.01)

TxM.toptable<-topTable(fit2,coef=4, n=40000, adjust="fdr", p.value=0.01)

input<-list(BxM.toptable$ProbeName, MXH.toptable$ProbeName, cMyc.toptable$ProbeName, TxM.toptable$ProbeName)

venn(input)

## Table for Venn Diagram

results<-decideTests(fit2, method="separate", adjust.method="fdr", p.value=0.01)

BxM.V<-results[,1]

cMyc.V<-results[,2]

MxH.V<-results[,3]

TxM.V<-results[,4]

VennT<-cbind(BxM.V, cMyc.V, MxH.V, TxM.V)

VennTable<-vennCounts(VennT)

## Getting genes that are DE in all comparisons

All<-results[,1]!=0 & results[,2]!=0 & results[,3]!=0 & results[,4]!=0

allgene<-fit2$genes[All, "GeneName"]

a<-na.omit(allgene)

So now I have a list of genes that are differentially expressed in all of my comparisons but I don't know how to link it back to the individual sample and make a heat map. Any help in this would really be appreciated. I am new to R and hope I have not confused you. Also, if I am doing this all wrong or it's not a relevant thing to do, please let me know.

Thank you in advance, Ly

Looks like your Venn diagram code is all on one line, which is hard to read.

Can you post sample data for your function. That makes it easier to help you. To post the R data you can use the function dput( object ) and copy the output.