Skip to content

Clonal Compass

Clonal Compass is a single-cell immune-repertoire co-pilot for paired scRNA-seq + TCR-seq data.

Core trick

Computes clonal expansion and cluster marker evidence in code, then passes compact evidence bundles to Claude for grounded chat answers.

Tags

Description

Clonal Compass is a single-cell immune-repertoire co-pilot for paired scRNA-seq + TCR-seq data. I built it for immunologists and computational biologists who already have repertoire-analysis outputs but still need to manually connect several pieces of evidence: which T-cell clones expanded, where those cells sit in the transcriptional landscape, what marker genes support the inferred cell state, and whether any known epitope matches are available. The tool runs a Scanpy/scirpy-based analysis pipeline, computes clone expansion and cluster-level evidence, builds compact evidence bundles, and then uses Claude to generate cautious, reviewable interpretations from those computed results. It also includes a Streamlit chat interface where users can ask grounded questions about the evidence rather than prompting Claude over raw or unstructured biology data. I tested Clonal Compass on two public datasets: a PBMC baseline dataset and a tumor-infiltrating T-cell dataset. The contrast was useful: the PBMC dataset showed low clonal expansion, while the tumor T-cell dataset showed stronger expansion patterns, demonstrating how the same workflow can help summarize different immune-repertoire contexts. This matters because existing repertoire tools are strong at computation but often stop at tables and plots, while general single-cell AI copilots may not be aware of clonotype structure. Clonal Compass sits between those worlds: it makes immune-repertoire analysis more interpretable without asking the LLM to act as an ungrounded biology oracle. Quantitative claims come from computed evidence bundles, and Claude is used as a cautious interpretation layer that hedges uncertainty, cites observed metrics, and avoids diagnostic or patient-level claims.
twhetzel/clonal-compass★ 10 forksPythonMITCreated Jul 10, 2026 · last push Jul 13, 2026

README excerpt

# Clonal Compass

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.md)

Clonal Compass is a single-cell immune-repertoire co-pilot for 
paired scRNA-seq + TCR-seq data. It turns standard repertoire-analysis outputs 
into a reviewable report with a grounded chat interface that helps immunologists 
ask: which T-cell clones expanded, what transcriptional states are they 
associated with, and what evidence supports that interpretation?

This project was created for the [Build with Claude: Life Sciences](https://cerebralvalley.ai/e/built-with-claude-life-sciences) hackathon.

## Requirements

- **Python 3.11+** (developed and pinned against 3.11.9).

> ⚠️ On many systems `python3` / `python` points to an older interpreter
> (e.g. macOS may ship 3.8, which is too old for this project's scanpy/scirpy
> stack). Always create the venv with an explicit `python3.11` so you get the
> right version. Check with `python3.11 --version` before starting.

## Setup

```bash
# 1. Create a dedicated virtual environment with Python 3.11
python3.11 -m venv .venv

# 2. Activate it
source .venv/bin/activate        # Windows: .venv\Scripts\activate

# 3. Install the pinned dependencies
pip install -r requirements.txt

# 4. Install clonal_compass as an editable package (so `import clonal_compass`
#    works from anywhere — no PYTHONPATH needed). Dependencies are read from
#    requirements.txt, so this step is safe to run right after it.
pip install -e .
```

If `python3.1

Team