-
Notifications
You must be signed in to change notification settings - Fork 0
Tab Annot Distance
srao edited this page Aug 17, 2026
·
3 revisions
The Annot Dist tab computes the minimum distance from each cell to the boundary of a selected annotation type, displays per-cluster distance distributions as violin, box, or strip plots, and can colour cells in the viewer by their distance value.

| Control | Description |
|---|---|
| Clustering | Clustering used to group cells in the distribution plot |
| Annotation type | Annotation polygon type to measure distance to |
| Refresh annotation types | Rescans the Annotations layer; use if annotations were added after the tab was opened |
| Plot type | Shape of the distribution plot: violin, box, or strip
|
| Max distance to show (µm, 0=all) | Clips the y-axis to this distance in micrometres; set to 0 to show all distances |
| Distance colormap | Colour map applied when colouring cells by distance (e.g. plasma) |
| Run Distance Analysis | Computes the minimum distance to the annotation boundary for every cell |
| Results area | Shows min, median, mean, and max distances overall, plus per-cluster medians |
| Show Plot | Renders the distribution plot; enabled after running the analysis. Also saves the figure — see the notes. |
| Export CSV... | Saves a table with cell coordinates, cluster assignment, and a distance_um column for each cell; enabled after running. Defaults to the filename annotation_distances.csv. |
| Colour cells by distance | Applies distance-based colouring to the cell labels layer using the selected colourmap; enabled after running |
| Clear distance colouring | Restores the previous colourmap; enabled when distance colouring is active |
- Draw annotation polygons in the Annotations tab, or ensure existing polygons are loaded.
- Select a Clustering and choose the Annotation type to measure distance to.
- Click Refresh annotation types if the type does not appear in the dropdown.
- Choose a Plot type and optionally set Max distance to show to focus on a spatial range of interest.
- Click Run Distance Analysis.
- Review per-cluster medians in the results area, then click Show Plot to visualise distributions.
- Click Export CSV... to save the per-cell table.
- Optionally click Colour cells by distance to see spatial distance gradients in the viewer; click Clear distance colouring to restore the previous display.
- At least one annotation polygon of the selected type must exist before running the analysis.
- Distance colouring is independent of other colouring modes; Clear distance colouring restores whatever colourmap was active before you applied distance colouring.
-
Show Plot also writes the figure to
<dataset>/plots/annot_distance.<fmt>, where the format follows Preferences → Plot format (SVG by default, PNG at 300 dpi if selected). No save dialog appears; the file is simply written.
Reference
Cells
Genes
Spatial
- ROI Analysis
- Ligand-Receptor
- Neighborhood Enrichment
- Co-occurrence
- Spatial Domains
- Annot Nhood
- Annot Distance
Images
Tools
Tutorials
- Getting Started
- Clustering and DEG
- H&E Registration
- ARMS Overlay
- ROI Analysis
- Annotations
- Recovering a Cache