dcjones / proseg

Probabilistic cell segmentation for in situ spatial transcriptomics
Other
45 stars 3 forks source link

Meaning of volume in cell-metadata output #19

Closed wuwenrui555 closed 4 months ago

wuwenrui555 commented 5 months ago

Hi, thanks your powerful Proseg tool!

I am usinng Proseg with CosMx data. I have some questions about the meaning of "volume" in the Proseg output cell-metadata.csv:

  1. Dose the volume of each cell represent sum of number of all voxels from all layers?
  2. According to issue #9, I know that "The voxel size on the z-axis is just the z-span of the data divided by the number of voxel layers.". If I set --voxel-layers 4 (as default) and use --cosmx-micron after scaling the FOV-level data with sample thickness of 5um, is the size of each voxel 1um 1um 1.25um?

With the actual size of each voxel, I could calculate the actual volume of each cells (*volume in cell-metadata.csv 1um 1um 1.25um**), which makes it possible to filter out some non-cells with extreme small cell size based on biological background. I think this may be better than filter out cells with extreme low volume statistically (e.g., the lowest and highest 1%).

dcjones commented 4 months ago

Hi, thanks for using proseg!

Proseg assumes x/y coords are in micrometers, but doesnt make any assumptions about the z coordinate, which leaves the volume units not well defined.

Your inference based on sample thickness is probably roughly correct, but it's hard for me to say for sure. Sometimes transcripts (or noise) can be outside cells and be effectively on the glass causing the span of the z coordinate to exceed the sample thickness.

wuwenrui555 commented 4 months ago

Thanks for your kind reply, which is very helpful for my research!