omicverse.pp.regress#
- omicverse.pp.regress(adata, *, keys=None, layer=None, n_jobs=8, **kwargs)[source]#
Regress out technical covariates from each gene.
- Parameters:
adata (anndata.AnnData) – AnnData object. The columns specified in
keysmust exist inadata.obs.keys (list of str, optional) – Column names in
adata.obsto regress out. Defaults to['mito_perc', 'nUMIs'], which are computed byov.pp.qc. Common additions include cell-cycle scores (S_score,G2M_score) and ribosomal gene percentage.layer (default:
None) – Expression layer to regress.Noneusesadata.X.n_jobs (default:
8) – Parallel jobs for the CPU regressor. Default8.**kwargs – Extra options forwarded to
scanpy.pp.regress_outon CPU (e.g.copy). Ignored when the GPU backend (rapids_singlecell) is active.
- Returns:
Writes the residualised expression to
adata.layers['regressed'].- Return type:
None