Imputation: Normalized Data using the DANB model

ImputationR Documentation

Normalized Data using the DANB model

Description

Normalizes data to a common library size, imputing zeros as needed.

Usage

	NBumiImputeNorm(counts, fit, total_counts_per_cell=median(fit$vals$tis))

Arguments

counts

raw count matrix, rows=genes, cols=cells

fit

Output from NBumiFitModel

total_counts_per_cell

reference library size to normalize all cells to.

Details

Converts raw counts into positions in the CDF for the depth-adjusted negative binomial model fit to each observation. Adjusts the DANB parameters (mean and size) for the new library size. Then calculate the normalized counts for the equivalent position in the CDF for the NB using the new parameters.

Value

Normalized count matrix.

Examples

library(M3DExampleData)
counts <- as.matrix(Mmus_example_list$data);
counts <- counts[rowSums(counts) > 0,];
fit <- NBumiFitModel(counts);
normed_counts <- NBumiImputeNorm(counts, fit, 1000000)

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