PGx validation on GSE165845: WGS-derived star truth, 2-fold masks, array-resolvable concordance

- scripts/pgx/wgs_star_truth.py: star alleles from the 1000G 30x phased panel with the DB definitions
  (wildcard-aware haplotype assignment; checked against GeT-RM on the demo CEPH individuals).
- validate_star_getrm.py: --all-genes, --individuals, --coverage (projection onto what the array can see);
  replicate_concordance.py.
- 120 individuals x 3 GSA v1 arrays: array-resolvable 1637/1710 (95.7 %), top 1223/1800 (chip lacks many
  defining variants), GeT-RM subset 28/35, replicates 99.2 % without the failed array (V2_pgx_star.md, K-029).
This commit is contained in:
kemal committed 2026-09-29 19:00:34 +01:00
1 parent 2bd9773478
commit 004739da8e
6 files changed
+4213 -1

No files matched your search

+51
View File
@@ -101,3 +101,54 @@ so the per-call error is 1e-3 (GS ≥ 0.15) and errors are handled by the probe
for genes CPIC covers, so those genes reuse the CPIC tables (flag `dpwg_via_cpic_mapping`); DPWG-only genes
(CYP1A2, CYP3A4, F5) have no public machine-readable mapping and get phenotype `null` with the flag
`dpwg_mapping_not_available` (K-029).
## Independent validation: GSE165845 (GSA v1 C2, 120 1000 Genomes individuals × 3 arrays)
A second cohort, independent of the demo used for development (2026-09-29, all on the Pi, $0):
* **Arrays:** the 360 GSE165845 GTCs (GSA-MD v1 chips, GSA v1 C2 manifest; K-024) → SNV VCFs; no targeted CN probes
on this chip, so star alleles are called with `--no-cn`. The chip carries little PGx content: 292 probe-to-variant
links (GSA v4 PGx: 5 280); `pgx coverage`: 495 alleles callable, 136 array-equivalent, 1 129 not covered — e.g.
no CYP2D6 *2/*4/*10 probes (rs16947, rs3892097, rs1065852 are absent from the manifest).
* **Truth:** star alleles derived from the 1000G 30x phased panel with the same DB definitions
(`scripts/pgx/wgs_star_truth.py`; SNV/indel level — CYP2D6 *5, xN and hybrids invisible; CYP2B6 left out because
its common core variant rs2279343 is filtered from the panel). The derivation was checked against GeT-RM on the
demo's CEPH individuals (CYP2D6 14/15, CYP2C9/CYP3A4/CYP3A5 15/15, TPMT 16/16; the rest are nomenclature changes).
* **Masks:** 2-fold — individuals split in halves; each half is called with the mask derived from the other half
(A → 0 probes masked, B → 1). After masking the calls agree with 1000G at 99 % or better in every GS bin.
* **Metrics:** *top* = the top solution equals the WGS diplotype; *array-resolvable* = both diplotypes projected
onto the alleles this array can tell apart (`pgx coverage`: callable → itself, equivalent_to:X → X, not covered →
the reference's class) — the fair measure for a chip that lacks a gene's defining variants.
| Gene | Top = WGS | Truth within feasible equivalents | Array-resolvable |
|---|---|---|---|
| CYP1A2 | 18/120 | 72/120 | 120/120 |
| CYP2A13 | 97/120 | 119/120 | 117/120 |
| CYP2A6 | 73/120 | 112/120 | 117/120 |
| CYP2C19 | 100/120 | 116/120 | 110/120 |
| CYP2C8 | 114/120 | 120/120 | 115/120 |
| CYP2C9 | 95/120 | 108/120 | 116/120 |
| CYP2D6 (SNV level) | 32/120 | 54/120 | 111/120 |
| CYP3A4 | 112/120 | 117/120 | 117/120 |
| CYP3A5 | 120/120 | 120/120 | 120/120 |
| CYP4F2 | 43/120 | 86/120 | 96/120 |
| NAT2 | 95/120 | 105/120 | 120/120 |
| NUDT15 | 120/120 | 120/120 | 120/120 |
| SLCO1B1 | 31/120 | 87/120 | 109/120 |
| TPMT | 107/120 | 115/120 | 102/103 |
| UGT1A1 | 66/120 | 120/120 | 47/47 |
| **total** | **1223/1800 (67.9 %)** | | **1637/1710 (95.7 %)** |
* Top-solution concordance is low where the chip lacks the defining variants: the call is then the most probable
member of an equivalence class the array cannot split (CYP2D6 *1/*2/*10, SLCO1B1 *1/*37, CYP1A2), so the prior
decides. Projected onto what the array can see, 95.7 % agree (half A 815/854, half B 822/856).
* CYP4F2 (96/120) is the weakest: the array genotypes at its covered sites match 1000G exactly (rs3093200 180/180),
so the residue is definitional — *5 and *23 share the only covered variant, and the projection cannot separate
alleles whose other defining variants are off-array.
* **GeT-RM** (7 of the 120 individuals, older consensus): 28/35 top, array-resolvable 29/30.
* **Replicates:** the top genotype of all 70 genes agrees between replicate arrays of one individual in 24 916 of
25 200 pairs (98.9 %); 87 of the 284 discordant pairs come from NA20362's failed replicate (call rate 0.76, K-024);
without it 99.2 %.
Files: `docs/validation/V2_pgx_star_gse165845.json`; scripts `wgs_star_truth.py`, `validate_star_getrm.py`
(`--all-genes --individuals --coverage`), `replicate_concordance.py`.
File diff suppressed because it is too large. Load diff