computeZScore: Compute Z-Score

View source: R/computeZScore.R

computeZScoreR Documentation

Compute Z-Score

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

computeZScore(counts)

Arguments

counts

matrix (base matrix, dgCMatrix or DelayedMatrix)

Value

z-score computed counts matrix (DelayedMatrix)

Examples

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

compbiomed/singleCellTK documentation built on Feb. 10, 2024, 3:32 a.m.