scale_variance: Scale variance across donors for each gene within each cell...

View source: R/form_tensor.R

scale_varianceR Documentation

Scale variance across donors for each gene within each cell type. Generally, this should be done through calling the form_tensor() wrapper function.

Description

Scale variance across donors for each gene within each cell type. Generally, this should be done through calling the form_tensor() wrapper function.

Usage

scale_variance(container, var_scale_power)

Arguments

container

environment Project container that stores sub-containers for each cell type as well as results and plots from all analyses

var_scale_power

numeric Exponent of normalized variance that is used for variance scaling. Variance for each gene is initially set to unit variance across donors (for a given cell type). Variance for each gene is then scaled by multiplying the unit scaled values by each gene's normalized variance (where the effect of the mean-variance dependence is taken into account) to the exponent specified here. If NULL, uses var_scale_power from container$experiment_params.

Value

The project container with the variance altered for each gene within the pseudobulked matrices for each cell type.


scITD documentation built on Sept. 8, 2023, 5:11 p.m.