NBumi_FitDisp: Fit gene-specific dispersion

Description Usage Arguments Details Value Examples

Description

Fits dispersion for a specific gene for the depth-adjusted negative binomial. Functions tagged with "bg__" are not meant for direct usage and are not available in the Bioconductor release.

Usage

1
	bg__fit_size_to_var(obs, mu_vec, max_size, min_size=10^-10, convergence=0.001)

Arguments

obs

observed variance corrected for library size.

mu_vec

expectation of depth-adjusted negative-binomial for each observation

max_size

maximum dispersion for genes that exhibit Poissonian expression.

min_size

initial dispersion estimate.

convergence

acceptable error on dispersion estimate.

Details

Minimized the difference between the mean of expected variances for each observation based on the depth-adjust negative binomial(DANB) and the observed variance. The observed variance is corrected for library size by subtracting the observation specific mean as per the DANB from the observed UMI counts prior to calculating the variance. The optimization is done using an iterative method similar to Newton's method, which ends when the difference between estimates is less than "convergence" or if the estimated dispersion exceeds "max_size" or after 1000 iterations.

Value

Estimated dispersion.

Examples

1
2
3
4
5
#	library(M3DExampleData)
#	counts <- as.matrix(Mmus_example_list$data);
#	counts <- counts[rowSums(counts) > 0,];
#	fit <- NBumiFitModel(counts);
#	coeffs <- NBumiFitDispVsMean(fit, suppress.plot=TRUE);

M3Drop documentation built on Nov. 8, 2020, 5:06 p.m.