JEFworks-Lab / STdeconvolve

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

Adding deconvolved cell types to Seurat `meta.data` #49

Closed shaniAmare closed 2 months ago

shaniAmare commented 5 months ago

Hi @bmill3r ,

Thank you for this amazing tool!

I have run the workflow you have suggested and seems like the topics are closely related to the clusters identified by the Seurat workflow (at least for my Visium data). To double check this, it would be great if I can add a new column to the the meta.data of my Seurat object with the topic that each cell barcode belongs to, or better yet, both the topic and the final cell type annotation for that topic (including NAs) as two new columns to the seurat_object@meta.data.

Is there a wrapper somewhere that I missed to get this information summarises from the theta or beta matrices?

Many thanks, Shani.

bmill3r commented 4 months ago

Hi Shani,

Thanks so much for using STdeconvolve and so sorry for the delayed response! We do not have wrappers to do the specific task you are asking for. Also note that the theta matrix contains (in the case of a Visium dataset) predicted cell type proportions within each barcode/capture location. These are multiple features and not a single label. But you could either append to the meta.data the cell type with the greatest proportion to each barcode, or you could append all or a subset of the cell types as new columns to the meta.data.

Hope this helps, Brendan