The following output files from Xenium Onboard Analysis (XOA) are required as inputs for Xenium Ranger:
transcripts.zarr.ziportranscripts.zarrcells.zarr.ziporcells.zarrmorphology.ome.tifmorphology_mip.ome.tifmorphology_focus.ome.tifexperiment.xeniummetrics_summary.csvanalysis_summary.htmlgene_panel.json(only required for XOA v1.0 - 1.4)
These files should be located in one directory, which will be specified by the --xenium-bundle argument. For descriptions of these files, see the Xenium Onboard Analysis documentation.
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 (
FeatureCollectiontype) - Baysor output CSV and GeoJSON file formats
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. Features should be continuous with no holes and have geometry of type Polygon (i.e., no type MultiPolygon). 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
objectTypeshould becell, as features with a non-cellobjectTypewill be ignored (i.e.,annotations). - The
--nucleiargument will use thenucleusGeometrypolygon if it exists in the GeoJSON, otherwise it will use thegeometrypolygon. The--cellsargument will use thegeometrypolygon. - QuPath exports nucleus and cell segmentation results in one file, so the same GeoJSON file should be specified for both
--cellsand--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 eachgeometryis of typePolygon. - The
Polygonshould contain an extra field calledcellto 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"
}