An end-to-end germline variant-calling platform built to production-grade clinical bioinformatics patterns
Built by Quentin Clayssen Β· solo-designed, solo-built, AI-orchestrated
Highlights Β· Architecture Β· Validation Β· Quickstart Β· Walkthrough Β· Docs Β· For Recruiters β
|
Benchmarked with |
Every result carries a provenance stamp (git commit, pipeline version, reference build, SHA-256 checksums). Results are insert-only: corrections are new records, never edits. |
A QLoRA fine-tuned LLM drafts summaries and a ReAct agent does ACMG variant interpretation, both behind enforced guardrails and clinician sign-off. |
|
AWS CDK (6 stacks: S3, DynamoDB, Step Functions, Lambda, IAM, CloudWatch) with Jest guardrail tests for its integrity invariants, plus Azure Bicep for the API and web app. |
Star-schema warehouse built two ways (SQL and dbt), scheduled by Airflow, and two Metabase dashboards provisioned from version-controlled definitions. |
31 ADRs, nf-core-style Nextflow DSL2 with |
| Layer | Tools |
|---|---|
| Bioinformatics | Nextflow DSL2 Β· nf-test Β· fastp Β· FastQC Β· MultiQC Β· BWA-MEM2 Β· GATK HaplotypeCaller Β· DeepVariant Β· hap.py Β· bcftools Β· Biocontainers (digest-pinned) |
| Cloud & IaC | AWS CDK (TypeScript) Β· S3 Β· DynamoDB Β· Step Functions Β· Lambda Β· EventBridge Β· CloudWatch/SNS Β· Azure Bicep (Container Apps, Static Web Apps) |
| Data | PostgreSQL (insert-only + immutability triggers) Β· star schema Β· dbt Β· Airflow Β· Metabase as code Β· Parquet |
| AI / ML | PyTorch Β· Hugging Face Transformers + PEFT (QLoRA) Β· ReAct agent over ClinVar / gnomAD / ACMG Β· guardrails + human-in-the-loop |
| Apps | FastAPI (OpenAPI 3.1) Β· React + TypeScript + Vite Β· Streamlit |
| Quality | pytest Β· Jest CDK guardrail tests Β· GitHub Actions (11 workflows) Β· Dependabot Β· 31 ADRs |
This platform implements the full path from sequencing data to clinical insight:
QC | Alignment | Variant Calling | Truth-Set Benchmarking | Postgres Provenance | Metabase Dashboards | LLM Report Drafting
Nextflow style, not the nf-core template. The pipeline follows nf-core conventions (DSL2, one process per module,
conf/modules.config, per-processversions.yml, modulemeta.yml) but is hand-written β it does not include the template'ssubworkflows/nf-core/utils_*backbone or nf-schema validation, and would not passnf-core lintcleanly. It does have annf-testsuite (pipeline/tests/, stub mode) covering the QC, calling and validation modules plus a full-workflow run, executed in CI.
Scope honesty. This is a portfolio project. It demonstrates the validation methodology and traceability patterns ISO 15189 / NATA accreditation requires (benchmarking against a reference truth set, insert-only provenance, audit trails, change control). It is not an accredited clinical test and must not be used for clinical decision-making.
Lambda functions handle orchestration and metadata; heavy bioinformatics compute (alignment, variant calling) runs via Nextflow + Docker locally or on compute instances.
flowchart TD
subgraph Local["Local / Compute"]
NF["Nextflow DSL2 pipeline<br/>(QC β align β call β validate β export)"]
end
subgraph AWS["AWS (CDK-managed)"]
S3["S3 Data Lake<br/>raw/ β’ aligned/ β’ called/ β’ validated/"]
EB["EventBridge"]
SF["Step Functions<br/>state machine"]
subgraph Lambdas["Lambda Functions (orchestration)"]
L1["ingestion_trigger"]
L2["qc_orchestrator"]
L3["variant_calling"]
L4["validation_checker"]
L5["export_handler"]
L6["metadata_ingestor"]
L7["report_generator"]
end
HEAL["healer<br/>(self-healing / retry)"]
DDB["DynamoDB<br/>(primary metadata store)"]
PG["Postgres<br/>(Metabase read-replica)"]
MB["Metabase Dashboard<br/>(QC trends, turnaround, pass/fail)"]
CW["CloudWatch + SNS<br/>(alarms & notifications)"]
end
subgraph AI["AI Report Layer"]
QLORA["QLoRA-tuned LLM<br/>structured JSON β draft summary"]
AGENT["ReAct Agent<br/>VCF β ClinVar/gnomAD/ACMG<br/>variant interpretation"]
end
NF -- "FASTQ / VCF / metrics.json<br/>(provenance-stamped)" --> S3
S3 -- "object created" --> EB
EB --> SF
SF --> L1 --> L2 --> L3 --> L4 --> L5 --> L6 --> L7
SF -.-> HEAL
L6 --> DDB
DDB -- "sync" --> PG
PG --> MB
L7 --> QLORA --> AGENT
SF --> CW
The pipeline is benchmarked on GIAB HG002 / NA24385, all of chromosome 20, at a
measured 33.7Γ mean depth (downsampled from GIAB's 300Γ data β see
ADR-0037), against the
v4.2.1 high-confidence truth set using hap.py. Full methodology, the depth comparison and
the limitations in docs/VALIDATION.md; the raw outputs are in
docs/validation-evidence/HG002_chr20_35x/.
| Metric | GATK HaplotypeCaller | DeepVariant | Source |
|---|---|---|---|
| SNV Precision | 0.9903 | β | hap.py summary.csv |
| SNV Recall | 0.9951 | β | hap.py summary.csv |
| SNV F1 | 0.9927 | β | hap.py summary.csv |
| INDEL F1 | 0.9862 | β | hap.py summary.csv |
| Truth SNVs benchmarked | 71,333 | β | hap.py summary.csv |
SNV F1 meets the >= 0.99 acceptance criterion, with a narrow margin on precision (0.9903);
the pipeline's stricter QC layer grades this run warn. DeepVariant comparison is planned.
# 1. Stage the tiny test data (subset, ships in-repo) and run the stub DAG
cd pipeline
nextflow run main.nf -profile test,docker -stub
# 2. Full local run on GIAB HG002 chr20.
# Nothing is downloaded automatically: `-profile test` points at the tiny
# committed placeholders, so stage the real data first (~10 GB).
./scripts/fetch_testdata.sh && ./scripts/preflight.sh
nextflow run main.nf -profile test,docker \
--reference <staged.fa> --truth_vcf <staged.vcf.gz> --truth_bed <staged.bed>
# 3. Deploy the AWS storage/metadata layer. Compute stays local by design β
# `-profile aws` provisions no cloud executor, it publishes results to the
# S3 data lake and turns on metadata ingest (ADR-0017, ADR-0018).
cd ../infra && npm ci && npx cdk synth && npx cdk deploy --all
cd ../pipeline
export CGP_S3_BUCKET=... CGP_DB_URL=...
nextflow run main.nf -profile docker,awsSee docs/SOP-run-pipeline.md for the full operating procedure and acceptance criteria.
clinical-genomics-platform/
β
βββ pipeline/ Nextflow DSL2 modules: QC β align β call β validate β export
βββ infra/ AWS CDK app: S3 data lake, DynamoDB metadata, Step Functions +
β Lambda orchestration, scoped IAM, CloudWatch (6 stacks)
βββ lambdas/ Handlers for the serverless path: ingestion, metadata, QC
β orchestration, validation, reporting, export, LLM healer
βββ db/ Postgres schema + migrations (samples, runs, QC, provenance, audit)
βββ dashboards/metabase/ Version-controlled dashboard + question definitions
βββ dbt/ dbt analytics layer rebuilding the star schema (ADR-0025)
βββ orchestration/ Airflow DAG for the warehouse ETL (ADR-0023, ADR-0026)
βββ api/ FastAPI REST service + OpenAPI docs over runs/QC/provenance
βββ web/ React + Vite UI for agentic variant review and sign-off
βββ demo/ Streamlit walkthrough over the committed fixtures
βββ emr-pipeline/ Separate ICU/VVED demo: mock EMR β insert-only warehouse β
β LLM-structured consult notes β stub ANZICS-APD export (ADR-0029)
βββ ai-report/ PyTorch QLoRA fine-tune + inference for AI-drafted summaries
βββ ai-report/agent/ ReAct variant interpretation agent (ACMG classification)
βββ docker/ Dockerfile.tools (helper scripts) + Dockerfile.demo; per-stage
β tool containers are pinned in each module's `container` directive
βββ scripts/ fetch_testdata.sh, preflight.sh, and other helpers
βββ docs/ Validation report, SOP, beginner's guide, glossary, ADRs
βββ tests/ Unit tests + small committed fixtures
βββ .github/workflows/ CI/CD: lint, security, DB validation, coverage, Docker, release, maintenance
| Audience | Resource |
|---|---|
| New to the domain | Beginner's Guide and Glossary |
| Recruiter / Hiring manager | For Recruiters |
| Technical decisions | Architecture Decision Records |
| Accuracy and benchmarking | Validation Report |
| ML component | Model Card and ADR-0007 |
| Agentic AI | Agent Design and Agent Model Card |
| Operations | SOP and Runbook |
| Standards interoperability | GA4GH Alignment |
The build is demoable at every stage β see docs/MILESTONES.md for the full timeline.
QC trends, turnaround time, and validation pass/fail β powered by Metabase over Postgres, provisioned entirely as code (dashboards/metabase/dashboard_manifest.yaml + provision_metabase.py).
Both dashboards, scrolled through live β not a mockup.
![]() Ops Validation pass rate, per-run turnaround, runs/week throughput. |
![]() Analytics SNV F1 by pipeline version, turnaround SLA p50/p95, cohort explorer. |
Reproduce it yourself:
docker compose up -d, complete Metabase's one-time setup atlocalhost:3000, thenMB_USERNAME=... MB_PASSWORD=... python dashboards/metabase/provision_metabase.pyβ seedashboards/metabase/README.md.
Every screenshot is a real capture of the running service, not a mockup. Click to enlarge.
Agentic variant review (React + FastAPI) The agent calls ClinVar / gnomAD / ACMG tools step by step; a clinician signs off through the insert-only review-decisions endpoint. web/ Β· ADR-0027
|
REST API (FastAPI, OpenAPI 3.1) uvicorn api.main:app --reload. Fixture-backed by default, no database required.
|
Variant interpretation (Streamlit) Agent reasoning trace and ACMG classification over committed fixtures. |
Pipeline data explorer (Streamlit) KPIs, filters and the SNV F1 trend. PYTHONPATH=. streamlit run demo/app.py
|
Submit a variant (React) Entry point to the agentic review flow. |
dbt lineage Sources β staged views β star-schema marts. dbt/ Β· ADR-0025 |
This is a solo portfolio project. Issues, questions, and feedback are welcome β open an issue or start a discussion. Unsolicited pull requests are unlikely to be merged, but feel free to fork.
MIT β see LICENSE. Reference data (GIAB) is public domain / CC0 from NIST.









