SEU-3D
3D visualization and analysis plugin for spatial transcriptomics embryo data based on napari.
Features
- 3D Visualization: Render spatial transcriptomics data in 3D with napari
- Tissue Filtering: Filter cells by tissue type, slice, germ layer, and XYZ range
- Gene Expression Analysis: Single, dual, and triple gene expression coloring
- Similarity Search: Find genes with similar expression patterns
- Moran's I Spatial Autocorrelation: Compute spatial gene enrichment
- Differential Expression: Identify tissue-specific marker genes
- Annotation: Cluster and label cell populations in 3D space
- Surface Reconstruction: Generate 3D surfaces for tissue regions (pyvista)
- Automatic Color Mapping: Deterministic tissue colors from a discrete colormap
Installation
pip install seu-3d
Then open napari and look for "Load spatial transcriptomics data" in the plugins menu.
Environment
All runtime dependencies are declared in pyproject.toml and installed automatically via pip:
pip install seu-3d # core functionality
pip install "seu-3d[surface]" # + pyvista, for 3D surface reconstruction
- Python >= 3.9
Data Format
The plugin reads .h5ad files. Two fields are chosen in the widget when
loading; everything else is auto-detected by fixed names:
| Field | Location | Required | Used for |
|---|---|---|---|
| (your choice) | adata.obsm key |
Yes | Spatial coordinates. 3D (x, y, z) preferred; if 2D (x, y), obs['z'] is used as z |
| (your choice) | adata.obs column |
Yes | Tissue / cell-type labels (coloring, filtering, diff-expression) |
z |
adata.obs |
Only when the coordinate key is 2D | Z position of each cell |
slices |
adata.obs |
Optional | Slice/sample filter (falls back to orig.ident) |
orig.ident |
adata.obs |
Optional | Fallback slice/sample filter |
germ_layer |
adata.obs |
Optional | Germ-layer filter |
x_flatten, y_flatten |
adata.obs |
Optional | "Show Flatten" 2D projection |
Missing optional fields simply disable the corresponding tab; the rest of the plugin keeps working.
Quick Start
import napari
viewer = napari.Viewer()
# Add spatial transcriptomics h5ad file via the napari plugin menu
Update Log
[2.0.0] — 2026-07-19
- Packaging:
- Declare runtime dependencies in
pyproject.toml(previouslypip install seu-3dpulled in nothing) - Restrict
packages.findtoseu_3d*so stray directories are never published - Remove the unused, broken
weiwei/source tree and the dead_umap_selectionmodule - Single-source the version from
seu_3d.__version__
- Declare runtime dependencies in
- Bug Fixes:
- Fix slice filtering never applying (
obs['slice']vsobs['slices']mismatch) - Fix differential-expression tissue selection reading only the first character of the tissue name
- Fix annotation coordinate matching failing on floats (cKDTree nearest-neighbour matching) and guard empty selections
- Fix saving annotations before annotating raised
AttributeError - Fix NaN colors for genes with constant expression
- Deterministic tissue colors (removed random shuffle)
- Re-filtering and XY preview now reuse their napari layers instead of piling up new ones
- Fix slice filtering never applying (
- Performance:
- Remove redundant full
AnnData.copy()in filtering and surface generation; filtering now applies one combined mask (a single copy per click instead of four) - Annotations accumulate in one persistent copy (no per-click dataset copy, and repeated annotations no longer reset earlier ones)
- Move h5ad reading, Moran's I, surface reconstruction and similar-gene search to worker threads (no more GUI freezing)
- Sparse-aware cosine similarity and column means (no full-matrix densification)
- Remove redundant full
- UX:
- Gene-expression views reuse a single
gene_expressionlayer instead of stacking a new view per click - Dock panel width is bounded and scrollable; AnnData info box is read-only and height-capped
- Documented the expected
obs/obsmfield names (see Data Format above)
- Gene-expression views reuse a single
- Code Quality: remove duplicate/unused imports, unify gene-expression coloring into shared helpers
- Housekeeping:
- Centralize 2D->3D coordinate stacking in
Embryo(written back toobsm) - Add MIT
LICENSEand unit tests forEmbryo
- Centralize 2D->3D coordinate stacking in
[1.1.17] — 2026-05-30
- First public release as a napari manifest plugin: h5ad loading, tissue/slice/germ-layer/XY filtering, 1-3 gene expression coloring, similar-gene search, Moran's I, differential expression, annotation, pyvista surface reconstruction
[1.1.6]
First release with napari manifest support
[1.0.4]
Fix error that plugin could not show
[1.0.3]
Fix napari.yaml
[1.0.2]
Forgot to upload napari.yaml
[1.0.1]
First release
Acknowledgements
License
Released under the MIT License, like the upstream sc3D project it is derived from.
Metadata
Release files for seu-3d 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| seu_3d-2.0.0.tar.gz | 18.7 kB | Without provenance | Details for seu_3d-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| seu_3d-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for seu_3d-2.0.0-py3-none-any.whl |
Total release size: 35.2 kB
Release files / seu_3d-2.0.0.tar.gz
| Download URL | seu_3d-2.0.0.tar.gz |
|---|---|
| Size | 18.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a3620418003cda92e9388d718c9ad8038d8e30254f1e050f82a2e5104bbc819
|
|
BLAKE2b-256 checksum How to use checksums |
d5c90bf285f7199bbb6a7c23931ac6039bae43bc609d65cfa1a3d5bd66e1eedc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / seu_3d-2.0.0-py3-none-any.whl
| Download URL | seu_3d-2.0.0-py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2bbe7bbbd5b80372f63c176f672fdf46a8f4db8bd7d35511c33b35f8e831a190
|
|
BLAKE2b-256 checksum How to use checksums |
1ea899e77d1ecf821babdc4b67331bd3ea4e4534350ef2db84dba97ba607fc85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for seu-3d 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.