Skip to main content

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:

  1. Standalone (local): create_dash_app(data_path=None) launched by scripts/Cell_Search_App.py.
  2. Docker deployment: create_dash_app(data_path=None) launched in a containerized environment.
  3. 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.

  1. In dash_on_flask, add cell_search.create_app into DASH_DATASTACK_SUPPORT for the target datastack.
  2. Install this package into the dash_on_flask environment from PyPI:
pip install cell_search
  1. Provide runtime environment in dash_on_flask:
export CELL_SEARCH_DATA_PATH=/data/microns_SomaData_AllCells_v661.parquet
export CAVE_TOKEN=<your-token>
  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cell_search-0.0.1.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cell_search-0.0.1-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

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

Hashes for cell_search-0.0.1.tar.gz
Algorithm Hash digest
SHA256 edb3d100d1913165455a4810965260f14f94ff0c5df5246e1eefa577d341b638
MD5 7be13aa7d92f9b2870e6e72f033fc326
BLAKE2b-256 768626cfccc72a2d0133cf970ee6c47dd143cc241d39f8f43c50eb9a15ea1c60

See more details on using hashes here.

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

Hashes for cell_search-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f18edaf3e328463cce071e08882a617e3124988c5de5aaaeedbae58d98637e80
MD5 8248d3c98db323ec5f3535b056843510
BLAKE2b-256 5d8dcc482786667329979c0fb7f4e8b9e5eda36bd2dc3430d9bb2eeb7eb1e972

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page