classmethod SOLO.from_scvi_model(scvi_model, adata=None, restrict_to_batch=None, doublet_ratio=2)[source]

Instantiate a SOLO model from an scvi model.

scvi_model : SCVISCVI

Pre-trained model of SCVI. The adata object used to initialize this model should have only been setup with count data, and optionally a batch_key; i.e., no extra covariates or labels, etc.

adata : AnnData | NoneOptional[AnnData] (default: None)

Optional anndata to use that is compatible with scvi_model.

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

Batch category in batch_key used to setup adata for scvi_model to restrict Solo model to. This allows to train a Solo model on one batch of a scvi_model that was trained on multiple batches.

doublet_ratio : intint (default: 2)

Ratio of generated doublets to produce relative to number of cells in adata or length of indices, if not None.


SOLO model