oadr_cpep.common_utils module
Shared low-level helpers for the oadr-cpep steps: data loading, within-site scaling, cross-validation, and metrics. No step logic and no plotting live here (plotting is in plot.py).
- oadr_cpep.common_utils.load_site(site, panel, *, tidy=None, aa=None, demo=None, cpeptide=None, arms=None, arm_subjects=None)[source]
Load one study + panel from explicit file paths -> (frame, feature_names, target).
- oadr_cpep.common_utils.read_feature_list(features)[source]
Read a feature-list CSV (column ‘feature’) -> (feats, source_basename, source_tag).
source_tagis the leading token of the filename (e.g. SDY524), used to stamp every fit output so you can see which feature set it was fit on.
- oadr_cpep.common_utils.stem(site, panel, source_tag)[source]
The <site>_from-<src>_panel<X> filename stem shared by every fit output.
- oadr_cpep.common_utils.design_matrix(frame, feats)[source]
Reindex the site frame to feats, fill missing with 0 -> float ndarray.