Question: design contrast in limma package for microarray expression data
0
2.2 years ago by
sup23030
sup23030 wrote:

Hi,

I just wanted to get confirmation that the following code would get me the result I wanted. So I am interested in getting the list of differential expressed genes between two groups between seizure YES and seizure NO. The expression set is the microarray data and seizure information is in the affy.clinic.sz data frame "seizure" column.

design.sz<-model.matrix(0~affy.clinic.sz\$seizure)
colnamesdesign.sz)<-c("NO", "YES")

fit.sz<-lmFitaffy.eset.sz, design.sz)

contrasts<-makeContrasts(YES-NO, levels = design.sz)
fit.sz2<-contrasts.fitfit.sz, contrasts)

topTable(fit.sz2, adjust.method = "BH", sort.by = "logFC")

Will this list give me the list of DE genes comparing seizure YES group to NO group, where negative logFC value indicates that the gene's expression is higher in seizure NO group and positive logFC indicates that the gene's expression is higher in sz YES group?

modified 2.2 years ago by Aaron Lun25k • written 2.2 years ago by sup23030
Answer: design contrast in limma package for microarray expression data
1
2.2 years ago by
Aaron Lun25k
Cambridge, United Kingdom
Aaron Lun25k wrote:

Your interpretation of the sign of the log-fold change is correct, but there are a number of issues with your code:

• Setting 0~affy.clinic.sz doesn't make sense, I assume you mean ~0 + affy.clinic.sz.
• You're missing opening brackets throughout.
• You need to run eBayes after contrasts.fit.
• Set p.value=0.05 in topTable to get DE genes at a FDR of 5%, or set number=Inf and subset later.