You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Render the per-cell Embedding Annotation Transfer (EAT) predictions that the backend now writes into .parquetbundle files as a new value-level "predicted-by-transfer" layer in the web app — distinct from, and orthogonal to, PR #272's column-level ⚡ "predicted-by-model" badge.
Axis B (new, this issue): cell-level — "this specific protein's value in column COL was transferred from a neighbour, with confidence X and source Y."
Never overload the ⚡ badge to mean both.
What the backend now emits
For each transferred column COL, protspace transfer appends three columns to the bundle's annotations table (the curated COL is left untouched; protein_id id column preserved → backward compatible):
Column
Type
Meaning
COL__pred_value
string
the transferred label
COL__pred_confidence
float32
reliability index in [0, 1]
COL__pred_source
string
nearest reference protein id
A cell is predicted for COL when COL is empty/blank but COL__pred_value is non-null.
UX (from design spec §9)
Scatter — primary cue is shape, not colour: predicted cells render as hollow (outline-only) markers in the same category hue; observed cells stay filled. Confidence → opacity ramp (alpha = lerp(0.25, 0.9, confidence)), optionally size; desaturate toward grey below ~0.3. Never colour-only (accessibility).
Tooltip — provenance line, e.g. ⚡ Predicted: Neurotoxin (82%) — transferred from P12345 via ProtT5, k=1, with an inline confidence bar and the source id as a click-to-select target.
Legend — a separate "Predicted (transferred)" sub-section (filled "Observed" / hollow "Predicted by EAT" swatches + live counts). Do not merge into the ⚡ header badge.
Global control — "Show predicted annotations" toggle + confidence-threshold slider (High >80 / Med 50–80 / Low <50); below-threshold cells fade rather than vanish; persist in legend settings.
Concrete hooks
packages/utils/src/types.ts — add optional annotation_predicted (parallel to annotation_scores / annotation_evidence).
packages/core/src/components/data-loader/utils/bundle.ts — detect *__pred_* columns, pivot into the data model (old bundles lack them → no overlay).
Caveat to surface in UI/docs: the reliability index is ProtT5-calibrated; it is monotone-but-uncalibrated for other embedders — present as a ranking, not a probability.
Acceptance criteria
Bundle parser surfaces predicted value / confidence / source per cell.
Summary
Render the per-cell Embedding Annotation Transfer (EAT) predictions that the backend now writes into
.parquetbundlefiles as a new value-level "predicted-by-transfer" layer in the web app — distinct from, and orthogonal to, PR #272's column-level ⚡ "predicted-by-model" badge.This is the frontend follow-up to the backend work in tsenoner/protspace#55 (concept: tsenoner/protspace#54).
Background — the two orthogonal axes
COLwas transferred from a neighbour, with confidence X and source Y."Never overload the ⚡ badge to mean both.
What the backend now emits
For each transferred column
COL,protspace transferappends three columns to the bundle's annotations table (the curatedCOLis left untouched;protein_idid column preserved → backward compatible):COL__pred_valueCOL__pred_confidenceCOL__pred_sourceA cell is predicted for
COLwhenCOLis empty/blank butCOL__pred_valueis non-null.UX (from design spec §9)
alpha = lerp(0.25, 0.9, confidence)), optionally size; desaturate toward grey below ~0.3. Never colour-only (accessibility).⚡ Predicted: Neurotoxin (82%) — transferred from P12345 via ProtT5, k=1, with an inline confidence bar and the source id as a click-to-select target.Concrete hooks
packages/utils/src/types.ts— add optionalannotation_predicted(parallel toannotation_scores/annotation_evidence).packages/core/src/components/data-loader/utils/bundle.ts— detect*__pred_*columns, pivot into the data model (old bundles lack them → no overlay).packages/core/src/components/scatter-plot/style-getters.ts—getOpacity/getPointShapebranch on predicted cell + confidence.packages/core/src/components/scatter-plot/webgl-renderer.ts—a_predictedattribute + hollow/ring render (reuse the edge-distance math,strokeWidth = 0.15).packages/core/src/components/scatter-plot/protein-tooltip.ts— provenance line + clickable source.packages/core/src/components/legend/legend-renderer.ts— "Predicted (transferred)" sub-section.Process
annotation-metadata/annotation-presentationcapabilities.Acceptance criteria
References
docs/superpowers/specs/2026-06-11-eat-annotation-transfer-design.mdin tsenoner/protspace