cycombinepy.normalize¶
- cycombinepy.normalize(adata, markers=None, method='scale', batch_key='batch', ties_method='average', layer=None, copy=False)[source]¶
Batch-wise normalize marker columns of
adata.Port of
normalizeinR/02_batch_correct.R:27-111. Each batch is processed independently, so that downstream clustering is less influenced by between-batch shifts.- Parameters:
adata (
AnnData) – AnnData containing expression inadata.X(or a layer).markers (
Optional[Iterable[str]]) – Var names to normalize. IfNone,cycombinepy.get_markers()is used.method (
Literal['scale','rank','CLR','CLR_seu','CLR_med','qnorm','none']) – One of"scale","rank","CLR","CLR_seu","CLR_med","qnorm","none".batch_key (
str) – Column inadata.obsidentifying the batch.ties_method (
Literal['average','min','max','dense','ordinal']) – Tie-breaking rule formethod="rank".layer (
str|None) – If given, read / write that layer instead ofadata.X.copy (
bool) – If True, return a copy; otherwise modify in place and return None.
- Return type: