Question: Why are muscle tissue structures not segmented by the Xenium Multimodal Cell Segmentation?
Answer: The MCS models do not segment cell types with a diameter larger than 100 µm.
Multinucleated cells and muscle fibers in particular are challenging to segment. The MCS boundary stain does provide some useful signal in some cases and some multinucleated cells are captured accurately, but some are not, due to the cellular complexity and fused structures. A clear boundary stain enables defining multinucleated cells up to a limited size. For muscle the stains do define structures of interest and segmentation performance can be good depending on sectioning direction, e.g. in heart. Rounded structures in a cross section segment better compared to longitudinal structures.
This article covers one context out of the multiple presented in Rescue Xenium transcripts outside cells. The article presents learnings from Xenium muscle samples that may extend to other tissue types.
For skeletal muscle, researchers have expressed interest in defining larger fused cell structures that the MCS stains do define but the current pipeline does not segment. Our developers are actively looking into a solution to this. In the meanwhile, we suggest using third party tools like cellpose to define the large structures using stain images that XA makes available. Testing of cellpose with large muscle structure stains showed decent capture of both cross sections and medium length longitudinal structures.
Cellpose is an established software with tunable thresholds, e.g. you can define the 'cell' diameter. Its results are also already compatible with xeniumranger import-segmentation, which allows you to apply the external software segmentation result to the Xenium transcripts to create a cell x feature counts matrix and Xenium Explorer compatible results. The Analysis Guides article Segment large stained cells with Cellpose3 provides illustrative Python code to quickly parameterize and segment cells or structures with clear staining.
In addition, cellpose offers a website at https://www.cellpose.org/ to test performance on a low resolution image, e.g. a screenshot of the boundary or interior stain. The next step would be to install cellpose so you can run it locally or on a server, where you store your images. Some helpful resource links:
- Cellpose documentation https://www.cellpose.org/docs
- Cellpose github http://www.github.com/mouseland/cellpose
- Cellpose3 offers a graphical application for desktops. Documentation is at https://cellpose.readthedocs.io/en/latest/gui.html.
The multimodal cell segmentation focus images are 2D, so there is no need to use cellpose's 3D feature. Set the 'average cell diameter' appropriately for the structures of interest, or try out cellpose’s automatic estimation feature. Cellpose interprets the diameter in pixels. Multiple different settings may be needed to capture a wider range of structures.
For researchers without multimodal cell segmentation staining, or with muscle types whose structures are not defined by the stains, capture additional transcripts by increasing the nuclear expansion distance.
The import-segmentation
command uses the nuclei segmentation defined previously and expands the nuclei to the µm defined by --expansion-distance
to define cells.
xeniumranger-xenium2.0/xeniumranger \
import-segmentation \
--id updatedresults \
--xenium-bundle xeniumbundle \
--nuclei xeniumbundle/cells.zarr.zip \
--expansion-distance 100 \ #maximum
--localcores 32 \
--localmem 128
Product: Xenium In Situ Gene Expression
Last modified: October 30, 2024