Viewing methods overview#
This page is the “map” of how you can open Cellucid against your data using cellucid-python.
If you just want to pick the right command, go to Choose your workflow (decision tree).
The mental model (1 minute)#
Cellucid always needs two things:
the viewer UI (HTML/JS) that runs in your browser, and
a dataset server that can answer “give me points / fields / genes / vectors” requests.
cellucid-python starts a local HTTP server that serves both of those from the same origin (via the hosted-asset proxy), so you can open:
http://127.0.0.1:8765/
and the UI can load your data without cross-origin issues.
At a glance#
Audience
Wet lab / non-technical: use the CLI quickstart and stop at “What success looks like”.
Computational: pay attention to data formats (
exportedvs.h5advs.zarr) and backed mode.Power users: pay attention to SSH tunnels, HTTPS notebooks, and caching.
Prerequisites
pip install cellucidOne data input: export directory,
.h5ad,.zarr, orAnnData
The four core entry points#
You want to… |
Best entry point |
You pass… |
Typical place you run it |
|---|---|---|---|
Open the viewer from the terminal |
|
a path |
terminal |
Start a server from a Python script |
|
export dir or AnnData-ish |
Python (notebook optional) |
Embed the viewer in a notebook |
|
export dir |
Jupyter / VSCode notebooks |
Embed the viewer for AnnData |
|
|
Jupyter / VSCode notebooks |
Server mode vs notebook mode#
Server mode (
cellucid serve,serve,serve_anndata) is a normal “keep this terminal running” server.Notebook mode (
show,show_anndata) starts the same kind of server, but also renders an iframe in the notebook and gives you aviewerobject for hooks/commands.
Exported directory vs AnnData direct#
Data input |
How you get it |
Recommended APIs |
Why you’d choose it |
|---|---|---|---|
Exported directory |
|
|
fastest + most reproducible + easiest to share |
|
AnnData HDF5 file |
|
convenient + scalable via backed mode |
|
AnnData Zarr store |
|
convenient + naturally chunked/lazy |
In-memory |
you already loaded it |
|
great for small/medium; risky for huge matrices |
Where the “14 loading options” fit#
The docs use a canonical list of 14 ways to load data (web app only + server + notebook).
Full matrix: The “14 loading options” breakdown
Web-app perspective: Data Loading Overview (All 14 Options)
Common “gotchas” (read once)#
Large dataset? Prefer
exported+serve/showor.h5ad/.zarr+serve_anndata/show_anndata(backed mode).Remote machine? Don’t bind to
0.0.0.0unless you mean to. Use an SSH tunnel first: Remote servers, SSH tunneling, and cloud.HTTPS notebook? Direct
http://127.0.0.1:<port>iframes can be blocked. Usejupyter-server-proxyor setCELLUCID_CLIENT_SERVER_URL: Notebook / widget mode (advanced).Offline? The viewer UI may need to be cached once while online. See Server mode (advanced) and Troubleshooting (viewing).
Next steps#
Pick a workflow: Choose your workflow (decision tree)
Terminal flow: CLI: cellucid serve quickstart
Notebook flow: Jupyter: show() and show_anndata() quickstart