NBumiCompareModels | R Documentation |
Compares the fit of the depth-adjusted negative binomial model and basic negative binomial model.
NBumiCompareModels(counts, size_factor=(Matrix::colSums(counts)/median(Matrix::colSums(counts))))
counts |
a numeric matrix of raw UMI counts, columns = samples, rows = genes. |
size_factor |
a calculated size factor for library size normalization. |
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.
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.
library(M3DExampleData)
counts <- NBumiConvertData(Mmus_example_list$data)
out <- NBumiCompareModels(counts);
out$errors
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.