msmu.pp.correct_batch_effect
Batch correction methods for MuData object.
GIS-based normalization, median centering, ComBat, and continuous batch correction (with lowess) are supported.
ComBat uses inmoose (Colange et al., 2025),
specifically its pycombat_norm function.
For 'gis', 'median_center', and 'continuous' the per-feature abundance scale is restored after
correction (gis: the geometric mean of the per-batch GIS levels, i.e., classic IRS from
Plubell et al. (2017); median_center/continuous: the per-feature overall median).
Restoration is decided for the modality as a whole: when the matrix has cross-batch structure
(at least one feature observed in >=2 batches, as at the peptide/protein level) every observed feature is restored -- a
single-batch feature to its own level, so it stays on the same abundance scale as the rest. When
the matrix is fully block-diagonal (no feature spans >=2 batches, e.g., a per-plex-split PSM
matrix) nothing is restored and the output stays reference-relative, ready to roll up. ComBat
scales itself.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mdata
|
MuData
|
|
required |
method
|
Literal['gis', 'median_center', 'combat', 'continuous']
|
Batch correction method to use. Options are |
required |
category
|
str
|
Category in |
required |
modality
|
str
|
Modality to batch correct. |
required |
layer
|
str | None
|
Layer to batch correct. If |
None
|
gis_samples
|
list[str] | None
|
List of GIS samples. |
None
|
drop_gis
|
bool
|
If |
True
|
log_transformed
|
bool
|
If |
True
|
Returns:
| Type | Description |
|---|---|
MuData
|
Batch corrected |
References
Colange, M., Appé, G., Meunier, L., Weill, S., Johnson, W. E., Nordor, A., and Behdenna, A. Bridging the gap between R and Python in bulk transcriptomic data analysis with InMoose. Scientific Reports 15, 18104 (2025). https://doi.org/10.1038/s41598-025-03376-y.
Plubell, D. L. et al. Extended multiplexing of Tandem Mass Tags (TMT) labeling reveals age and high fat diet specific proteome changes in mouse epididymal adipose tissue. Molecular & Cellular Proteomics 16, 873–890 (2017). https://doi.org/10.1074/mcp.M116.065524.