RelativeCounts: Normalize raw data to fractions

View source: R/preprocessing.R

RelativeCountsR Documentation

Normalize raw data to fractions

Description

Normalize count data to relative counts per cell by dividing by the total per cell. Optionally use a scale factor, e.g. for counts per million (CPM) use scale.factor = 1e6.

Usage

RelativeCounts(data, scale.factor = 1, verbose = TRUE)

Arguments

data

Matrix with the raw count data

scale.factor

Scale the result. Default is 1

verbose

Print progress

Value

Returns a matrix with the relative counts

Examples

mat <- matrix(data = rbinom(n = 25, size = 5, prob = 0.2), nrow = 5)
mat
mat_norm <- RelativeCounts(data = mat)
mat_norm


Seurat documentation built on May 29, 2024, 4:20 a.m.