scverse / scverse/spatialdata-io

Add Xenium Explorer GeoJSON import

Open
#385 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
103
Forks
65
Avg merge
1h 8m
Merged PRs (30d)
3

Description

Problem
Xenium Explorer can export selections as CSV of coordinates or GeoJSON. If the selection area is large, it will refuse to export CSV. CSV is also less compatible with packages like GeoPandas.

Proposed solution
I'd like a spatialdata_io loader similar to spatialdata_io.xenium_explorer_selection. Ideally, I would like it to be able to parse the polygon(s) and store them in the shapes and the cells within the selection in the table. If there are multiple named polygons in the GeoJSON, I would like the names/colours to be preserved. This is biologically very useful, for example in a scenario where multiple tissue sections have been profiles as part of one Xenium 'area'/one output file.

Alternatives
spatialdata_io.xenium_explorer_selection and using CSV of the polygon is the alternative.

I've written a helper script to do this for the dataset I'm working on, perhaps it could be made into a PR with a new function with a little help @LucaMarconato 😊

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The existing entry point is spatialdata_io.xenium_explorer_selection; start there and compare it with the helper script mentioned in the issue. Done means a GeoJSON loader parses named polygons into shapes, preserves names and colours, and associates selected cells in the table.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
bioinformatics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.