convert_to_integer: Turn a matrix of expression values into integer counts

Description Usage Arguments Details Value Examples

View source: R/Fitting_ZINB.R

Description

Reformats a provided expression matrix to be compatible with NBumi modelling.

Usage

1

Arguments

mat

a numeric matrix of expression values (ideally raw UMI counts or raw read counts), columns = samples, rows = genes.

Details

Coerces the provided data to a matrix then rounds all values up (ceiling) to integers and removes all rows where all values are zero.

Value

Rounded, integer matrix of the original data.

Examples

1
2
3
mat <- matrix(rgamma(1000, shape=10, scale=20), ncol=10)
mat_int <- convert_to_integer(mat)
is.integer(mat_int)

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