scgen.SCGEN.setup_anndata¶
- classmethod SCGEN.setup_anndata(adata, batch_key=None, labels_key=None, **kwargs)[source]¶
- Sets up the
AnnData
object for this model. A mapping will be created between data fields used by this model to their respective locations in adata.
None of the data in adata are modified. Only adds fields to adata.
- Parameters
- batch_key :
str
|None
Optional
[str
] (default:None
) key in adata.obs for batch information. Categories will automatically be converted into integer categories and saved to adata.obs[‘_scvi_batch’]. If None, assigns the same batch to all the data.
- labels_key :
str
|None
Optional
[str
] (default:None
) key in adata.obs for label information. Categories will automatically be converted into integer categories and saved to adata.obs[‘_scvi_labels’]. If None, assigns the same label to all the data.
- batch_key :
Notes
scGen expects the expression data to come from adata.X
- Sets up the