Installation#
Requirements#
Python 3.11 or later
conda (recommended for environment management)
Environment setup#
Create the conda environment from the repository root:
conda env create -f environment.yml
conda activate sc_tools
Core install#
Install sc_tools in editable mode (core dependencies only):
pip install -e .
Optional extras#
sc_tools uses optional dependencies for heavy ML and GPU workflows. Install only what you need:
Extra |
Contents |
Install command |
|---|---|---|
|
scvi-tools, tangram-sc |
|
|
gseapy, pyucell |
|
|
harmonypy, bbknn, scanorama |
|
|
utag (spatial-aware clustering) |
|
|
torch, rapids-singlecell |
|
|
fsspec, s3fs, sshfs, gcsfs, adlfs, zarr, ome-zarr |
|
|
boxfs (Box storage via OAuth) |
|
|
SQLAlchemy, Alembic (project/dataset tracking) |
|
|
Model Context Protocol servers |
|
|
scikit-image, scib-metrics, plotly, cellpose, stardist |
|
|
All of benchmark + deepcell, torch, transformers, segmentation-models-pytorch |
|
|
marsilea (publication composite figures) |
|
|
decoupleR (TF/pathway activity) |
|
|
pytest, ruff, igraph, leidenalg |
|
|
sphinx, pydata-sphinx-theme, myst-nb |
|
Full pipeline install (deconvolution + geneset + integration):
pip install -e ".[deconvolution,geneset,integration]"
Container usage#
All pipeline runs are containerized. On Linux/HPC use Apptainer (primary); on macOS/Windows use Docker (fallback).
# Run a script inside the container (auto-detects Apptainer vs Docker)
./scripts/run_container.sh projects/visium/ggo_visium python scripts/foo.py
# Interactive shell
./scripts/run_container.sh projects/visium/ggo_visium
# Force Docker on any platform
SC_TOOLS_RUNTIME=docker ./scripts/run_container.sh projects/visium/ggo_visium
Build the Apptainer SIF from the Docker image:
docker build -t sc_tools:latest .
apptainer build containers/sc_tools.sif docker-daemon://sc_tools:latest
Build the documentation#
pip install -e ".[docs]"
make docs # build HTML
make docs-open # build and open in browser (macOS)
make docs-clean # remove build artifacts