API Reference (cellucid-python)#
This section is the canonical reference for the public cellucid Python API (and the cellucid CLI).
Choose your path
Wet lab / beginner: start with Jupyter (notebook embedding + hooks) (notebooks) or CLI (cellucid) (terminal).
Computational user: start with Export / Data Preparation (prepare) (reproducible exports) + Server (browser tab + local HTTP server) (sharing + lazy loading).
Power user / developer: start with Sessions (.cellucid-session bundles) (session bundles) + Vector fields (velocity / drift overlays) (velocity/drift overlays).
Which function should I call?#
You have… |
You want… |
Use… |
|---|---|---|
|
The fastest “just show me” notebook view |
|
Exported dataset directory |
Notebook embedding |
|
Exported dataset directory |
Browser tab (local HTTP server) |
|
|
Browser tab without exporting first |
|
A session captured in the web app |
Apply highlights/fields back onto |
|
A transition matrix + embedding |
Vector field overlay in Cellucid |
API map#
Notebook embedding, hooks/events, and controlling the viewer from Python.
Run a local server for exported datasets or AnnData (including SSH-tunnel workflows).
prepare(...) and the exported on-disk format used by the web viewer.
CellucidViewer and AnnDataViewer classes (Jupyter widgets + hooks).
AnnDataAdapter (server-side adapter for .h5ad/.zarr/in-memory AnnData).
.cellucid-session bundles: read, inspect, and apply back to AnnData.
Compute/store vector overlays (e.g., CellRank drift) for visualization.
cellucid serve auto-detects .h5ad, .zarr, or exported directories.
Reference conventions#
“Exported dataset directory” means a folder created by
prepare()(containsdataset_identity.json,obs_manifest.json, andpoints_*d.bin(.gz)).“AnnData mode” means serving data directly from an
AnnDataobject or.h5ad/.zarrwithout runningpreparefirst (convenient, but typically slower).Many APIs are lazy-imported from
cellucid.__init__to keep CLI startup fast; importingcellucidis intentionally lightweight.