JEFworks-Lab / STdeconvolve

Reference-free cell-type deconvolution of multi-cellular spatially resolved transcriptomics data
http://jef.works/STdeconvolve/
110 stars 13 forks source link

fitLDA plot question #64

Closed jyoo19 closed 2 weeks ago

jyoo19 commented 2 weeks ago

Hello,

We are applying STdeconvolve to Visium datasets, and for some of the samples, the fitLDA returns plots with increasing perplexity. It works fine for other samples. Could this be due to sample quality? Please find the attached image for your reference.

fitLDA plot

Thank you in advance!

Best, Jin

JEFworks commented 2 weeks ago

Dear Jin,

Thanks for sharing the helpful image. It looks like the LDA model has not converged for any of these Ks, resulting in a shaded background in your plot (where the alpha > 1). A tutorial elaborating on similar results can be found here: https://jef.works/STdeconvolve/failure_examples.html

This can mean that the data quality is low. But it could also mean that there is not enough spatial variability among the evaluated genes and their underlying cell types. For example, if all underlying cell types are in roughly the same proportions across all spots, that could also cause the model to not converge. Some times the default gene filtering is too stringent and removes too many relevant features that could help the model converge; I would recommend potentially increasing the corpus size to include more genes by using a less stringent alpha in restrictCorpus to see if that changes anything. If the model still fails to converge, it is likely that the data is not amenable to such unsupervised reference-free deconvolution and you may need to use a supervised reference-based approach instead.

Hope that helps, Jean

jyoo19 commented 2 weeks ago

Dear Jean,

Thank you for your detailed response. I really appreciate it!

Best, Jin