computeZScore: Compute Z-Score

Description Usage Arguments Value Examples

View source: R/computeZScore.R

Description

Computes Z-Score from an input count matrix using the formula ((x-mean(x))/sd(x)) for each gene across all cells. The input count matrix can either be a base matrix, dgCMatrix or a DelayedMatrix. Computations are performed using DelayedMatrixStats package to efficiently compute the Z-Score matrix.

Usage

1
computeZScore(counts)

Arguments

counts

matrix (base matrix, dgCMatrix or DelaymedMatrix)

Value

z-score computed counts matrix (DelayedMatrix)

Examples

1
2
data(sce_chcl, package = "scds")
assay(sce_chcl, "countsZScore") <- computeZScore(assay(sce_chcl, "counts"))

singleCellTK documentation built on Nov. 8, 2020, 5:21 p.m.