Add Cell Annotation plugin scaffolding, storage manifest, and provider wiring#68
Merged
Merged
Conversation
Co-authored-by: yulewu <38241047+yulewu@users.noreply.github.com>
Co-authored-by: yulewu <38241047+yulewu@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add Cell Annotation plugin for checkpoint management
Add Cell Annotation plugin scaffolding, storage manifest, and provider wiring
Mar 17, 2026
yulewu
approved these changes
Mar 17, 2026
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.
This starts the Cell Annotation workflow by adding the owning plugin scaffold, per-dataset
.UELerstorage, manifest primitives, and Heatmap/FlowSOM integration points behind a feature flag. It establishes the storage and interface layer needed for later checkpoint save/load/diff/merge work while preserving current behavior when disabled.Cell Annotation plugin bootstrap
CellAnnotationPluginregistered fromImageMaskVieweronly whenENABLE_CELL_ANNOTATIONis enabledPluginBaseUI pluginsPer-dataset storage under
.UELerDatasetStoreto resolve:.UELer/dataset_<id>/checkpoints.UELer/dataset_<id>/thumbnails.UELer/dataset_<id>/selectionsManifest and selection scaffolding
Manifestwrapper aroundmanifest.jsonSelectionSpecimplementation with:Cross-plugin contracts
HeatmapStateProvider,FlowsomParamsProvider, andSelectionSpecprotocols inueler.viewer.interfacesviewer.*andueler.viewer.*namespaces resolve cleanlyHeatmap / FlowSOM registration hooks
Targeted CI for the new plugin
Example of the new plugin activation path:
This PR is intentionally limited to the scaffolding layer: plugin lifecycle, storage layout, compatibility shims, and provider contracts. Browser UI, artifact serialization, checkpoint restore, merge/recluster flows, and subset-only enforcement remain follow-on work on top of this foundation.
Original prompt
This section details on the original issue you should resolve
<issue_title>Epic: Cell Annotation Workflow (checkpoints, merge, flexible markers)</issue_title>
<issue_description>Goal: Ship a dedicated Cell Annotation plugin that orchestrates Heatmap + FlowSOM to save/load/diff/merge checkpoints under
.UELer/…, enforce subset-only downstream semantics (with merge as the only union exception), and support flexible marker sets (training vs display-extra, plus opt-in expanded training with imputation/projection).Plan & scope
Cell Annotation(new) — checkpoint lifecycle, DAG browser, selection semantics, storage under.UELer.Reference doc: Attach the Markdown plan file (
cell-annotation-workflow-plan.md) to this issue or link it here.Milestones
Definition of Done (Epic)
Top-level checklist (convert each to sub-issue)
0) Project setup & guardrails
feature/cell-annotation-workflowENABLE_CELL_ANNOTATION=true(env/config)1) Core plugin & storage scaffolding
plugins/cell_annotation/(plugin.py,store.py,manifest.py,selection_spec.py)MainViewerlifecycle; create.UELer/dataset_<id>/{checkpoints,thumbnails,selections}2) Cross-plugin interfaces
viewer/interfaces.py:SelectionSpec,HeatmapStateProvider,FlowsomParamsProvider3) Serializer, schema & validator
serialize_heatmap_state(display, flowsom, meta) -> AnnDataXfloat32;layers["median"];uns: artifact/ui/palettes/zscore/filters/linkagestraining,display_extra,available,linkage,expanded_trainingid(UUIDv7),parents,op,created_at,producer.h5ad+ checksums; validator4) Manifest & thumbnails
manifest.jsonupdate & rebuild (ignore*.partial)5) Checkpoint Browser UI
6) Heatmap upgrades
export_heatmap_state&import_heatmap_state(include marker roles/availability/missing_rate, linkages, zscore, palettes)marker_sets.linkage7) FlowSOM upgrades
run_flowsom(selection, params, training_markers, extra_markers, imputation, projection)8) Marker Manager (in Cell Annotation)
9) Merge workflow
uns["selection"]handle (Parquet)10) Subset-only invariants
11) Save/Load wiring
12) Testing & QA
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.