Clone
1
Local development
Kemal Yaylali edited this page 2026-09-12 13:44:49 +01:00
Table of Contents
Local development
make up # postgres + api + web + mlflow via docker-compose
make migrate # alembic upgrade head
make hpo # HPO annotations: what the ranking matches against
make published-case # a real published patient
make test # api, ml, loader and web tests
Then open http://localhost:5173.
Making the "Analyse case" button work
docker-compose has no Nextflow, so the button marks the job failed with the command to run instead. To get the real thing, run the API on the host, where Nextflow and Docker are:
docker compose up -d db
cd api && DATABASE_URL=postgresql+asyncpg://rarelens:rarelens@localhost:5432/rarelens \
PIPELINE_DATABASE_URL=postgresql+asyncpg://rarelens:[email protected]:5432/rarelens \
LOCAL_DATA_ROOT=$PWD/.. VEP_DATABASE=true \
uv run --extra dev uvicorn app.main:app --port 8000
PIPELINE_DATABASE_URLis what the loader container gets. Inside it, the API's ownlocalhostwould be the container itself.LOCAL_DATA_ROOTis the directory a case'svcf_urimust sit under. This is a security boundary, not a convenience — see Gotchas.
Ports
| Service | Port | Note |
|---|---|---|
| web | 5173 | |
| api | 8000 | |
| postgres | 5432 | |
| MLflow | 5001 | not 5000: macOS AirPlay Receiver owns 5000 and answers 403 |
Training a model
make training-set # ClinVar-derived table, ~370k labelled variants
make train # fits, reports held-out metrics by gene split, moves the production alias
The API scores with models:/rarelens-pathogenicity@production. Setting MODEL_URI to an artifact
path skips the registry entirely, which is how the serverless deployment scores with no MLflow
server running.
What the metrics do and do not mean is in Benchmarks. Read that before quoting them.
rarelens
Understanding it
Working on it
Running it
When it goes wrong