auto_normalisation_factor: Compute empirical normalisation factors (library size)

View source: R/auto_config.R

auto_normalisation_factorR Documentation

Compute empirical normalisation factors (library size)

Description

For a tibble dataset with a cell and value columns, it sums up all values per cell (total library size), and scales the value for 10^x where x is the median nuimber of digits in each total value size.

For instance for numbers of the order of ~1000 it will rescale the library size by a factor 1000, taking all values around ~1.

Usage

auto_normalisation_factor(x)

Arguments

x

A tibble with a cell and value columns.

Value

A tibble, aggregated by cell with total values (sum), rescaled by the estimated constant.

Examples

data('example_input')
example_input$x_rna %>% auto_normalisation_factor

Militeee/rcongas documentation built on Nov. 1, 2024, 2:38 a.m.