logFC in limma
1
0
Entering edit mode
gv ▴ 40
@gv-6516
Last seen 2.2 years ago
United States

I have the following limma code which I wrote(dummy)

The matrix is designed in a way so that I don't use the intercept part.

library(limma)
d <- matrix(rexp(200, rate=.1), ncol=9,nrow = 10)
colnames(d) <- c("A_1","A_2","A_3","B_1","B_2","B_3","C_1","C_2","C_3")
head(d)
design <- model.matrix(~0 + factor(rep(1:3, each=3)))
colnames(design) <- c("A","B","C")
fit <- lmFit(d,design)
contrast.matrix <- makeContrasts(A-B,B-C,A-C,A-(B+C)/2, levels = design)
fit2 <- contrasts.fit(fit, contrast.matrix)
fit2 <- eBayes(fit2)
topTable(fit2,coef = 1,adjust.method = "BH")

In the output of topTable if logFC is positive for contrast A-B does it mean it is log(A/B)?

limma logFC • 841 views
ADD COMMENT
3
Entering edit mode
@james-w-macdonald-5106
Last seen 17 hours ago
United States

If it's positive, it means the average for group A is larger than group B (e.g., up-regulated in A vs B), and vice versa. The sign of the statistic doesn't change the relationship. In other words contrast A-B is log(A/B), regardless of the sign.

ADD COMMENT

Login before adding your answer.

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