Repository navigation
Releases
CYPGxEngine BETA-1.2
CYPGxEngine BETA-1.2 (prototype)
The project is now CYPGxEngine, renamed from PGxEngine to reflect that it covers the CYP enzymes specifically — CYP2C19, CYP2D6 and CYP2B6.
What changed
Everything a user touches carries the new name:
| Was | Now |
|---|---|
PGxEngine.exe |
CYPGxEngine.exe |
pgx-client.jar |
cypgx-client.jar |
pgx-engine (bundled engine) |
cypgx-engine |
pgx.db |
cypgx.db |
PGX_DB |
CYPGX_DB |
PGxEngine-portable/ |
CYPGxEngine-portable/ |
Internal package names stay pgx — that is the conventional abbreviation for
pharmacogenomics, not a product name, so import pgx inside a repository
called CYPGxEngine is unremarkable and renaming it would have been churn
without benefit.
If you are upgrading
- Rename your knowledge base, or rebuild it. The engine looks for
cypgx.dband will not findpgx.db. PGX_DBis nowCYPGX_DBif you set it by hand.- BETA-1.0 downloads keep working, and GitHub redirects the old repository URL.
PGxEngine BETA-1.1
PGxEngine BETA-1.1 (prototype)
Highlights
- You can now build standalone distributions. New build scripts make two kinds of build: one that needs nothing installed, and a portable one that only needs Java.
- New model for panel-based results. A new Hardy-Weinberg model estimates how likely each phenotype is when a genotyping panel only tested some alleles. It isn't shown in reports yet.
New: distribution packaging
packaging/build.sh(Linux, macOS, Git Bash on Windows) andpackaging/build.ps1(Windows, no bash needed) each build two outputs underdist/:PGxEngine/(orPGxEngine.appon macOS) is a native app made withjpackage. It includes Java and the engine, so nothing needs installing.PGxEngine-portable/is a runnable jar plus the engine. It needs Java 17+ and runs on Windows, Linux and Apple Silicon.
- Both builds include a frozen engine and a copy of the knowledge base. Both start the engine themselves on the local machine only (loopback) and stop it when the window closes.
- The engine is frozen with PyInstaller (
packaging/pgx-engine.spec,packaging/engine_main.py) as a folder rather than a single file, so it starts faster and antivirus software is less likely to flag it. pgx.dbis placed next to the engine, not inside it, so you can update the knowledge base without rebuilding the engine.- The scripts pick a Python that has PyInstaller automatically. You can override this with
PYTHON=.... - Each build includes a
README.txtwith run steps, platform limits and where to findpgx-engine.log. - Added the Windows app icon
packaging/app.ico. - Builds don't cross-compile: run the script on the platform you're targeting.
New: phenotype inference model (pgx/frequency.py)
A panel reports *1 for every allele it didn't test, so different true diplotypes can produce the same result. The new module works backwards from that:
- Allele priors for each population, plus a pooled prior (a plain average across populations) for when ancestry is unknown. Each prior reports coverage, the share of CPIC's published frequency the model can account for, so missing alleles are visible.
posterior()gives the phenotype probabilities for a reported diplotype, given which alleles the panel tests.marginal()gives the phenotype distribution with no panel at all. This is also the figure CPIC publishes, so it can be checked against an outside source.- Scoring:
brier()(the main score; a confident wrong answer scores 2.0) andlog_loss()(with a minimum probability so misses don't score infinity). - Structural alleles (copy number changes, hybrids) and alleles with no published frequency are left out of the candidates.
Known issues
- The drugs section of the report shows "would haveneeded": a space was lost when that line was joined in
ReportView.java. - The macOS build looks for
packaging/app.icns, which isn't in the repo, so the Mac app builds without an icon. - The portable jar won't open a window on Intel Macs until you rebuild with the
macJavaFX classifier.
PGxEngine BETA-1.0
PGxEngine BETA-1.0 (prototype)
First packaged build of an interpretable pharmacogenomics engine: it maps a
reported star-allele diplotype to a metabolizer phenotype, then matches that
phenotype to published CPIC gene–drug recommendations and shows the guideline
text behind each one.
Built for BMI 530: Software Development in Biomedical Informatics.
Educational prototype. Not clinical decision support, and not validated
for patient care. Nothing here should inform a prescribing decision.
What's in it
- Python engine — resolution, phenotype assignment and recommendation
matching, served over HTTP by FastAPI, frozen with PyInstaller - JavaFX client — gene and diplotype picker, gene cards, and drug rows that
open to show the full CPIC recommendation, its implications, the genes that
decided it and a link to the guideline - Knowledge base — CYP2C19, CYP2D6 and CYP2B6: 18,678 diplotypes and 2,159
recommendations, built from CPIC v1.61.0 (retrieved 2026-11-11)
Report schema 1.1. Every report carries its own provenance block: CPIC release,
PharmVar version, retrieval timestamp and engine version.
What it deliberately does not do
It does not combine genes into a composite score, and it does not rank drugs
best-to-worst. That layer is what separates a commercial combinatorial test
from the guidelines underneath it, and it is also the layer the evidence does
not support. Where a guideline declines to advise, the report says so and marks
it — an abstention is a result, not a blank.
Validation
- GeT-RM reference diplotypes resolved 652 / 663 (98.3%), or 99.4%
excluding the seven where GeT-RM itself reports no consensus - CYP2D6 activity-score banding checked against CPIC across all 16,836
diplotypes - A rebuild five weeks later against CPIC v1.61.0 changed no phenotype and no
recommendation for the six drugs in scope - 99 tests, run offline against a generated fixture database
Attribution
Gene–drug recommendations, diplotype–phenotype tables and allele function
assignments come from CPIC / ClinPGx via their public
REST API, and guideline text is reproduced verbatim with attribution.
Reference diplotypes from CDC GeT-RM.