A library for a cell search app that helps users find similar cells in an embedding based on a growing suite of feature sets.
Project description
Cell Search
A Python package for finding similar cells in embedding space and launching an interactive Dash interface for exploration.
Installation
From PyPI
pip install cell_search
From Source (development)
This repository uses uv for dependency management and poe for tasks.
uv sync
Deployment
This package can run as a standalone local app, in Docker, or embedded in a Flask host application.
Execution Modes
This package supports three execution modes via the app factory in src/cell_search/app.py:
- Standalone (local):
create_dash_app(data_path=None)launched byscripts/Cell_Search_App.py. - Docker deployment:
create_dash_app(data_path=None)launched in a containerized environment. - Embedded in dash_on_flask:
create_app(name, config=None, server=None, ...)integrates as a registered Dash app within a multi-app Flask host.
Standalone (Local)
# Optional: set custom parquet path
export CELL_SEARCH_DATA_PATH=/absolute/path/to/microns_SomaData_AllCells_v661.parquet
# Optional: set CAVE token for CAVE/Neuroglancer operations
export CAVE_TOKEN=<your-token>
# Run standalone app
uv run python scripts/Cell_Search_App.py
Default URL: http://localhost:8050
Docker Deployment
export CAVE_TOKEN=<your-token>
docker compose up --build
Default URL: http://localhost:8050
If your data file is not in the repository default location, set:
export CELL_SEARCH_DATA_PATH=/absolute/path/to/microns_SomaData_AllCells_v661.parquet
before launching Docker.
Embedded in dash_on_flask (Local POC)
Use this mode when validating integration with a multi-app Flask host.
- In dash_on_flask, add
cell_search.create_appintoDASH_DATASTACK_SUPPORTfor the target datastack. - Install this package into the dash_on_flask environment from PyPI:
pip install cell_search
- Provide runtime environment in dash_on_flask:
export CELL_SEARCH_DATA_PATH=/data/microns_SomaData_AllCells_v661.parquet
export CAVE_TOKEN=<your-token>
- Launch dash_on_flask and visit:
/dash/datastack/<datastack>/apps/cell_search/
For local proof-of-concept environments using middle_auth_client, AUTH_DISABLED=true is often used.
Development
Setup
uv sync
Jupyter
poe lab
Running Tests
poe test
Building Documentation
poe doc-preview
Versioning
# Dry run to see what will change
poe drybump patch
# Actually bump the version
poe bump patch # or minor, or major
Profiling
# Profile with scalene (CPU + memory)
poe profile-all <your script>
# Profile with pyinstrument (CPU only, nicer output)
poe profile <your script>
License
MIT License - see LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cell_search-0.0.1.tar.gz.
File metadata
- Download URL: cell_search-0.0.1.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edb3d100d1913165455a4810965260f14f94ff0c5df5246e1eefa577d341b638
|
|
| MD5 |
7be13aa7d92f9b2870e6e72f033fc326
|
|
| BLAKE2b-256 |
768626cfccc72a2d0133cf970ee6c47dd143cc241d39f8f43c50eb9a15ea1c60
|
File details
Details for the file cell_search-0.0.1-py3-none-any.whl.
File metadata
- Download URL: cell_search-0.0.1-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f18edaf3e328463cce071e08882a617e3124988c5de5aaaeedbae58d98637e80
|
|
| MD5 |
8248d3c98db323ec5f3535b056843510
|
|
| BLAKE2b-256 |
5d8dcc482786667329979c0fb7f4e8b9e5eda36bd2dc3430d9bb2eeb7eb1e972
|