design contrast in limma package for microarray expression data
1
0
Entering edit mode
sup230 ▴ 30
@sup230-13286
Last seen 6.5 years ago

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?

Thank you for your help in advance!!

limma design and contrast matrix differential gene expression • 958 views
ADD COMMENT
1
Entering edit mode
Aaron Lun ★ 28k
@alun
Last seen 3 hours ago
The city by the bay

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.
ADD COMMENT

Login before adding your answer.

Traffic: 674 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6