scvi.model.DestVI.setup_anndata

static DestVI.setup_anndata(adata, layer=None, copy=False)[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
adata : AnnDataAnnData

AnnData object containing raw counts. Rows represent cells, columns represent features.

layer : str | NoneOptional[str] (default: None)

if not None, uses this as the key in adata.layers for raw count data.

copy : boolbool (default: False)

if True, a copy of adata is returned.

Return type

AnnData | NoneOptional[AnnData]

Returns

If copy, will return AnnData. Adds the following fields to adata:

.uns[‘_scvi’]

scvi setup dictionary

.obs[‘_scvi_labels’]

labels encoded as integers

.obs[‘_scvi_batch’]

batch encoded as integers