Repository navigation
Releases: veg/datamonkey3
Release list
v0.1.0-beta.38 — AxoMEME 2.0 browser inference (Beta)
AxoMEME 2.0 — browser inference (Beta)
Adds AxoMEME as a new analysis method: a neural model that ranks the sites of an alignment by how
MEME-like their selection signal looks, running entirely in the browser in seconds rather than the
hours a full MEME run takes.
The model is in Beta and under active development — the integration is settled, but the numbers
may move between releases. It is badged as such in the method selector and on its results.
What it is, and what it is not
AxoMEME ranks sites; it does not produce calibrated significance. Measured across 12 real
DataMonkey submissions and 662 variable sites, its predicted LRT reached the chi-square gate for
p ≤ 0.10 exactly once and the p ≤ 0.05 gate never — including on an alignment where MEME itself
reports 17 significant sites. Its authors report Spearman rank correlation, not calibration.
So the calling mode defaults to percentile, tiers are labelled by the rule that produced them
("Top 2%") rather than by a confidence word, the score column is not called an LRT, and no
significance threshold line is drawn anywhere. Sites with no amino-acid variation read "not scored"
rather than 0.000, because those zeros are set before the model is consulted.
MEME is still the ground truth. AxoMEME is for deciding where to look.
Verified against the reference implementation
The ONNX export is the model only — newick parsing, patristic distances, Max-PD selection,
tokenisation and MDS all had to be rebuilt in JS, because torch.linalg.eigh has no ONNX lowering.
Parity is measured against the ML team's own functions, extracted verbatim and executed rather than
reimplemented:
| stage | result |
|---|---|
| patristic distances | exact — 10,405,350 cells over 270 real trees, worst |Δ| 0.000e+0 |
| MDS coordinates | 270/270 within 1e-5 relative, worst 3.35e-7 (float32's own resolution is 1.19e-7) |
| end to end | 12 alignments, 2,195 sites, Pearson r = 1.000000, Spearman ρ = 1.000000 |
Cost
AxoMEME is one method of fifteen and the other fourteen download none of it. The runtime is loaded by
dynamic import and the model served from static/, asserted by e2e rather than assumed. The WASM
runtime is served locally rather than from a CDN, so the site stays self-contained.
First run downloads about 17 MB; after that scoring takes seconds.
Also in this release
- The MEME hit-likelihood estimate (#150), with its JS evaluator verified against XGBoost's own
scoring and no ML runtime in the bundle. - Negative branch lengths from DataMonkey's own neighbour-joining are clamped to zero, matching the
model's training pipeline — they crash the reference implementation on 4.6% of real trees. - Trees without branch lengths are refused for AxoMEME rather than silently producing confident
numbers from an all-zero distance matrix. - E2E tests moved to manual dispatch; run them locally with
npm run test:e2e.
Requires hyphy-scope@1.10.0, which carries the new AxomemeVisualization.
v0.1.0-beta.37
Fixes
- Contrast-FEL: require at least two branch groups before submission (#145, closes #144). Contrast-FEL compares two or more groups; submitting with a single tagged group previously core-dumped downstream in HyPhy with no actionable message. The submission UI now disables the Run button, guards the run handler, and shows a clear inline warning until at least two groups are defined — for both Interactive (tree tagging) and Custom (text field) modes. Scoped strictly to Contrast-FEL; other methods are unaffected.
Tests
- New pure validation helper (
utils/branchGroupValidation.js) with unit tests, plus an e2e test (16-contrast-fel-min-groups.spec.js) that drives the real component.
Full unit suite passes (252 tests); Fast E2E green.
v0.1.0-beta.36
Features
-
Add NRM (Non-Reversibility Model) analysis support — detects directional evolutionary pressure by testing for asymmetric substitution rates. Works in both execution modes:
- Backend: via the existing
nrmjob handler and the hyphy-analysesNucleotideNonREV/NRM.bfbatch file. - WASM:
NRM.bfis a hyphy-analyses custom analysis not packed into the HyPhy WASM image, so it is vendored understatic/hyphy-analyses/and mounted into the WASM filesystem at runtime (all of itsLoadFunctionLibrarydependencies are already present in the packed image). A newCUSTOM_ANALYSIS_BATCH_FILESregistry makes adding future custom analyses a one-line change.
Parameters: rate classes (1–10, default 1) and triple islands (Yes/No). (#93)
- Backend: via the existing
Tests
- Add
e2e/15-nrm-wasm.spec.js— runs NRM end-to-end in real browser WASM on a compact nucleotide fixture and asserts a parseable result JSON.
Full unit suite passes (245 tests); Fast E2E green.
v0.1.0-beta.35
Fixes
-
Fix interactive branch-selection sending an invalid
--branchesvalue to HyPHY. When a user picked the Interactive branch-selection mode, the backend runner passed a value HyPHY rejects — or silently dropped the selection — depending on the method:- BUSTED and aBSREL sent
--branches Interactive, which HyPHY rejects at startup, failing the job 100% of the time. - FEL hardcoded
All, silently ignoring the user's selection. - SLAC read the wrong config key (
branchesinstead ofbranchesToTest), also silently ignoring the selection.
All five single-test-set methods (FEL / SLAC / BUSTED / aBSREL / PRIME) now share one correct
Interactive → FGmapping. Built-in sets (All/Internal/Leaves/Unlabeled) pass through unchanged; tag-based methods (RELAX, Contrast-FEL) were verified unaffected. (#141, #142) - BUSTED and aBSREL sent
Cleanup
- Remove dead legacy options components (
MethodOptionsTab.svelte,FelOptions.svelte,SlacOptions.svelte, and the FEL story) — the live UI usesMethodSelector.svelte. (#142)
Tests
- Add
branch-selection-mapping.test.jscovering theInteractive → FGconversion, built-in pass-through, and defaults for all affected methods.
v0.1.0-beta.34
Telemetry
- Add
stageandsourcefields tofile-validation-error— file-validation errors now carry which awaited step inhandleFileUploadthrew ('init' | 'storage' | 'mount' | 'exec' | 'download' | 'parse' | 'datareader-error') and which entry point triggered the validation ('upload' | 'reselect' | 'demo' | 'repair'). This lets us split the remaining unknown/invalid-format bucket by axis (infra vs HyPhy-data) without depending on string-matching, and pairs with the message capture already in place. (#137)
v0.1.0-beta.33
Bug Fixes
- Restore WASM analysis execution after the beta.32 regression — `HyPhy WASM's --code` rejects numeric genetic code IDs ('0' is not a valid value for parameter 'Choose Genetic Code'), which broke every analysis since beta.32. Reverted to passing the descriptive name. Multi-word names like 'Vertebrate mitochondrial' still get space-split by aioli — proper fix (args as array to cliObj.exec) tracked separately. (#138)
- Fix tree-source auto-switch race that blocked analyses on file load — The reactive guard for missing NJ trees fired at component mount before any file was loaded, switching `selectedTreeSource` to `'upload-new'` and leaving the state stuck when the file later loaded with a valid NJ tree. Gated the reactive on `$fileMetricsStore` so it only runs after datareader has completed. (#138)
Improvements
- File-format parity with dm2 — dm2 supports 5 alignment formats (FASTA, NEXUS, PHYLIP sequential+interleaved, MEGA, CLUSTAL) end-to-end via HyPhy. dm3's JS-side codon validation only recognized FASTA and NEXUS, so PHYLIP/MEGA/CLUSTAL files uploaded fine but failed at analysis-start with a confusing `Sequence data found before header` error. Two complementary fixes:
- `BaseAnalysisRunner.validateInput` now skips JS codon validation for non-FASTA/NEXUS input — matches dm2's "trust HyPhy" behavior.
- `datareader.bf` now always emits a canonical FASTA (`DATA_FILE_PRINT_FORMAT = 9`, not 6 which is NEXUS) that downstream code prefers for submission. Every analysis sees FASTA regardless of what the user uploaded. (#139)
- 28 new unit tests covering format detection and validation gating.
v0.1.0-beta.32
Bug Fixes
Resolves all four bugs from #135.
- Surface real errors instead of HTML-as-JSON parser noise — When HyPhy fails to produce a result file,
WasmAnalysisRunnerwas callingsafeParseJSONon a 404 HTML page and surfacing raw V8Unexpected token '<'errors (~290 events / 30 days). Guard against HTML responses and throw a clear "HyPhy analysis did not produce a result file" message instead. (#136) - Auto-switch tree source when no NJ tree is inferred —
selectedTreeSourcedefaulted to'inferred'even when the datareader didn't produce an NJ tree, so users hit "No NJ tree available" on Run Analysis (177 events / 30 days). Reactively switch to whichever source is actually available and tighten the error message when no fallback exists. (#136) - Pass numeric genetic code IDs instead of multi-word names — Aioli's
exec()does a plaincommand.split(' ')with no quote handling, so multi-word genetic code names like'Vertebrate mitochondrial'got split into--code Vertebrate+ a straymitochondrial, causing HyPhy to rejectVertebrateand consume the next option's value as a fallback (All,0.1,Source). Pass the numericgeneticCodeId(always single-token) instead, matching the backend's behavior. (#136) - Always include a message field on unknown validation errors — 338 of 342
unknownevents had nomessagepayload becauseerror.messagewas falsy. Fall back througherror.name→error.toString()→ sentinel so analytics always has something to work with. (#136)
v0.1.0-beta.31
Telemetry
- Capture raw message for
invalid-formatvalidation errors —invalid-formatis now the dominantfile-validation-errorbucket (52%), but the bucket alone doesn't distinguish between datareader.bf alphabet/structure errors, +page.svelte fallback messages, and FastaValidator parser errors. Attach a truncated raw message toinvalid-formatevents so we can split the bucket properly. (#134)
v0.1.0-beta.30
Improvements
- Expand
file-validation-errortelemetry classifier — 43% of file-validation errors were landing in theunknownbucket, hiding the actual failure modes from analytics. Added new buckets (wrong-alphabet,dataset-too-large,insufficient-sequences,runtime-error) and broadenedinvalid-formatto catch datareader.bf and FastaValidator messages that don't contain the literal word "format". The remainingunknownevents now include a truncated raw message so future slip-throughs are debuggable. (#133)
v0.1.0-beta.29
Bug Fixes
-
Fix codon validation checking ungapped length instead of alignment site count — The divisibility-by-3 check was stripping gap characters before measuring length, but HyPhy validates the total alignment column count (with gaps). Gapped alignments with non-divisible-by-3 column counts could bypass frontend validation and fail on SLURM. Now checks raw alignment site count. (#131, PR #132)
-
Add NEXUS format support in codon validation — NEXUS files previously produced confusing "Sequence data found before header" errors. Now properly parses NEXUS MATRIX blocks and validates codons. Extracted shared
parseNexus(),isNexusFormat(), andparseAlignment()utilities from FastaExport into fastaValidation.js.
No other gap-stripping-before-length-check patterns found elsewhere in the codebase.