scverse / scverse/spatialdata

Refactoring query functions

Open
#225 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
394
Forks
95
Avg merge
4d 3h
Merged PRs (30d)
7

Description

There are multiple ways (some still to be implemented) to subset/query a SpatialData object. Some of these methods are living outside this repo. We need to port them here and use a more consistent syntax (for instance always sdata.query.query_method).

  • spatial query (bounding box query): sdata.query.bounding_box()
  • spatial query (general polygon): not implemented yet
  • query by obs: implemented in napari-spatialdata, branch spatialdata
  • query by var: not implemented yet
  • query by coordinate system: sdata.filter_by_coordinate_system()
  • query by (a list of) element names: implemented in spatialdata-plot

FYI @giovp @timtreis

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

Start by reviewing the existing SpatialData query entry points, especially sdata.query.bounding_box() and sdata.filter_by_coordinate_system(), then compare the implementations mentioned in napari-spatialdata and spatialdata-plot. Done means the query operations have a consistent sdata.query.query_method syntax, including decisions for the currently unimplemented polygon and var queries.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.