Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xeniumranger import-segmentation producing different cell polygons (less than 4 vertices polygons) #153

Open
ConstensouxAlexis opened this issue Jan 17, 2025 · 1 comment

Comments

@ConstensouxAlexis
Copy link

Hello,
I ran Baysor v0.7, and tried to import the segmentation results with xeniumranger 3.1 import-segmentation. I followed the steps explained in 10x website, and made sure the files format (geojson GeometryCollection) was correct. Each cell in the polygons.geojson have more than 4 vertices.
However, few cells have a different polygon shape after running xeniumranger import segmentation. Some cells end up having less than 4 vertices, which cause the python reader of the package I am using (spatialdata) to fail, because polygons needs to have at least 4 vertices. I am wondering if you know what could be the origin of this, maybe an issue the polygons.geojson file or in the segmentation.csv ?

Thank you very much !

@LoganAMorrison
Copy link

LoganAMorrison commented Jan 21, 2025

@ConstensouxAlexis 10x xeniumranger dev here:

That is very curious. Is it possible for you to provide one of the problematic polygons? (e.g., one that had more than 4 vertices and which had less than 4 vertices in the outputs.)

One scenario that comes to mind where this could happen is if the polygon is actually 2D. For example, something like:

{
  "geometries":[
    {
       "coordinates":[
         [
           [1.0, 1.0],
           [2.0, 2.0],
           [1.0, 1.0],
           [1.0, 1.0]
         ]
       ],
       "type":"Polygon",
       "cell":1
    },
    {
       "coordinates":[
         [
           [1.0, 1.0],
           [2.0, 2.0],
           [3.0, 3.0],
           [1.0, 1.0]
         ]
       ],
       "type":"Polygon",
       "cell":2
    }
  ],
  "type":"GeometryCollection"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants