fold change calculation in edger
2
0
Entering edit mode
tonja.r ▴ 80
@tonjar-7565
Last seen 8.1 years ago
United Kingdom

After normalizing the data with TMM method in edger one gets lots of values <1. Unfortunately, I found neither in edger manual nor in edger paper the description how the log fold change is calculated. Especially how those values <1 are treated because for instance, the log2 fold change of (0.7/0.03) is  4.544321 what is quite high log2 fold change but it resulted by dividing with a small number. How are the low normalized counts are treated when log2 fold change is calculated?

edger normalization logfc • 6.7k views
ADD COMMENT
0
Entering edit mode

Give an minimum working example with code, because it's not clear what you're describing.

ADD REPLY
1
Entering edit mode
@steve-lianoglou-2771
Last seen 21 months ago
United States

edgeR uses the value from the prior.count parameter (in glmFit, for example) to mitigate the impact of low counts in the denominator that you are anticipating.

You'll find some detail in the ?glmFit documentation. Searching through the archives on this forum should also bring up some useful information.

ADD COMMENT
0
Entering edit mode

Even if I add a default value of prior.count (0.125) it does not mitigate the impact as (0.7+0.125)/(0.03+0.125)=5.322581. Is there somewhere a description how exactly log2 fold change is calculated in edgeR?

ADD REPLY
0
Entering edit mode

Add a larger number to prior.count and check again. Try prior.count=5 for example. Passing the default value would not have changed your result because that is the value that was already used

ADD REPLY
0
Entering edit mode
> log2(0.7/0.03)
[1] 4.544321
> log2((0.7+0.125)/(0.03+0.125))
[1] 2.412126

So clearly, it does mitigate the impact of the small denominator. See ?predFC for details.

ADD REPLY
0
Entering edit mode
@mikelove
Last seen 1 day ago
United States

Details on statistical methods are often described in the help pages for relevant functions. Typical edgeR steps are to calculate normalization factors, estimate dispersions, then do F-test or likelihood ratio tests on coefficients as based on a GLM, as shown in the quick start section of the user guide. If you look up, for example, ?glmFit you get:

Description
Fit a negative binomial generalized log-linear model to the read counts for each gene. Conduct
genewise statistical tests for a given coefficient or coefficient contrast.
Usage
## S3 method for class 'DGEList'
glmFit(y, design=NULL, dispersion=NULL, prior.count=0.125, start=NULL, ...)
...
prior.count average prior count to be added to observation to shrink the estimated log-foldchanges
towards zero.

 

ADD COMMENT

Login before adding your answer.

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