Hi biostars,
I have a question to ask for the limma two factor design.
my experiment design is like this:
FileName Dox KnockDown
L N C
LD Y C
PN5 N C
PN5D Y KD
PN7 N C
PN7D Y KD
I have six files from Affymetrix microarray. two factors are considered: with or without adding Doxcycline (Y=yes, N=no) and control(C) and Knockdown(KD).
Is it a two factor design? from the limma guider, it says every combination of factors should be observed, but I do not have the level of N.KD (the KD is only occurred after adding Dox)
I am only interested in whether KD has effect on gene expression. How should I design the contrast matrix?
I am following the limma guider:
#differentially expressed genes by limma
library(limma)
targets<- data.frame(FileName=c("L","LD","PN5","PN5D","PN7","PN7D"), Dox=c("N","Y","N","Y","N","Y"),
KnockDown=c("Control","Control","Control","KD","Control","KD"))
targets
TS<- paste(targets$Dox, targets$KnockDown, sep=".")
TS
TS<- factor(TS, levels=c("N.Control", "Y.Control", "Y.KD"))
design<- model.matrix(~0+TS)
colnames(design)<- levels(TS)
fit<- lmFit(eset, design)
cont.matrix<- makeContrasts(
KDvsControlinY=Y.KD-Y.Control,
YvsNinControl=Y.Control-N.Control,
levels=design)
fit2 <- contrasts.fit(fit, cont.matrix)
fit2 <- eBayes(fit2)
toptable<- topTable(fit2, coef=1,number=30000, sort.by="P")
Thanks!
Yes. you are right. we added Dox to induce Knockdown. L sample is the sample with scramble shRNA without adding Dox, LD sample is the sample with scramble shRNA with Dox. PN5 and PN7 are specific shRNAs without adding Dox.
If I remove LD sample, I will only have two groups as you said.
but we want to know whether adding Dox will affect gene expression. in other words, we want to make sure that the change of gene expression is due to KD not Dox.
And here DOX and KD has interaction, because adding DOX will for sure induce KD for the specific shRNAs. Do I need to include the interaction term in the model?
Could you please write the code in the limma way. I know some linear regression, but do not know how to translate that into limma code.
Thanks!
or something along those lines