var_stabilize: Apply a variance stabilizing transformation

View source: R/corral.R

var_stabilizeR Documentation

Apply a variance stabilizing transformation

Description

Prior to running CA, there is an option to apply a variance stabilizing transformation. This function can be called explicitly or used with the 'vst_mth' argument in corral and corral_preproc.

Usage

var_stabilize(inp, transform = c("sqrt", "freemantukey", "anscombe"))

Arguments

inp

matrix, numeric, counts or logcounts; can be sparse Matrix or matrix

transform

character indicating which method should be applied. Defaults to the square root transform ('"sqrt"'). Other options include '"freemantukey"' and '"anscombe"'.

Value

variance-stabilized matrix; sparse if possible

Examples

x <- as.matrix(rpois(100, lambda = 50), ncol = 10)
vst_x <- var_stabilize(x)

laurenhsu1/corral documentation built on Feb. 19, 2023, 10:37 p.m.