scvi.external.stereoscope.SpatialDeconv#
- class scvi.external.stereoscope.SpatialDeconv(n_spots, sc_params, prior_weight='n_obs')[source]#
Bases:
BaseModuleClassModel of single-cell RNA-sequencing data for deconvolution of spatial transcriptomics.
Reimplementation of the STModel module of Stereoscope [Andersson et al., 2020]: almaan/stereoscope.
- Parameters:
- n_spots
int Number of input spots
- sc_params
tuple[ndarray] Tuple of ndarray of shapes [(n_genes, n_labels), (n_genes)] containing the dictionary and log dispersion parameters
- prior_weight
Literal['n_obs','minibatch'] (default:'n_obs') Whether to sample the minibatch by the number of total observations or the minibatch size
- n_spots
Attributes table#
Methods table#
|
Build the deconvolution model for every cell in the minibatch. |
Returns cell-type-specific gene expression at the queried spots. |
|
|
Returns the loadings. |
Inference. |
|
|
Loss computation. |
|
Sample from the model. |
Attributes#
Methods#
- SpatialDeconv.generative(x, ind_x)[source]#
Build the deconvolution model for every cell in the minibatch.
- SpatialDeconv.get_ct_specific_expression(y)[source]#
Returns cell-type-specific gene expression at the queried spots.
- Parameters:
- y
cell types