gustaveroussy / sopa

Technology-invariant pipeline for spatial omics analysis (Xenium / MERSCOPE / CosMx / PhenoCycler / MACSima / Hyperion) that scales to millions of cells
https://gustaveroussy.github.io/sopa/
BSD 3-Clause "New" or "Revised" License
94 stars 8 forks source link

[Feature] Cellpose - artificially define an area of cytoplasm #59

Open mariavigovaldoleiros opened 2 months ago

mariavigovaldoleiros commented 2 months ago

Feature request / question In the absence of a general membrane marker, Sopa/cellpose (using only DAPI) will not "expand" the detected nuclei to generate an artificial cell membrane/cytoplasm area. In QuPath, cellpose is available as an extension and the code has the possibility to artificially expand the nuclei: image

Would it be possible to pass this parameter to cellpose within Sopa? Perhaps in the config image

Output example: Sopa (Cell = Nuclei) image

QuPath (Cell > Nuclei) image

quentinblampey commented 2 months ago

Hello @mariavigovaldoleiros,

Actually, we can use cell radius expansion, but only to compute the channel intensity for each cell (see the expand_radius_ratio parameter here). Yet, indeed, we don't display it in the Xenium Explorer.

Do you need cell expansion only to compute the intensity of membrane channels, or do you also want to visualize it on the Explorer? If you need it in the Explorer, I'll implement it too: it should be pretty easy since the Xenium Explorer support both "Cell" and "Nucleus" boundaries.