scgen.SCGEN.batch_removal

SCGEN.batch_removal(adata=None)[source]

Removes batch effects.

Parameters
adata : AnnData | NoneOptional[AnnData] (default: None)

AnnData object with equivalent structure to initial AnnData. If None, defaults to the AnnData object used to initialize the model. Must have been setup with batch_key and labels_key, corresponding to batch and cell type metadata, respectively.

Return type

AnnData

Returns

corrected: ~anndata.AnnData AnnData of corrected gene expression in adata.X and corrected latent space in adata.obsm[“latent”]. A reference to the original AnnData is in corrected.raw if the input adata had no raw attribute.