scvi.external.RNAStereoscope

class scvi.external.RNAStereoscope(sc_adata, **model_kwargs)[source]

Reimplementation of Stereoscope [Andersson20] for deconvolution of spatial transcriptomics from single-cell transcriptomics.

https://github.com/almaan/stereoscope.

Parameters
sc_adata : AnnDataAnnData

single-cell AnnData object that has been registered via setup_anndata().

**model_kwargs

Keyword args for RNADeconv

Examples

>>> sc_adata = anndata.read_h5ad(path_to_sc_anndata)
>>> scvi.data.setup_anndata(sc_adata, labels_key="labels")
>>> stereo = scvi.external.stereoscope.RNAStereoscope(sc_adata)
>>> stereo.train()

Attributes

device

history

Returns computed metrics during training.

is_trained

test_indices

train_indices

validation_indices

Methods

load(dir_path[, adata, use_gpu])

Instantiate a model from the saved output.

save(dir_path[, overwrite, save_anndata])

Save the state of the model.

to_device(device)

Move model to device.

train([max_epochs, lr, use_gpu, train_size, …])

Trains the model using MAP inference.