scvi.external.stereoscope.RNADeconv

class scvi.external.stereoscope.RNADeconv(n_genes, n_labels, **model_kwargs)[source]

Bases: scvi.module.base._base_module.BaseModuleClass

Model of single-cell RNA-sequencing data for deconvolution of spatial transriptomics.

Reimplementation of the ScModel module of Stereoscope [Andersson20]: https://github.com/almaan/stereoscope/blob/master/stsc/models.py.

Parameters
n_genes : intint

Number of input genes

n_labels : intint

Number of input cell types

**model_kwargs

Additional kwargs

Attributes

Methods

generative(x, y)

Simply build the negative binomial parameters for every cell in the minibatch.

get_params()

Returns the parameters for feeding into the spatial data.

inference()

Run the inference (recognition) model.

loss(tensors, inference_outputs, …[, …])

Compute the loss for a minibatch of data.

sample(tensors[, n_samples, library_size])

Generate samples from the learned model.