Single-sample robust-regression hemolysis correction (Module B)
Source:R/singlesample-hemolysis.R
singlesample-hemolysis.RdFrozen robust-regression hemolysis correction introduced in the single-sample scoring bank (Module B). Performs per-feature robust regression of log-expression on a hemolysis proxy score (and optionally a platelet score), fitting only on training controls. At deployment, the predicted nuisance contribution is subtracted from each feature.
Note: the existing package file hemolysis-correction.R provides
fit_hemolysis_prefilter() (a different approach based on
marker-ratio gating). This file provides the Module-B fit-and-freeze
approach and is named singlesample-hemolysis.R to avoid collision.
Methods provided:
fit_hemolysis_rr: fit the per-feature robust-regression model.apply_hemolysis_rr: apply the frozen model to new samples.