hest.batch_effect.correct_batch_effect

hest.batch_effect.correct_batch_effect(adata_list: List[sc.AnnData], batch=None, method='combat', method_kwargs={}) List[sc.AnnData]

Apply a batch effect correction method to a list of Spatial Transcriptomics expressions

Parameters:
  • adata_list (List[sc.AnnData]) – list of sc.AnnData containing gene expression

  • batch (List[int], optional) – list of integers corresponding to the batch membership of each adata in adata_list.

  • [1 ((i.e.)

  • 1

  • None. (0] means that the first two adata are in the same batch and the third one is in a different batch). Defaults to)

  • method (str, optional) – bacth correction method, must be in [‘combat’, ‘mnn’, ‘harmony’]. Defaults to ‘combat’.

  • method_kwargs (dict, optional) – batch correction method kwargs. Defaults to {}.

Returns:

batch corrected list of gene expression

Return type:

List[sc.AnnData]