SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
RPKM vs Fold Change ppm Bioinformatics 4 05-06-2014 07:49 AM
Log fold change Erwan Bioinformatics 3 03-25-2014 05:05 AM
Standardized Fold Change dbaud Introductions 5 01-27-2014 10:47 AM
Contradictory log-fold-change figures from DESeq? Alex234 RNA Sequencing 11 08-22-2013 03:36 AM
fold change value-cuffdiff madsaan Bioinformatics 4 02-10-2011 06:51 AM

Reply
 
Thread Tools
Old 12-14-2014, 06:27 PM   #1
fpbarthel
Junior Member
 
Location: Houston

Join Date: Dec 2014
Posts: 5
Default log fold change from glm/poisson

Hi,

I'm wondering how to derive the log fold change from the output of R's glm using poisson family (for RNA-seq data). From R's lm function for linear models (for log2 microarray data) the log fold looks like it is the coefficient (beta), but it looks like the glm output needs some transformation to obtain log fold change. Anyone can walk me through the commands to do this?

Thanks!
fpbarthel is offline   Reply With Quote
Old 12-14-2014, 11:35 PM   #2
dariober
Senior Member
 
Location: Cambridge, UK

Join Date: May 2010
Posts: 311
Default

Quote:
Originally Posted by fpbarthel View Post
Hi,

I'm wondering how to derive the log fold change from the output of R's glm using poisson family (for RNA-seq data).
Hi- The coefficients from glm with Poisson family distribution by R default are presented as natural log since the link function is log. so you have to anti-log the coefficient by exponentiation to get fold change. E.g.:

Quote:
y<- rep(c(10, 40), each= 5)
x<- rep(c('A', 'B'), each= 5)
(fit<- glm(y ~ x, family= poisson()))

Call: glm(formula = y ~ x, family = poisson())

Coefficients:
(Intercept) xB
2.303 1.386

Degrees of Freedom: 9 Total (i.e. Null); 8 Residual
Null Deviance: 96.37
Residual Deviance: -3.997e-14 AIC: 52.44


fc<- exp(fit$coefficients[2]) ## Antilog coef #2
log2(fc) ## Convert to more familiar log2 fold change:
2
dariober is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 01:20 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO