Document the segmentation pipeline - #10
Merged
Merged
Conversation
Add a tutorial notebook that carries an OME-TIFF through InstanSeg nucleus segmentation to a SpatialData zarr, and register it in the docs. Name the zarr store for the slide's stem (`slide.ome.tif` -> `slide.zarr`) instead of the full filename, via a new `slide_stem` helper. Untrack the SLURM scripts; they are cluster-specific scratch.
Documentation build overview
12 files changed ·
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10 +/- ##
==========================================
+ Coverage 65.62% 65.90% +0.28%
==========================================
Files 13 13
Lines 1338 1349 +11
==========================================
+ Hits 878 889 +11
Misses 460 460
🚀 New features to boost your workflow:
|
Add the segmentation steps to Getting started and both optional extras to Installation. Restore the trailing newline in .gitignore, which end-of-file-fixer rejected in CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation and tutorial update for the segmentation pipeline added in #9, which shipped without docs.
Tutorial
docs/notebooks/segment_nuclei.ipynbpicks up whereconvert_to_ometiff.ipynbleaves off: it takes an OME-TIFF throughsegment_wsiandgeojson_to_spatialdatato a written SpatialData zarr, then reads the store back and plots the nuclei over the H&E.Executed end-to-end on a kidney H&E (867 MB, 1239 tiles, 83,554 nuclei), so the committed outputs are real.
Registered in
tutorials.md,index.md,api.md(new Segmenting section) andinstallation.md(thesegmentationextra).convert_to_ometiff.ipynbnow links forward to it.Zarr store naming
The store is now named for the slide's stem rather than its full filename:
Path.stemalone does not do this (slide.ome.tif→slide.ome), so this adds aslide_stemhelper incore/utils.pyand adefault_zarr_pathinsegmentation/to_spatialdata.py. The.zarr.zipsibling and the skip-existing check follow automatically.Stores written under the old convention are no longer recognised by the skip-existing check, so a re-run would rebuild them. A rename snippet is in the
geojson_to_spatialdata.pymodule docstring.Also
The SLURM scripts are untracked — they are cluster-specific scratch, not part of the package surface.
Checks
pytest— 100 passedsphinx-build -W— build succeededruff check/ruff format --check— clean