Apply frozen hemolysis-RR correction to new samples
Source:R/singlesample-hemolysis.R
apply_hemolysis_rr.RdSubtracts the predicted hemolysis (and optional platelet) nuisance
contribution from one or more test samples using the frozen per-feature
regression coefficients from fit_hemolysis_rr.
Corrections are clipped to \(\pm\)clip_max log-units to prevent
over-correction. If report_oob = TRUE (default), an oob
attribute flags samples whose hemolysis / platelet scores fall outside the
training range.
Arguments
- x
Numeric vector (single sample) or matrix (samples \(\times\) features).
- fit
Object of class
hemolysis_rr_fitfromfit_hemolysis_rr.- hemo_score
Numeric vector (length = number of samples).
- platelet_score
Optional numeric vector (same length as
hemo_score).- report_oob
Logical. If
TRUE, attaches anoobattribute flagging out-of-training-range samples. DefaultTRUE.