Search
Question: design contrast in limma package for microarray expression data
0
gravatar for sup230
4 months ago by
sup23010
sup23010 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 4 months ago by Aaron Lun18k • written 4 months ago by sup23010
1
gravatar for Aaron Lun
4 months ago by
Aaron Lun18k
Cambridge, United Kingdom
Aaron Lun18k 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 4 months ago • written 4 months ago by Aaron Lun18k
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.2.0
Traffic: 269 users visited in the last hour