CoGA, Comprehensive Genomic Analysis, is a unified platform for variant interpretation, genome visualization, and clinically oriented genomic review. It combines a FastAPI backend, a React frontend, Postgres for metadata and review state, and ClickHouse for high-volume variant storage.
It is operated as an in-house IVD under IVDR Article 5(5) (CMGG, ISO 15189), with the device boundary annotated VCF → signed clinical report. The supporting technical file lives in docs/regulatory/.
CoGA is organized around three areas: a family workspace, cross-cohort discovery tools, and intake/administration.
- Pedigree-aware family dashboard with variant-review/curation summaries and an editable region of interest (ROI).
- Per-data-type analysis views, surfaced only when that data is present: small variants (SNV/indel), structural variants, a combined variant summary, repeat expansions (TRGT), Paraphase, mitochondrial (mtDNA) analysis, and monogenic NIPT. The mtDNA view supports combined mitochondrial-disease testing where ONT long-read adaptive sampling reads the complete mtDNA and the nuclear mito-gene panel in one run — interpreted together, with the Sample QC checks (relatedness/sex/Mendelian, maternal lineage) used to flag sample swaps and data-integrity issues.
- Monogenic NIPT: cfDNA-from-maternal-plasma analysis with fetal-fraction estimation, the maternal/fetal VAF category model, and its own report view.
- PGT haplotype segregation: pedigree-aware IBD founder colouring with a raw phased-marker overlay and an ROI marker overview, deriving an embryo classification (affected/carrier/unaffected/uninformative) — including single-parent (donor) families.
- Genome visualization: whole-genome overview, per-chromosome view, Circos plot, and an embedded IGV browser.
- Per-variant review with ACMG classification, tags, and notes. Phenotype (clinical status) and carrier status are tracked as independent axes.
- Semi-automatic ACMG classifier: pre-evaluates ACMG/AMP criteria from the variant, trio and gene data onto a points scale, with every criterion overridable.
- Case sign-out and clinical traceability: a frozen, versioned report snapshot bound to the software version and the annotation/reference versions, gated on classification-drift and Sample-QC acknowledgement, and recorded in an append-only, hash-chained clinical audit trail.
- Gene Explorer (
/genes): locus-first gene profile with a transcript overview that badges the clinically relevant transcripts (MANE Select, MANE Plus Clinical, RefSeq Select, Ensembl Canonical), plus constraint metrics, disease/phenotype associations, and external links. - Global Small Variant Explorer (
/variant-explorer): variant-centric search and aggregation of SNVs/indels across every project the user can access, with carrier counts (heterozygous/homozygous/families), tag and classification filters, per-sample genotype filters, and carrier drill-down grouped by family. - Clinical CNV Explorer (
/cnv-explorer): browse the curated clinical-CNV knowledge base with per-CNV detail (/cnv-details/:cnvId). - HPO term browser (
/hpo) and a reusable gene-panel catalog (/panels).
- Family Builder (
/family-builder) for manual pedigree creation, and Package Import (/package-import, admin) for folder-based bulk family imports with manifest discovery and dry-run validation. - Admin tooling: user and project access, family/sample data management, gene-reference sync, ClickHouse variant maintenance, variant tag/preset configuration, and audit logs.
frontend/: React, TypeScript, Vite, Tailwind.backend/: FastAPI, SQLAlchemy async, ClickHouse client.Postgres: users, projects, families, samples, review state, repeat expansions, Paraphase results, NIPT artifacts, gene cache, panels, HPO, the annotation/reference-version manifest, and the append-only hash-chained clinical audit + report sign-out trail.ClickHouse: small variants, structural variants, and interval tracks (coverage/segments/APCAD/haplotypes) per assembly, plus cross-project genotype aggregates used by the variant explorer.
- Copy
.env.exampleto.env. The production-style stack now refuses to start with placeholder secrets. ReplaceSECRET_KEY,POSTGRES_PASSWORD, andADMIN_PASSWORDbefore usingdocker compose up. - Start the production-style local stack:
docker compose up --build -d- Open:
- Frontend:
http://localhost:3000 - Backend docs:
http://localhost:8000/docs - Postgres:
localhost:5432 - ClickHouse HTTP:
localhost:8123 - ClickHouse native:
localhost:9000
Docker dev stack with backend reload and the Vite dev server:
docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build -dStop either Docker stack:
docker compose downBackend:
cd backend
python -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
export APP_ENV=development
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000Frontend:
cd frontend
npm install
npm run devRequired:
APP_ENVSECRET_KEYPOSTGRES_HOSTPOSTGRES_PORTPOSTGRES_DBPOSTGRES_USERPOSTGRES_PASSWORDCLICKHOUSE_HOSTCLICKHOUSE_HTTP_PORTCLICKHOUSE_DATABASECLICKHOUSE_USERCLICKHOUSE_PASSWORD
Optional:
CORS_ORIGINSCORS_ORIGIN_REGEXADMIN_USERNAMEADMIN_PASSWORDADMIN_EMAILVITE_API_BASE_URLfor pointing the frontend at a non-default API host; defaults to/apiGITHUB_REPOSITORYGITHUB_REPOSITORY_URLGITHUB_RELEASES_URLGITHUB_ISSUES_URLGITHUB_API_TOKENfor private-repository release syncGITHUB_REPO_VISIBILITYGITHUB_RELEASE_CACHE_TTL_SECONDSGENE_REFERENCE_CLINGEN_VALIDITY_URLGENE_REFERENCE_CLINGEN_DOSAGE_URLGENE_REFERENCE_GENCC_URLGENE_REFERENCE_CLINVAR_GENE_CONDITION_URLGENE_REFERENCE_HGNC_COMPLETE_SET_URL, the HGNC complete set that defines which human genes the reference sync cachesREFERENCE_GENCODE_GTF_URL, the GENCODE annotation supplying GRCh38 gene loci, biotypes, Ensembl/HGNC ids and MANE tagsREFERENCE_GENCODE_REFSEQ_METADATA_URL, GENCODE's transcript → RefSeq accession mapREFERENCE_BOOTSTRAP_T2T, defaulting tofalse; imports T2T-CHM13v2.0 as a second human assemblyREFERENCE_T2T_GTF_URL, the RefSeq-derived annotation used for T2T gene lociGENE_REFERENCE_DBNSFP_GENE_PATH, defaulting to/data/ref-data/dbNSFP5.4_gene.gzfor local-first gene reference syncGENE_REFERENCE_BOOTSTRAP_ON_STARTUP, defaulting totrueto queue the first dbNSFP-backed human gene reference sync when a clean GRCh38 database has no cached gene infoREADS_PATHREFERENCE_FASTA_PATHREFERENCE_ALIAS_PATHREFERENCE_CYTOBAND_PATHAZURE_TENANT_IDAZURE_CLIENT_IDAZURE_ADMIN_OVERRIDEAUDIT_LOG_MODEAUDIT_LOG_QUERY_STRING_MODE
Reference data is loaded through admin API endpoints:
POST /assemblies/{assembly_id}/reference-upload/cytobandsPOST /assemblies/{assembly_id}/reference-upload/genesPOST /assemblies/{assembly_id}/reference-upload/blacklistPOST /assemblies/{assembly_id}/reference-upload/clinical_cnvs
Pedigree and assay data are loaded through API uploads:
POST /ped/uploadPOST /families/{family_id}/small-variants/uploadPOST /repeat-expansions/upload/{sample_id}POST /bed/upload/{sample_id}/{bed_type}POST /structural-variants/upload/{sample_id}
See docs/data-import.md for the current flow.
See docs/testing.md for a file-by-file catalogue of all tests (backend + frontend) and the CI gates.
Backend tests:
backend/.venv/bin/python -m pytestFrontend checks:
cd frontend
npm run tsc
npm run lint
npm test
npm run build- docs/README.md — full documentation index
- docs/deployment-gcp.md — full step-by-step Google Cloud (Terraform) deployment & operations guide
- docs/storage-architecture.md
- docs/database.md
- docs/development.md
- docs/application-scheme.md
- docs/data-import.md
- docs/testing.md
- docs/security-posture.md
- docs/clinical-traceability.md
- docs/regulatory/ — IVDR technical file
- Variant IDs exposed by the API are storage-agnostic strings. Metadata IDs are UUIDs.
- Startup ensures Homo sapiens GRCh38 is present, imports missing GRCh38 cytobands/genes from UCSC when available, seeds built-in hg38 tracks, queues the first dbNSFP-backed human gene-reference sync when the local dbNSFP gene file is present, and starts the gene-reference refresh worker.
- Admin users can inspect and repair ClickHouse variant tables from the data-management page or via
/admin/clickhouse/variants,/admin/clickhouse/variants/{assembly_name}/ensure, and/admin/clickhouse/variants/{assembly_name}/optimize. - The in-app
New featurespage reads GitHub releases through/product/releases; private repositories requireGITHUB_API_TOKENon the backend to keep that page synced.
Licensed under the Apache License 2.0 — see LICENSE and NOTICE.
The NOTICE file carries a regulatory statement that matters if you intend to reuse this: CoGA is operated as an in-house IVD under IVDR Article 5(5) at CMGG and is not a CE-marked device. Its validation covers CMGG's own laboratory and workflow, and does not transfer with the source — anyone deploying it for diagnostic use elsewhere is responsible for their own conformity assessment. Security reports go through SECURITY.md.
See CONTRIBUTING.md. Note that CoGA is a regulated in-house IVD: every change carries a classification and approval step under TF-18, so a pull request cannot be merged on technical merit alone. Participation is governed by CODE_OF_CONDUCT.md.
Notable changes are recorded in CHANGELOG.md.
Releases follow RELEASING.md.
