Hi,
I’m trying to understand the correct method for running ResolVI on Visium HD data that has been segmented using proseg as opposed to 8μM bins used in the reproducibility jupyter notebooks.
I’m currently following the tutorial which creates the generated expression as follows:
samples_corr = resolvi.sample_posterior(
model = resolvi.module.model_corrected,
return_sites = [‘px_rate’],
summary_fun = {‘post_sample_q50’: np.median},
num_samples = 3,
summary_frequency = 30,
)
samples_corr = pd.DataFrame(samples_corr).T
samples = resolvi.sample_posterior(
model = resolvi.module.model_residuals,
return_sites = [‘mixture_proportions’],
summary_fun = {‘post_sample_means’: np.mean},
num_samples = 3,
summary_frequency = 100,
)
samples = pd.DataFrame(samples).T
adata.layers[“generated_expression”] = samples_corr.loc[“post_sample_q50”, “px_rate”]
Is this the appropriate approach to take for cell segmented Visium HD data? Does this produce a ‘dense estimate of gene expression’ as opposed to counts that are corrected per cell? Also are the generated expression counts able to used with scran for normalization, and downstream spatial clustering approaches?