Given prediction and prior variance, calculates the Gamma posterior distribution parameters for a single gene.
calc.post(y, mu, sf, scale.sf)
y | A vector of observed gene counts. |
---|---|
mu | A vector of prior means. |
sf | Vector of normalized size factors. |
scale.sf | Mean of the original size factors. |
A list with the following components
estimate
Recovered (normalized) expression
se
Standard error of expression estimate
Let \(\alpha\) be the shape parameter and \(\beta\) be the rate parameter of the prior Gamma distribution. Then, the posterior Gamma distribution will be $$Gamma(y + \alpha, sf + \beta),$$ where y is the observed gene count and sf is the size factor.