Question: limma 2 factor contrast matrix design
0
gravatar for Ming Tang
4.0 years ago by
Ming Tang2.5k
Houston/MD Anderson Cancer Center
Ming Tang2.5k wrote:

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!

microarray limma • 3.4k views
ADD COMMENTlink modified 4.0 years ago by Devon Ryan89k • written 4.0 years ago by Ming Tang2.5k
3
gravatar for Devon Ryan
4.0 years ago by
Devon Ryan89k
Freiburg, Germany
Devon Ryan89k wrote:

"Is it a 2 factor design?"

Yes, it's a 2 factor design (it's an incomplete factorial design, not that it really matters).

Personally, I wouldn't bother with contrasts for this, since you only care about one of the factors when a factorial design is used (not that it'll make much of a difference either way). So a simple ~Dox+Knockdown as a design will work.

As an aside, I wonder what the deal is with the "LD" sample and whether you actually want to include it. I presume that the Doxycycline treatment is being use in some sort of tet-off system, so if administration only led to partial knock-down or something like that then I would personally just remove that sample (is it telling you anything biologically meaningful?). Then you'd just have a 2-groups comparison and things are even simpler.
 

ADD COMMENTlink modified 4.0 years ago • written 4.0 years ago by Devon Ryan89k

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.

       L       N         C
    PN5     N         C
    PN5D   Y        KD
     PN7    N         C
    PN7D   Y        KD

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!

 

ADD REPLYlink written 4.0 years ago by Ming Tang2.5k
1
design<- model.matrix(~Dox+KnockDown, targets)
fit <- lmFit(eset, design)
fit <- eBayes(fit)
toptable<- topTable(fit, coef=KnockDown,number=30000, sort.by="P")

or something along those lines

ADD REPLYlink written 4.0 years ago by Devon Ryan89k
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.3.0
Traffic: 1086 users visited in the last hour