regress out

Regress out unwanted sources of variation using linear regression. This is inspired by Seurat's regressOut function in R [Satija15]. Note that this function tends to overcorrect in certain circumstances.

Parameters

keys: List[str] Keys for observation annotation on which to regress on.


Web view

regress_out_screenshot

Python equivalent

import scanpy as sc

regress_keys = ['percent_mt', 'percent_ribo']
sc.pp.regress_out(adata, keys=regress_keys)