rapids_singlecell.pp.regress_out#
- rapids_singlecell.pp.regress_out(adata, keys, *, layer=None, inplace=True, batchsize=None, verbose=False)[source]#
Use linear regression to adjust for the effects of unwanted noise and variation.
- Parameters:
- adata
AnnData AnnData object
- keys
str|list Keys for observation annotation on which to regress on. Supports both numerical and single categorical covariates.
- layer
str|None(default:None) Layer to regress instead of
X. IfNone,Xis regressed.- inplace
bool(default:True) Whether to update
adataor return the corrected matrix ofadata.Xandadata.layers.- batchsize
Union[int,Literal['all'],None] (default:None) Number of genes that should be processed together. If
'all'all genes will be processed together if.n_obs<100000. IfNoneeach gene will be analysed separately. Only used for continuous covariates.- verbose
bool(default:False) Print debugging information
- adata
- Return type:
- Returns:
Returns a corrected copy or updates
adatawith a corrected version of the originaladata.Xandadata.layers['layer'], depending oninplace.