Fix visium#1067
Conversation
Add a grouping picker to the spatial tile settings: the default "Samples" view is a flat grid that follows the Cell sets & metadata sample order and re-lays out when samples are reordered there; picking a metadata track instead arranges samples one group per row. A shared slot map keeps the image grid, segmentation grid, centroids and molecules aligned. Also: hide tissue images by default, fill empty grid cells with the neutral background, and guard out-of-bounds tile requests when the grid resizes. Speed up regrouping by memoising zarr roots and multiscale metadata and by skipping hidden image tiles. Signed-off-by: Alex Pickering <alexvpickering@gmail.com>
Single-sample spatial plots (QC, Plots & Tables) defaulted their zoom to the full padded canvas, showing blank margins. Read the pipeline-written originalSize from the image OME-Zarr and use it for the initial domain and zoom-out bounds, keeping the y-flip anchored to the padded height. Falls back to the full extent when originalSize is absent. Signed-off-by: Alex Pickering <alexvpickering@gmail.com>
Hiding/selecting clusters lagged in large experiments. Memoise the cell set hierarchy on hierarchy/properties only, so hide/select no longer churns it (and every downstream consumer). Count selected cells in one pass instead of building several full-size Sets, drop the array-spread in union, and cache colour parsing when building the bitmask LUT. Signed-off-by: Alex Pickering <alexvpickering@gmail.com>
Signed-off-by: Alex Pickering <alexvpickering@gmail.com>
Signed-off-by: Alex Pickering <alexvpickering@gmail.com>
This reverts commit a10731f. Signed-off-by: Alex Pickering <alexvpickering@gmail.com>
|
New Issues (3)Checkmarx found the following issues in this Pull Request
Use @Checkmarx to interact with Checkmarx PR Assistant. |
📦 Next.js Bundle Analysis for uiThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
| Page | Size (compressed) |
|---|---|
global |
686.51 KB (🟡 +22 B) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
Six Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
| Page | Size (compressed) | First Load |
|---|---|---|
/experiments/[experimentId]/data-exploration |
1.51 MB (🟡 +799 B) |
2.18 MB |
/experiments/[experimentId]/data-processing |
515.37 KB (🟡 +288 B) |
1.17 MB |
/experiments/[experimentId]/plots-and-tables/frequency |
448.27 KB (-2 B) |
1.11 MB |
/experiments/[experimentId]/plots-and-tables/spatial-categorical |
485.71 KB (🟡 +130 B) |
1.14 MB |
/experiments/[experimentId]/plots-and-tables/spatial-feature |
491.6 KB (🟡 +163 B) |
1.15 MB |
/experiments/[experimentId]/plots-and-tables/spatial-molecules |
643.98 KB (🟡 +338 B) |
1.3 MB |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1067 +/- ##
==========================================
+ Coverage 77.01% 77.02% +0.01%
==========================================
Files 607 608 +1
Lines 14678 14763 +85
Branches 3670 3710 +40
==========================================
+ Hits 11304 11371 +67
- Misses 3160 3173 +13
- Partials 214 219 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: Alex Pickering <alexvpickering@gmail.com>
📦 Next.js Bundle Analysis for uiThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
| Page | Size (compressed) |
|---|---|
global |
686.52 KB (🟡 +38 B) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
Six Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
| Page | Size (compressed) | First Load |
|---|---|---|
/experiments/[experimentId]/data-exploration |
1.51 MB (🟡 +1022 B) |
2.18 MB |
/experiments/[experimentId]/data-processing |
515.37 KB (🟡 +288 B) |
1.17 MB |
/experiments/[experimentId]/plots-and-tables/frequency |
448.27 KB (-2 B) |
1.11 MB |
/experiments/[experimentId]/plots-and-tables/spatial-categorical |
485.71 KB (🟡 +130 B) |
1.14 MB |
/experiments/[experimentId]/plots-and-tables/spatial-feature |
491.6 KB (🟡 +163 B) |
1.15 MB |
/experiments/[experimentId]/plots-and-tables/spatial-molecules |
643.98 KB (🟡 +338 B) |
1.3 MB |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.
Signed-off-by: Alex Pickering <alexvpickering@gmail.com>
📦 Next.js Bundle Analysis for uiThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
| Page | Size (compressed) |
|---|---|
global |
686.52 KB (🟡 +38 B) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
Six Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
| Page | Size (compressed) | First Load |
|---|---|---|
/experiments/[experimentId]/data-exploration |
1.51 MB (🟡 +1.11 KB) |
2.18 MB |
/experiments/[experimentId]/data-processing |
515.37 KB (🟡 +288 B) |
1.17 MB |
/experiments/[experimentId]/plots-and-tables/frequency |
448.27 KB (-2 B) |
1.11 MB |
/experiments/[experimentId]/plots-and-tables/spatial-categorical |
485.71 KB (🟡 +130 B) |
1.14 MB |
/experiments/[experimentId]/plots-and-tables/spatial-feature |
491.6 KB (🟡 +163 B) |
1.15 MB |
/experiments/[experimentId]/plots-and-tables/spatial-molecules |
643.98 KB (🟡 +338 B) |
1.3 MB |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.


Description
Adds multi-sample spatial layout with metadata-based grouping in Data Exploration: samples can be grouped into rows by a sample-level metadata track (via a rewritten group-by settings panel), with a shared grid layout keeping images, segmentations, centroids, and molecules aligned. Single-sample spatial plots now cap their view to the tissue extent (reading the pipeline's originalSize) so blank padding isn't shown, and segmentation overlays render with crisp nearest-neighbour pixels. Also includes performance fixes for large experiments — cheaper cell-set union/count passes, a memoised cell-set-hierarchy selector, cached colour parsing and zarr metadata — plus hiding the tissue image by default.
Details
URL to issue
N/A
Link to staging deployment URL (or set N/A)
N/A
Links to any PRs or resources related to this PR
Integration test branch
master
Merge checklist
Your changes will be ready for merging after all of the steps below have been completed.
Code updates
Have best practices and ongoing refactors being observed in this PR
Manual/unit testing
Integration testing
You must check the box below to run integration tests on the latest commit on your PR branch.
Integration tests have to pass before the PR can be merged. Without checking the box, your PR
will not pass the required status checks for merging.
Documentation updates
Optional