different results with normal fit and contrast matrix fit
2
0
Entering edit mode
8.5 years ago
Ice P • 0

I have a data set with loge base expression values of 90 normal and 10 tumor sample.

mydesign<- cbind(Tumor=c(rep(1,90),rep(0,10)),Control=c(rep(0,90),rep(1,10)))

Now, I proceeded with two way:

fit <- lmFit(data, design=mydesign)
fit <- eBayes(fit)
topTable(fit)

numGenes <- nrow(data)
case1.list <- topTable(fit,number=numGenes)

or

cont.matrix <- makeContrasts(TumorvsControl=Tumor-Control, levels=mydesign)
fit2 <- lmFit(data, design=mydesign)
fit2 <- contrasts.fit(fit2, cont.matrix)
fit2 <- eBayes(fit2)

case2.list <- topTable(fit2,number=numGenes)

However, when I searched for a particular gene, the results are quite contrasting. e.g.

case1.list["ENSG1",]
                  Tumor  Control AveExpr        F      P.Value    adj.P.Val
ENSG1 1.53268 5.134342 1.87246 1802.497 1.115791e-83 4.074213e-83

case2.list ["ENSG1",]
                    logFC AveExpr         t      P.Value    adj.P.Val        B
ENSG1 -3.601662 1.87246 -29.42565 2.183333e-53 3.353327e-49 110.5354

Could anyone please advice that with given tumor and control estimation, how log FC were obtained?

R limma • 3.7k views
ADD COMMENT
0
Entering edit mode

"contrast" in limma means something similar to "What conditions I want to compare".

ADD REPLY
7
Entering edit mode
8.5 years ago

This ends up not being a limma question, but more of a question of what a model matrix is and how it's used.

Case 1 is asking, "Is the signal in the 'Tumour' group greater than 0?" That is unlikely to be a biologically interesting question to ask.

Case 2 is asking, "Is there a difference between 'Tumour' and 'Control'?" That is a much more biologically interesting question to ask.

I would strongly discourage you from manually making model matrices until you're more familiar with them (and even then it's rarely more convenient to do so).

ADD COMMENT
0
Entering edit mode

This should be the accepted answer.

ADD REPLY
4
Entering edit mode
8.5 years ago
Kamil ★ 2.3k

Please read the documentation for limma. Start with Chapter 9 on page 40.

ADD COMMENT

Login before adding your answer.

Traffic: 2470 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