kharchenkolab / Baysor

Bayesian Segmentation of Spatial Transcriptomics Data
MIT License
142 stars 29 forks source link

How to deal with unassigned transcripts from prior segmentation #81

Closed jwrth closed 1 year ago

jwrth commented 1 year ago

Dear all,

Thanks for developing this great tool! I'm trying to apply it to Xenium data and use the standard Xenium segmentation as prior segmentation. The Xenium segmentation gives a dataframe with a cell_id column which includes also the label "UNASSIGNED". Since Baysor only allows integers as cell_id I'm wondering how to deal with this. Should I substitue UNASSIGNED with NaNs or what's the correct procedure for this?

Thanks a lot in advance for your help!

jwrth commented 1 year ago

Ok I found the solution. Unassigned transcripts get the cell id 0 as in segmentation masks. Makes sense :)