I have a quick question about E-values in voom versus cpm from edgeR
E-values from voom are calculated in the following way ->
t(log2(t(counts + 0.5)/(lib.size + 1) * 1e+06))
If I understand this correctly, this is log2 counts per million of counts with a pseudo-count of 0.5, normalized on the library size + 2 * pseudocount (which was manually set to 0.5)
However, the cpm function in edgeR is slightly different when you want use
cpm(x, log=T, prior.count=0.5).
It calculates the following:
# First scales the prior.count/pseudo-count and adds 2x the scaled prior count to the libsize
prior.count.scaled <- lib.size/mean(lib.size)*prior.count
lib.size <- lib.size+2*prior.count.scaled
lib.size <- 1e-6*lib.size
# Calculates log2 log2(t( (t(x)+prior.count.scaled) / lib.size ))
Is there a reason the pseudocount/prior-count is able to be set by the user and then scaled to library size in the edgeR cpm function, but is manually set as 0.5 regardless of library size in voom?
That's the only difference I see between the E-value calculation and the cpm function (and when I choose a value for the prior.count that returns a prior.count.scaled value equal to 0.5, I then get the same values for cpm in edgeR as I would when using voom E values).