The following output files from Xenium Onboard Analysis (XOA) are required as inputs for Xenium Ranger:
transcripts.zarr.zip
ortranscripts.zarr
cells.zarr.zip
orcells.zarr
morphology.ome.tif
morphology_mip.ome.tif
(required for XOA v1.0 - 1.9 datasets)- 2D autofocus image(s):
morphology_focus.ome.tif
(required for XOA v1.0 - 1.9 datasets)morphology_focus/
directory (required for XOA v2.0 and later datasets)
experiment.xenium
metrics_summary.csv
analysis_summary.html
gene_panel.json
(required for XOA v1.0 - 1.4 datasets)
For descriptions of these files, see the Xenium Onboard Analysis documentation. Xenium Ranger expects these files in one directory, which is specified by the --xenium-bundle
argument, for a XOA v2.0 dataset with Cell Segmentation Staining:
└── outs
├── analysis_summary.html
├── cells.zarr.zip
├── experiment.xenium
├── gene_panel.json
├── metrics_summary.csv
├── morphology.ome.tif
├── morphology_focus
│ ├── morphology_focus_0000.ome.tif
│ ├── morphology_focus_0001.ome.tif
│ ├── morphology_focus_0002.ome.tif
│ └── morphology_focus_0003.ome.tif
└── transcripts.zarr.zip
The following file formats are compatible for use with the import-segmentation
pipeline:
- Labeled mask in TIFF (32-bit) or NumPy NPY format
- Polygons in GeoJSON format (
FeatureCollection
type) - Baysor output CSV and GeoJSON file formats
- Xenium Onboard Analysis
cells.zarr.zip
file: the nucleus masks are used as input if--nuclei=cells.zarr.zip
and the cell masks are used as input if--cells=cells.zarr.zip
.
This pipeline has been tested using segmentation files generated by Cellpose v2.2.2, QuPath v0.4, and Baysor v0.6.
The polygon GeoJSON should be exported as a FeatureCollection
. The cells and nuclei can be saved in the same or separate GeoJSON files. The format should look similar to this example:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"id": "12059192-3b27-4438-96dc-97b41ca84717",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[3418.94, 2],
[3414.62, 3.85],
[3414.12, 22.65],
[3415.06, 27.26],
[3420.1, 35.15],
[3428.03, 40.22],
[3437.01, 42.94],
[3440.69, 45.87],
[3445.32, 46.71],
[3468.85, 46.71],
[3477.88, 44.35],
[3534.35, 44.31],
[3546.79, 37.83],
[3552.28, 30.11],
[3552.94, 25.45],
[3552.93, 6.63],
[3550.68, 2.49],
[3546, 2],
[3418.94, 2]
]
]
}
}
]
}
Segmentation results from QuPath are compatible with Xenium Ranger and have these specifications:
- The feature
objectType
should becell
, as features with a non-cellobjectType
will be ignored (i.e.,annotations
). - The
--nuclei
argument will use thenucleusGeometry
polygon if it exists in the GeoJSON, otherwise it will use thegeometry
polygon. The--cells
argument will use thegeometry
polygon. - QuPath exports nucleus and cell segmentation results in one file, so the same GeoJSON file should be specified for both
--cells
and--nuclei
. The format should look similar to this example:
{
"type":"FeatureCollection",
"features": [
{
"type":"Feature",
"id":"fd0c3d4e-6146-427d-9696-97fbe7adb63d",
"geometry":{
"type":"Polygon",
"coordinates":[
[
[4348.52, 0],
[4344.02, 1.37],
[4341.18, 10.23],
[4341.8, 24.31],
[4346.73, 32.28],
[4353.27, 38.99],
[4361.18, 44],
[4379.94, 44.48],
[4388.64, 40.97],
[4396.11, 35.26],
[4404.71, 21.36],
[4404.27, 2.55],
[4400.29, 0.06],
[4348.52, 0]
]
]
},
"nucleusGeometry":{
"type":"Polygon",
"coordinates":[
[
[4373.91, 4.81],
[4366.61, 9.07],
[4364.28, 12.61],
[4364.3, 16.85],
[4370.37, 22.75],
[4378.35, 20.24],
[4382.75, 13.06],
[4380.87, 9.26],
[4373.91, 4.81]
]
]
},
"properties":{
"objectType":"cell"
}
}
]
}
Segmentation results from Baysor are compatible with Xenium Ranger and have these specifications:
- Baysor segmentation GeoJSON should be of type
GeometryCollection
, where eachgeometry
is of typePolygon
. - The
Polygon
should contain an extra field calledcell
to identify which cell the polygon corresponds to.
Here is an example of the format:
{
"geometries": [
{
"coordinates": [
[
[15.891722, 21.441122],
[13.95383, 21.565407],
[14.233208, 25.427168],
[15.927658, 26.113512],
[17.464699, 25.211208],
[16.642977, 22.83285],
[15.891722, 21.441122]
]
],
"type": "Polygon",
"cell": 5
}
],
"type": "GeometryCollection"
}