bg__default_mean2disp {M3Drop} | R Documentation

## Mean to Dispersion

### Description

Default function to calculate the negative binomial dispersion parameter given the mean expression of the gene.

### Usage

    	bg__default_mean2disp(mu, coeffs=c(3.967816,-1.855054))

### Arguments

`mu` | mean expression of the gene(s)
`coeffs` | coefficients of linear regression between log(cv2) and log10(mean expression) for observed data.

### Details

Given the coefficients of a linear regression between the natural logarithm of the squared coefficient of variation and log base 10 of mean expression, calculates the dispersion parameter (1/size) of the negative binomial distribution for a given expression level.

Default coefficients were fit to the Buettner at al.[1] single cell mESC data.

### Value

the dispersion parameter (1/size) for the (mu,size) paramterization of the `rnbinom` function.

### References

[1] Buettner et al. (2015) Computational analysis of cell-to-cell heterogeneity in single-cell RNA-sequencing data reveals hidden subpopulations of cells. Nature Biotechnology 33 : 155-160.

### Examples

    # mu <- 100
    # r <- bg__default_mean2disp(mu)
    # n_cells <- 50
    # sim <- rnbinom(n_cells, size=1/r, mu=mu)

[Package M3Drop version 1.16.0 Index]