episcanpy.api.pp.regress_out

episcanpy.api.pp.regress_out(adata, keys, n_jobs=None, copy=False)

Regress out unwanted sources of variation.

Uses simple linear regression. This is inspired by Seurat’s regressOut function in R [Satija15].

Parameters
adata : AnnData

The annotated data matrix.

keys : str or list of str

Keys for observation annotation on which to regress on.

n_jobs : int or None, optional. If None is given, then the n_jobs seting is used (default: None)

Number of jobs for parallel computation.

copy : bool, optional (default: False)

If an AnnData is passed, determines whether a copy is returned.

Returns

Depending on copy returns or updates adata with the corrected data matrix.