dotools_py.tl.run_scvi#
- dotools_py.tl.run_scvi(adata, batch_key, gene_key='highly_variable', layer_counts='counts', categorical_covariates=None, continuous_covariates=None, n_hidden=128, n_latent=30, n_layers=3, dispersion='gene-batch', gene_likelihood='zinb', get_model=False, **kwargs)[source]#
Run scVI.
Run scVI to integrate sc/snRNA more information on scvi-tools.
- Parameters:
- adata
AnnData Annotated data matrix.
- batch_key
str Column in
adata.obswith batch information.- gene_key
Union[str,Literal['all']] (default:'highly_variable') Boolean column in
adata.varused to select the genes that will be used for the inference.- layer_counts
str(default:'counts') Layer in
adata.layerswith raw counts.- categorical_covariates
list(default:None) Column in
adata.obswith categorical covariates to correct for during scVI inference.- continuous_covariates
list(default:None) Column in
adara.obswith continuous covariates to correct for during scVI inference.- n_hidden
int(default:128) Number of hidden layers.
- n_latent
int(default:30) Dimensions of the latent space.
- n_layers
int(default:3) Number of layers
- dispersion
Literal['gene','gene-batch','gene-label','gene-cell'] (default:'gene-batch') Gene dispersion mode for scVI.
- gene_likelihood
Literal['zinb','nb','poisson','normal'] (default:'zinb') Gene likelihood.
- get_model
bool(default:False) Return the trained model.
- kwargs
Additional arguments for scvi.model.SCVI.
- adata
- Return type:
- Returns:
Returns
Noneor the trained scVI model ifget_modelis set toTrue. The latent space is saved in the AnnData under X_scVI.