NBumi_CheckFit: Check Fit Quality

NBumiCheckFitR Documentation

Check Fit Quality

Description

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

Usage

	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

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

tallulandrews/M3Drop documentation built on March 6, 2024, 1:49 a.m.