scvelo.tl.VELOVI.get_state_assignment¶
-
VELOVI.
get_state_assignment
(adata=None, indices=None, gene_list=None, hard_assignment=False, n_samples=20, batch_size=None, return_mean=True, return_numpy=None)¶ Returns cells by genes by states probabilities.
- Parameters
- adata :
AnnData
,None
AnnData object with equivalent structure to initial AnnData. If None, defaults to the AnnData object used to initialize the model.
- indices :
Sequence
[int
],None
Indices of cells in adata to use. If None, all cells are used.
- gene_list :
Sequence
[str
],None
Return frequencies of expression for a subset of genes. This can save memory when working with large datasets and few genes are of interest.
- hard_assignment :
bool
Return a hard state assignment
- n_samples :
int
Number of posterior samples to use for estimation.
- batch_size :
int
,None
Minibatch size for data loading into model. Defaults to scvi.settings.batch_size.
- return_mean :
bool
Whether to return the mean of the samples.
- return_numpy :
bool
,None
Return a
ndarray
instead of aDataFrame
. DataFrame includes gene names as columns. If either n_samples=1 or return_mean=True, defaults to False. Otherwise, it defaults to True.
- adata :
- Return type
- Returns
If n_samples > 1 and return_mean is False, then the shape is (samples, cells, genes).
Otherwise, shape is (cells, genes). In this case, return type is
DataFrame
unless return_numpy is True.