scvi.external.SpatialStereoscope.from_rna_model

classmethod SpatialStereoscope.from_rna_model(st_adata, sc_model, prior_weight='n_obs', **model_kwargs)[source]

Alternate constructor for exploiting a pre-trained model on RNA-seq data.

Parameters
st_adata : AnnDataAnnData

registed anndata object

sc_model : RNAStereoscopeRNAStereoscope

trained RNADeconv model

prior_weight : {‘n_obs’, ‘minibatch’}Literal[‘n_obs’, ‘minibatch’] (default: 'n_obs')

how to reweight the minibatches for stochastic optimization. “n_obs” is the valid procedure, “minibatch” is the procedure implemented in Stereoscope.

**model_kwargs

Keyword args for SpatialDeconv