Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
calculate TMM normalization Nepa10 Bioinformatics 7 06-13-2017 03:13 PM
edgeR GLM model - factorial design with batch effects rhcr56 Bioinformatics 3 01-14-2015 06:52 AM
RNA-seq normalization: How to use TMM and rpkm() in EdgeR?? alisonewr Bioinformatics 2 10-27-2014 08:48 AM
EdgeR or GLM model design question younko Bioinformatics 10 08-31-2014 11:22 PM
edgeR choose the best model of GLM eszter.ari RNA Sequencing 1 02-23-2013 06:49 PM

Thread Tools
Old 08-10-2015, 08:40 PM   #1
Location: Auckland, NZ

Join Date: Nov 2011
Posts: 46
Default EdgeR TMM normalization with the glm model

So I've had edgeR running on some time course data. When comparing any two samples using a basic edgeR analysis, I include the line

y <- calcNormFactors(y)

in my pipeline. I note that this step appears to be absent from the glm approach. When I'm setting up my glm pipeline, if I include this calculation of normalization factors in the process, then the next step :

y <- estimateGLMCommonDisp(y,design)

fails, returning
Error in qr.default(x) : NA/NaN/Inf in foreign function call (arg 1)
In addition: Warning message:
In qr.default(x) : NAs introduced by coercion

If I leave the normalization out, it works. Scanning through the manual, I find, in section 2.6.6, this:

The correction factors may take the form of scaling factors for the library sizes, such as computed by calcNormFactors, which are then used to compute the effective library sizes. Alternatively, gene-specific correction factors can be entered into the glm functions of edgeR as offsets. In the latter case, the offset matrix will be assumed to account for all normalization issues, including sequencing depth and RNA composition.

Which is all well and good. Two questions though. Firstly, are the offsets automatically generated and applied? The suggested method of running a glm model,

design <- model.matrix(~group)
y <- estimateGLMCommonDisp(y,design)
y <- estimateGLMTrendedDisp(y,design)
y <- estimateGLMTagwiseDisp(y,design)
fit <- glmFit(y,design)

doesn't, on the face of it suggest that they are. Question 1a) if they're not, how/where do I generate and apply them?

Secondly, the manual suggests that this accounts for all normalization issues, but it also suggests that this is a gene-wise model based normalization procedure. Does it then take library size into account?

tirohia is offline   Reply With Quote
Old 09-14-2015, 11:50 AM   #2
Location: Spain

Join Date: Jan 2012
Posts: 26

I've got the same error message when trying to get a pairwise model estimateGLMCommonDisp. My mistake was with the design matrix.
If you type on R


you get a full information about this command and at the end there is an example that you can run with a routine that generates data and their design matrix. Check out this design matrix and change it to your data to see if the problem is with the data or with the design. It has worked for me.
AJERYC is offline   Reply With Quote

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 11:22 AM.

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