I am confused about the log2FC when I use the limma to analyze the RNA-seq data. In the paper (Law et al. 2016; https://f1000research.com/articles/5-1408 ), Log2FC of the gene (ENTREZID:12759) is -5.44 in basal.vs.lp, getting from topTable (Page 15). However, the mean expression getting from voom is 5.58 and 10.89 in group basal and lp, respectively. 5.58 - 10.89 = -5.31, is not equal to -5.44. How to get the final expression value match to the log2FC of topTable ?
Question: Limma: The log2FC of topTable is not equal to Mean(log2CPM) of Basal - Mean(log2CPM) of LP
9 weeks ago by
zhouqz • 0
zhouqz • 0 wrote:
ADD COMMENT • link •
9 weeks ago by
Aaron Lun • 21k
Cambridge, United Kingdom
Aaron Lun • 21k wrote:
set.seed(1000) y <- matrix(rnbinom(10000, mu=1:1000, size=1), ncol=10) design <- model.matrix(~gl(2, 5)) v <- voom(y, design) fit <- lmFit(v, design) fit <- eBayes(fit) topTable(fit, coef=2, sort.by="none") # Comparing to manual calculation: head(rowMeans(v$E[,6:10]) - rowMeans(v$E[,1:5])) weighted <- v$E * v$weights head(rowSums(weighted[,6:10])/rowSums(v$weights[,6:10]) - rowSums(weighted[,1:5])/rowSums(v$weights[,1:5]))
I can only assume you're asking out of curiosity. Don't do the above in actual analyses,
topTable have been very thoroughly tested and will be much less buggy than any manual calculation.
ADD COMMENT • link
Please log in to add an answer.
Powered by Biostar version 2.2.0
Traffic: 162 users visited in the last hour