harmonization
neuroCombat(dat, covars, batch_col, categorical_cols=None, continuous_cols=None, eb=True, parametric=True, mean_only=False, ref_batch=None)
Run ComBat to remove scanner effects in multi-site imaging data
Parameters
dat : Neuroimaging data to correct with shape = (features, samples) e.g. cortical thickness measurements, image voxels, etc
covars : Contains the batch/scanner covariate as well as additional covariates (optional) that should be preserved during harmonization.
batch_col : Indicates batch (scanner) column name in covars (e.g. “scanner”)
categorical_cols : Specifies column names in covars data frame of categorical variables to be preserved during harmonization (e.g. [“sex”, “disease”])
continuous_cols : Indicates column names in covars data frame of continuous variables to be preserved during harmonization (e.g. [“age”])
eb : Should Empirical Bayes be performed? True by default
parametric : Should parametric adjustements be performed? True by default
mean_only : Should only be the mean adjusted (no scaling)? False by default
ref_batch : Batch (site or scanner) to be used as reference for batch adjustment. None by default
Returns
A dictionary of length 3:
- data: A numpy array with the same shape as dat which has now been
ComBat-harmonized
- estimates: A dictionary of the ComBat estimates used for harmonization
- info: A dictionary of the inputs needed for ComBat harmonization