Skip to content

[main] Feature/spatialdata support#53

Open
Tobiaspk wants to merge 4 commits into
mainfrom
feature/spatialdata-support
Open

[main] Feature/spatialdata support#53
Tobiaspk wants to merge 4 commits into
mainfrom
feature/spatialdata-support

Conversation

@Tobiaspk
Copy link
Copy Markdown
Collaborator

@Tobiaspk Tobiaspk commented May 27, 2026

Support Spatialdata writer. Adapted from #37 @enric-bazz

Introduces two new CLI parameters:

  • --save-spatialdata boolean
  • --boundary-method one of {input, convex_hull, skip}

Changes to the original PR:

  • Removed support for delauney. This would add 500+ lines of source code. Please share if there is an argument to keep it.
  • Don't include 3D support, Spatialdata readers, optional_deps.py (now inline), other heavy edits to data_module, preprocessor etc. Only includes functions to write a Spatialdata.

TODOs:

  • Reuse outputs from write_anndata. This reduces duplicate code. Also, the current implementation forgets to filter by segger_similarity threshold. See [integration/peerlab] Bugfix/writing anndata #43 .
  • Recommend to rename boundary_method to spatialdata_boundary_method to make it clear that this relates to the spatialdata output, not to cell expansion or anything!
  • SpatialData installation instruction are not yet resolving other packages appropriately.

enric-bazz and others added 4 commits May 27, 2026 16:50
Trimmed copy of the spatialdata writer introduced in PR #37
(commits e4e8846 + c26dd83 + bdec108 by @enric-bazz). Strips the
delaunay boundary path and unused convenience helpers; inlines
require_spatialdata to avoid the optional_deps refactor.

Original-author: enric-bazz <enrico.bazzacco02@outlook.it>
Adds --save-spatialdata and --boundary-method CLI flags (under the
existing I/O group) and threads them through ISTSegmentationWriter
to emit a SpatialData zarr store next to the AnnData output. Adds
the 'spatialdata' optional dependency. Integration shape taken
from PR #37 commit f99b3fb by @enric-bazz, narrowed to the output
path only (no loader, no 3D, no QV filter, no logging refactor).

Original-author: enric-bazz <enrico.bazzacco02@outlook.it>
@Tobiaspk Tobiaspk assigned Tobiaspk and unassigned Tobiaspk May 27, 2026
@Tobiaspk Tobiaspk changed the title Feature/spatialdata support [main] Feature/spatialdata support May 27, 2026
@Tobiaspk
Copy link
Copy Markdown
Collaborator Author

I'm unable to install spatialdata into the same environment. Anyhow, it appears that the spatialdata construction takes a long time, even for a small dataset. Might need more robust installation instructions and profiling still.

@Tobiaspk
Copy link
Copy Markdown
Collaborator Author

Just noticed that anndata creation uses .fill_null(-1) for missing celltypes, which is not true across platforms

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

Successfully merging this pull request may close these issues.

2 participants