NBumi_CompareModels: Compare negative binomial models

Description Usage Arguments Details Value Examples

Description

Compares the fit of the depth-adjusted negative binomial model and basic negative binomial model.

Usage

1
	NBumiCompareModels(counts, size_factor=(Matrix::colSums(counts)/median(Matrix::colSums(counts))))

Arguments

counts

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

size_factor

a calculated size factor for library size normalization.

Details

Compares the fit of the depth-adjusted negative binomial model and basic negative binomial model. Depth -adjusted negative binomial is fit to raw molecule counts. Basic negative binomial is fit to library-size normalized counts. The absolute error between observed gene-specific dropouts and expectations given each model is calculated. And a plot of fitted and observed mean-expression vs dropouts is created.

Value

A named list containing: errors : Vector of errors for each model. basic_fit : object for the basic negative binomial. adjusted_fit : object for the depth-adjusted negative binomial.

Examples

1
2
3
4
	library(M3DExampleData)
	counts <- NBumiConvertData(Mmus_example_list$data)
	out <- NBumiCompareModels(counts);
	out$errors

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