Skip to content

cBioPortal/cell-explorer-py

Repository files navigation

cell-explorer-py

Python backend for cBioPortal Cell Explorer. Converts single-cell RNA-seq data (h5ad) to Zarr v3 stores optimized for web-based visualization.

Packages

This is a uv workspace monorepo:

Package Description
cell2zarr h5ad to Zarr conversion pipeline
cell-explorer-api FastAPI API + static file serving

Setup

uv sync

Preparing your dataset

To convert single-cell RNA-seq data for use with Cell Explorer, see the cell2zarr documentation.

Quick start:

# Convert h5ad to Zarr
cell2zarr convert input.h5ad output.zarr --two-phase --encoding-config encoding.json

# Add a UMAP embedding to an existing store
cell2zarr add atlas.h5ad atlas.zarr --key obsm/X_umap

Tests

uv run pytest packages/cell2zarr/tests/ -v

Running the API

# API only (no static serving)
uv run uvicorn cell_explorer_api.main:app --reload

# With frontend static serving
STATIC_DIR=/path/to/frontend/dist uv run uvicorn cell_explorer_api.main:app --reload

# Export OpenAPI spec
uv run python -m cell_explorer_api.export_openapi > openapi.json

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors