scverse / scverse/spatialdata

Faster version `aggregate()` method available

Open
#744 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

method: aggregation 🔢 needs: triage performance 🚀 priority: high
Dominant language
Python
Stars
394
Forks
95
Avg merge
4d 3h
Merged PRs (30d)
7

Description

While extending SOPA for Visium HD data, @quentinblampey encountered a performance bottleneck with aggregate() that he could improve using pure geopandas code. Since we use geopandas internally, this could be a bug of spatialdata that may be easy to fix.

Here is the SOPA code https://github.com/gustaveroussy/sopa/blob/master/sopa/segmentation/aggregation.py#L485.

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 with the referenced SOPA implementation in sopa/segmentation/aggregation.py around line 485 and compare its aggregate() approach with spatialdata's implementation. Confirm that the faster approach preserves aggregate() results and measure an improvement on the Visium HD workload described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data, performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.