This repository contains course material for the Spatial Omics Summer School. The notebooks guide participants through working with SpatialData objects, targeted transcriptomics data and spatial proteomics data.
The tutorials use Harpy for spatial omics analysis workflows and napari-harpy for interactive inspection and visualization in napari.
This project uses uv to manage the Python environment.
Dependencies are defined in pyproject.toml and locked in uv.lock. Use the lockfile for the course environment so everyone gets the same package versions.
Clone this repository and move into the project directory:
git clone https://github.com/vibspatial/targeted_transcriptomics_training.git
cd targeted_transcriptomics_trainingIf you already cloned the repository, update it from inside the project directory:
git pullMake sure uv is installed and available on your PATH.
Check with:
uv --versionFrom the repository root, create or sync the Python 3.12 course environment by running:
uv sync --python 3.12 --lockedThis creates or updates the project environment at:
.venv
This means:
.venvis created if it does not exist- packages are installed from
uv.lock uv.lockis not modified- the command fails if
pyproject.tomlanduv.lockare out of sync
On macOS, Linux, or WSL:
source .venv/bin/activateOn Windows PowerShell:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
. .\.venv\Scripts\Activate.ps1On Windows Command Prompt:
.venv\Scripts\activate.batOn Windows Git Bash:
source .venv/Scripts/activateAfter activating the environment, download the datasets and model weights used in the notebooks.
On macOS, Linux, or WSL, run:
python download_data.pyOn Windows, always set the cache directory explicitly to C:/hp_cache:
python download_data.py --cache-dir-path C:/hp_cacheUse a short cache path on Windows to avoid path-length errors when downloading and unpacking nested dataset files. Some Windows setups still enforce the traditional 260-character path limit unless long-path support is enabled.
This downloads the course data into the selected cache directory. It also downloads the InstanSeg model and the Cellpose cyto3 and nuclei models.
Open this repository folder in VS Code.
Open the Command Palette and run Python: Select Interpreter. Select the interpreter from .venv.
On macOS, Linux, or WSL, choose:
.venv/bin/python
On Windows, choose:
.venv\Scripts\python.exe
When opening a notebook, click the kernel selector in the top-right corner and choose the same .venv environment. It will be named targeted-transcriptomics-training.
The Vitessce hands-on notebooks use a separate environment because current
harpy-vitessce releases require a newer SpatialData stack than the main
course notebooks.
See vitessce/README.md for the Vitessce-specific setup.
For normal course use, do not edit uv.lock.
If dependencies in pyproject.toml are changed intentionally, update the lockfile with:
uv lockThen recreate or sync the environment with:
uv sync --python 3.12 --locked