Skip to content

vibspatial/targeted_transcriptomics_training

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

254 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spatial Omics Summer School

SpatialData
plus
Harpy


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.

Installation

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.

1. Get the repository

Clone this repository and move into the project directory:

git clone https://github.com/vibspatial/targeted_transcriptomics_training.git
cd targeted_transcriptomics_training

If you already cloned the repository, update it from inside the project directory:

git pull

2. Install uv

Make sure uv is installed and available on your PATH.

Check with:

uv --version

3. Create or sync the environment

From the repository root, create or sync the Python 3.12 course environment by running:

uv sync --python 3.12 --locked

This creates or updates the project environment at:

.venv

This means:

  • .venv is created if it does not exist
  • packages are installed from uv.lock
  • uv.lock is not modified
  • the command fails if pyproject.toml and uv.lock are out of sync

4. Activate the environment

On macOS, Linux, or WSL:

source .venv/bin/activate

On Windows PowerShell:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
. .\.venv\Scripts\Activate.ps1

On Windows Command Prompt:

.venv\Scripts\activate.bat

On Windows Git Bash:

source .venv/Scripts/activate

5. Download the course data

After activating the environment, download the datasets and model weights used in the notebooks.

On macOS, Linux, or WSL, run:

python download_data.py

On Windows, always set the cache directory explicitly to C:/hp_cache:

python download_data.py --cache-dir-path C:/hp_cache

Use 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.

6. Use the environment in VS Code

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.

Vitessce notebooks

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.

Updating dependencies

For normal course use, do not edit uv.lock.

If dependencies in pyproject.toml are changed intentionally, update the lockfile with:

uv lock

Then recreate or sync the environment with:

uv sync --python 3.12 --locked

About

No description, website, or topics provided.

Resources

Stars

10 stars

Watchers

2 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors