Skip to main content

SEU-3D

3D visualization and analysis plugin for spatial transcriptomics embryo data based on napari.

PyPI version License

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 (previously pip install seu-3d pulled in nothing)
    • Restrict packages.find to seu_3d* so stray directories are never published
    • Remove the unused, broken weiwei/ source tree and the dead _umap_selection module
    • Single-source the version from seu_3d.__version__
  • Bug Fixes:
    • Fix slice filtering never applying (obs['slice'] vs obs['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
  • 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)
  • UX:
    • Gene-expression views reuse a single gene_expression layer 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/obsm field names (see Data Format above)
  • Code Quality: remove duplicate/unused imports, unify gene-expression coloring into shared helpers
  • Housekeeping:
    • Centralize 2D->3D coordinate stacking in Embryo (written back to obsm)
    • Add MIT LICENSE and unit tests for Embryo

[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)

Source distribution for seu-3d 2.0.0
File Size Uploaded
seu_3d-2.0.0.tar.gz 18.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for seu-3d 2.0.0
File Interpreter ABI Platform
seu_3d-2.0.0-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.1.17

2 release files

1.1.15

2 release files

1.1.14

2 release files

1.1.13

2 release files

1.1.12

2 release files

1.1.11

2 release files

1.1.10

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.15

2 release files

1.0.14

2 release files

1.0.13

2 release files

1.0.12

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page