estimate_dispersion: Estimate dispersion

Description Usage Arguments Details Value

View source: R/decal.R

Description

It estimates and regularizes the genes (or features) dispersion parameter of decal negative binomial model using the strategy developed by Hafemeister & Satija (2019).

Usage

1
estimate_dispersion(count, n = 2000, min_mu = 0.05)

Arguments

count

UMI count matrix with cells as columns and genes (or features) as rows.

n

number of genes sampled to preliminary estimation.

min_mu

minimal overall average expression (mu) required.

Details

First, for a subset of genes it fits a Poisson regression offseted by log(depth) and estimate a crude theta using a maximum likelihood estimator with the observed counts and regression results. Next, it regularize and expands theta estimates with a kernel smoothing function as a function of average count (mu).

Value

a numeric vector of the estimated dispersion for each row of count


mauranolab/decal documentation built on Dec. 21, 2021, 3:50 p.m.