calculate_summary_values: Calculate Summary Statistics

Description Usage Arguments Details Value Examples

View source: R/Fitting_ZINB.R

Description

Calculates summary statistics to facilitate the fitting of a ZINB model, performs various data input checks.

Usage

1
2

Arguments

counts

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

Details

Calculates various summary statistics: total counts by genes and cells, total dropouts by genes and cells and dimensions; which are necessary for fitting library-size adjusted negative binomial models or library-size adjusted zero-inflated negative binomial models.

Compatible with both regular matrices and sparse matrices as defined in the Matrix package.

Value

A named list of: tis = total molecules per cell, tjs = total molecules per gene, dis = total dropouts per cell, djs = total dropouts per genes, total = total molecules in dataset, nc = number of cells, ng = number of genes

Examples

1
2
	counts <- matrix(rnbinom(10000, mu=10, size=0.5), ncol=20);
	stats <- calculate_summary_values(counts);

tallulandrews/TreeOfCells documentation built on April 26, 2020, 2:43 p.m.