scbiot.pp.setup_anndata

Contents

scbiot.pp.setup_anndata#

scbiot.pp.setup_anndata(adata, *, var_key='scBIOT_OT', batch_key='batch', pseudo_key='leiden_scBIOT_OT', true_key=None, overwrite=False)#

Register the AnnData fields the transformer VAE relies on.

Parameters#

adata:

AnnData object that already contains the OT-aligned embedding.

var_key:

Key pointing to the numerical representation (adata.obsm[var_key] or adata.X).

batch_key:

adata.obs column that stores batch labels.

pseudo_key / true_key:

Optional adata.obs columns for pseudo and ground-truth labels. Set either to None to disable that label type.

overwrite:

Replace an existing registration in adata.uns when True.

Parameters:
  • adata (AnnData)

  • var_key (str)

  • batch_key (str)

  • pseudo_key (str | None)

  • true_key (str | None)

  • overwrite (bool)

Return type:

dict[str, str | None]