Skip to main content

Module normalisation

Module normalisation 

Source
Expand description

calcNormFactors: TMM, TMMwsp, RLE and upper-quartile scaling factors.

A port of edgeR’s normLibSizes.default and the four .calcFactor* helpers it dispatches to. Where edgePython and edgeR disagree, edgeR wins; see calc_factor_tmmwsp.

§Access pattern

Every method works down a column, unlike the rest of the crate. The module therefore drops the all-zero genes and transposes the survivors once into a column-major f64 buffer. That costs one n_kept * n_samples allocation and makes the per-sample rank sorts that dominate TMM, and the RLE geometric means, read sequentially. Counts are converted from T to f64 on read.

Structs§

NormParams
Tuning knobs for calc_norm_factors.

Enums§

NormMethod
Which scaling rule calc_norm_factors applies.

Functions§

calc_norm_factors
Normalisation factors for a count matrix, as edgeR’s calcNormFactors.
parse_norm_method
Parses edgeR’s method string.