Question: design contrast in limma package for microarray expression data
0
gravatar for sup230
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?

Thank you for your help in advance!!

ADD COMMENTlink 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
gravatar for Aaron Lun
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.
ADD COMMENTlink modified 2.2 years ago • written 2.2 years ago by Aaron Lun25k
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 16.09
Traffic: 294 users visited in the last hour