Over a rushed lunch I hacked a tiny pandas + seaborn notebook to color UMAPs by plate, and our “disease signal” disappeared after ComBat - turns out one batch label in the CSV had a trailing space, creating a phantom batch. Do you have a lightweight preflight check for catching metadata glitches like that before they waste a day?
A quick preflight that saves me often: coerce all metadata to string, normalize/strip/casefold, then value_counts and an allowed-set assert per factor before ComBat (for c in cat_cols: s=df[c].astype(str).str.normalize(‘NFKC’).str.strip().str.casefold(); assert set(s.unique())<=ALLOWED[c]; print(s.value_counts(dropna=False))). I also eyeball a crosstab of plate vs batch and run a duplicate-ID check; it catches trailing spaces, NBSPs, and NA/na/‘’ splits fast.