You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+
## Overview
6
+
7
+
seqr is a web-based rare disease genomics tool (Broad Institute): Django (Python) server + React (JS) client, backed by **postgres** (`seqrdb` + `reference_data_db`), **clickhouse** (variant search, read-only from the app), and optional **redis** cache. Dataset loading is done by an external pipeline-runner service (not in this repo). Elasticsearch and Hail-backend search are deprecated in favor of ClickHouse — don't build new features against ES.
Run all backend tests (matches CI): `./manage.py test -p '*_tests.py' reference_data clickhouse_search seqr matchmaker panelapp`
14
+
Single test: `./manage.py test seqr.views.apis.family_api_tests.FamilyAPITest.test_update_family`
15
+
`clickhouse_search` tests need a running ClickHouse + `CLICKHOUSE_READER_USER`/`CLICKHOUSE_WRITER_USER`/`CLICKHOUSE_SERVICE_HOSTNAME`. CI enforces `--fail-under=99` coverage.
16
+
17
+
**Frontend (`ui/`):**`npm install`, `npm run start` (dev server), `npm run build`, `npm test`, `npm run lint`
18
+
Single test: `npx jest path/to/File.test.js`. Coverage threshold 40% lines/statements. Node 14 required.
19
+
20
+
## Architecture
21
+
22
+
-**`seqr/`** — core app (users, projects, families, samples, saved variants, permissions). `models.py` is the central data model. Function-based views (no DRF) in `views/apis/*.py`, one module per resource, each paired with `*_tests.py`, wired by name in `urls.py`. No service layer — logic lives in `views/apis`/`utils/`.
23
+
-**`reference_data/`** — external gene/variant reference datasets (OMIM, gencode, HPO, PanelApp, etc.), lives in the separate `reference_data` Postgres DB via `ReferenceDataRouter`; refreshed by `update_all_reference_data`.
24
+
-**`matchmaker/`** — GA4GH Matchmaker Exchange (MME) protocol (`views/external_api.py`) plus seqr's own MME UI endpoints (`views/matchmaker_api.py`).
25
+
-**`panelapp/`** — Genomics England PanelApp gene panel integration.
26
+
-**`clickhouse_search/`** — the variant search backend (sole supported implementation; ES only remains in old migrations). Custom Django DB backend (`backend/`), ClickHouse-side models (`models/`), query construction in `search.py`/`managers.py` called from `seqr`'s `variant_search_api.py`. Routed via `ClickHouseRouter`.
27
+
-**`vlm/`** — separate standalone `aiohttp` service (own requirements, own Auth0 auth), not part of the Django URLconf, deployed independently.
28
+
29
+
**DB routing:** four connections — `default` (seqrdb), `reference_data`, `clickhouse`/`clickhouse_write` — via `DATABASE_ROUTERS`. No cross-DB joins at the DB level.
30
+
31
+
**Auth:** Google OAuth2 / Azure AD v2 via `social_django`, plus `django-guardian` object-level permissions.
0 commit comments