proseg icon indicating copy to clipboard operation
proseg copied to clipboard

Xenium: Proseg segmenting huge cells.

Open jpsgill-allen opened this issue 9 months ago • 4 comments

Hi,

Thank you for your time and effort for building proseg. I am facing issues with proseg segmenting some huge cells for my xenium data. Also, does the volume parameter in the cell-metadata file corresponds to cell area (with --voxel-layers 1)? If so, there are discrepancies in the volume calculated by proseg and what is shown on xenium explorer. My take is that the xenium explorer area calculation seems to be correct.

Image Image

jpsgill-allen avatar Mar 17 '25 21:03 jpsgill-allen

That's interesting. It looks to me like the initial nuclear segmentation missed some cells here and proseg is trying to compensate by making one huge cell. Currently proseg doesn't have a way to introduce new cells that weren't identified in the initial segmentation. An easy thing I could do is add a upper bound parameter or cell area, which may help avoid this.

As for the volume that proseg reports, it should be roughly proportional to squared micrometers, but it's also multiplied by the z-dimension which tends to be less well defined that the x/y coordinates. It would probably be a good idea to report area as well volume.

dcjones avatar Mar 17 '25 21:03 dcjones

Great, thanks. Sorry, I forgot to mention, I tried to set the --voxel-layers 1 to check for cell area but it still seems to use the z-dimension to get the volume. Also, I have attached the original xenium segmentation for reference. It looks like it is using the segmented nuclei from a small cell and expanding it a lot more than it should. Adding something like a scale (approximate cell radius) and scale-std similar to baysor would help to avoid this.

Image

jpsgill-allen avatar Mar 17 '25 22:03 jpsgill-allen

Hi,

Thanks for building such a nice tool.

Proseg newbie here. I think I also encountered this huge cell issue, thus I am posting here.

These cells look way more artificial in my case, which mostly appears when there is a transition of cell density in the tissue, e.g., from a dense cell region to a sparse area.

Proseg with Xenium Mask as cellpose mask (maybe it was a bad idea to include the cell seg mask in the first place):

Image

Xenium Mask:

Image

I am kind of curious about what these weird lines are.

ynanli avatar Aug 14 '25 09:08 ynanli

In this case, it seems like a glitch drawing the polygons. Because proseg is voxel based, it can't produce diagonal lines like this, so there's either an error in it's output or an error in how xenium explorer is drawing them. I'll try to reproduce this and figure out which one it is.

dcjones avatar Aug 14 '25 15:08 dcjones