Moderator: This post is in answer to: edgeR: fold change reported by exactTest for zero values of rna-seq
See ?exactTest and read the description of the prior.count argument.
For a little more detail, see ?predFC.
Note that division by zero is not undefined in R, it is just infinite (Inf). If you run exactTest() with prior.count=0, you will get exactly that.
> Date: Fri, 31 Jan 2014 14:09:23 +0000
> From: Nick N <feralmedic at="gmail.com=">
> To: bioconductor at r-project.org
> Subject: [BioC] edgeR: fold change reported by exactTest for zero values of rna-seq
> I have used the exact test in edgeR to compute the log fold changes. Here
> is the snippet:
> d <- DGEList(counts=counts, group=samples$Condition)
> d <- calcNormFactors(d)
> d <- estimateCommonDisp(d)
> d <- estimateTagwiseDisp(d)
> de <- exactTest(d)
> I've noticed that some genes have zero expression in all samples
> belonging to one of the two conditions. This would make the fold change
> mathematically undefined (division by zero). Yet the FC is reported as
> being ~2^-9. My question is - how does edgeR come up with this value?
> I've checked both the manual and the reference guide but couldn't figure
> out. There are various functions that accept pseudocounts as parameters
> but I have entered none in my snippet. So how does edgeR make up for the
> zero values in this particular case (which seems to be the default usage
> of the exactTest).