how limma compute the logFC in differential expression analysis
1
0
Entering edit mode
Yuan Tian ▴ 60
@yuan-tian-5034
Last seen 9.6 years ago
Hi, I'm using limma package to do differential expression analysis on a microarray data. May I know how the logFC is computed in the package? I start the analysis with a normalized, log2 transformed dataset and a matrix indicate the case and groups as fit<- lmFit((normalized,log2transformed data), design). cont.matrix<- makeContrasts(..., levels=design) fit2 <- contrasts.fit(fit, cont.matrix) fit2 <- eBayes(fit2) result= topTable(fit2, adjust="BH", number=nrow(data)) A number of summary statistics are presented by topTable() for the top genes and the selected contrast. I manually compute the logFC for the 2 groups: G1mean=rowMeans(2^(normalized,log2transformed data in group1)), G2mean=rowMeans(2^(normalized,log2transformed data in group2)), FC=G2mean/G1mean, log2(FC). The log2(FC) is not consistent with the one in the summary statistics output by topTable()... Does the calculation of logFC depend on the variance? Yuan [[alternative HTML version deleted]]
limma limma • 4.7k views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 12 hours ago
United States
Hi Yuan, On 1/14/2012 1:40 AM, Yuan Tian wrote: > Hi, > > I'm using limma package to do differential expression analysis on a microarray data. May I know how the logFC is computed in the package? > > I start the analysis with a normalized, log2 transformed dataset and a matrix indicate the case and groups as > fit<- lmFit((normalized,log2transformed data), design). > cont.matrix<- makeContrasts(..., levels=design) > fit2<- contrasts.fit(fit, cont.matrix) > fit2<- eBayes(fit2) > result= topTable(fit2, adjust="BH", number=nrow(data)) > > A number of summary statistics are presented by topTable() for the top genes and the selected contrast. I manually compute the logFC for the 2 groups: G1mean=rowMeans(2^(normalized,log2transformed data in group1)), G2mean=rowMeans(2^(normalized,log2transformed data in group2)), FC=G2mean/G1mean, log2(FC). > > The log2(FC) is not consistent with the one in the summary statistics output by topTable()... > > Does the calculation of logFC depend on the variance? No, but it all the computations are done in the log space (e.g., it computes the geometric mean). Computing the arithmetic mean and then converting to log_2 is not the same. You want g1mean <- rowMeans(normalized data in grp1) g2mean <- rowMeans(normalized data in grp2) fc <- g1mean - g2mean Best, Jim > > Yuan > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- James W. MacDonald, M.S. Biostatistician Douglas Lab University of Michigan Department of Human Genetics 5912 Buhl 1241 E. Catherine St. Ann Arbor MI 48109-5618 734-615-7826 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues
ADD COMMENT

Login before adding your answer.

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