NBumi_CheckFit: Check Fit Quality

Description Usage Arguments Details Value Examples

Description

Checks the quality of the fit of the depth-adjusted negative binomial model.

Usage

1
2
	NBumiCheckFit(counts, fit, suppress.plot=FALSE)
	NBumiCheckFitFS(counts, fit, suppress.plot=FALSE)

Arguments

counts

a numeric matrix of raw UMI counts, columns = samples, rows = genes.

fit

output from NBumiFitModel or NBumiFitBasicModel.

suppress.plot

Whether to plot the observed vs expected frequency of dropouts for genes & cells.

Details

Calculates expected dropouts for genes and cells and compares to observed values. Optionally plots observed vs expected dropouts for both genes and cells. NBumiCheckFit uses depth-adjusted negative binomial with gene-specific dispersions. NBumiCheckFitFS uses depth-adjusted negative binomial with dispersions calculated from the power-law between gene-specific dispersion and mean expression (as is used for feature selection).

Value

Invisibly, named list of output: gene_error = sum of squared error between observed and expected gene-specific total dropouts cell_error = sum of squared error between observed and expected cell-specific total dropouts exp_ps = gene by sample matrix of probability of a dropout for the negative binomial model fitted to each observation.

Examples

1
2
3
4
	library(M3DExampleData)
	counts <- NBumiConvertData(Mmus_example_list$data)
	fit <- NBumiFitModel(counts);
	fit_quality <- NBumiCheckFitFS(counts, fit);

tallulandrews/M3D documentation built on May 31, 2019, 2:55 a.m.