Skip to content

Releases: veg/datamonkey3

v0.1.0-beta.38 — AxoMEME 2.0 browser inference (Beta)

Choose a tag to compare

@stevenweaver stevenweaver released this 10 Aug 21:35

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

v0.1.0-beta.37 Pre-release
Pre-release

Choose a tag to compare

@stevenweaver stevenweaver released this 16 Jul 22:42

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

v0.1.0-beta.36 Pre-release
Pre-release

Choose a tag to compare

@stevenweaver stevenweaver released this 14 Jul 19:21

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 nrm job handler and the hyphy-analyses NucleotideNonREV/NRM.bf batch file.
    • WASM: NRM.bf is a hyphy-analyses custom analysis not packed into the HyPhy WASM image, so it is vendored under static/hyphy-analyses/ and mounted into the WASM filesystem at runtime (all of its LoadFunctionLibrary dependencies are already present in the packed image). A new CUSTOM_ANALYSIS_BATCH_FILES registry makes adding future custom analyses a one-line change.

    Parameters: rate classes (1–10, default 1) and triple islands (Yes/No). (#93)

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

v0.1.0-beta.35 Pre-release
Pre-release

Choose a tag to compare

@stevenweaver stevenweaver released this 14 Jul 17:31

Fixes

  • Fix interactive branch-selection sending an invalid --branches value 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 (branches instead of branchesToTest), also silently ignoring the selection.

    All five single-test-set methods (FEL / SLAC / BUSTED / aBSREL / PRIME) now share one correct Interactive → FG mapping. Built-in sets (All/Internal/Leaves/Unlabeled) pass through unchanged; tag-based methods (RELAX, Contrast-FEL) were verified unaffected. (#141, #142)

Cleanup

  • Remove dead legacy options components (MethodOptionsTab.svelte, FelOptions.svelte, SlacOptions.svelte, and the FEL story) — the live UI uses MethodSelector.svelte. (#142)

Tests

  • Add branch-selection-mapping.test.js covering the Interactive → FG conversion, built-in pass-through, and defaults for all affected methods.

v0.1.0-beta.34

v0.1.0-beta.34 Pre-release
Pre-release

Choose a tag to compare

@stevenweaver stevenweaver released this 09 Jun 01:14

Telemetry

  • Add stage and source fields to file-validation-error — file-validation errors now carry which awaited step in handleFileUpload threw ('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

v0.1.0-beta.33 Pre-release
Pre-release

Choose a tag to compare

@stevenweaver stevenweaver released this 09 Jun 00:58

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:
    1. `BaseAnalysisRunner.validateInput` now skips JS codon validation for non-FASTA/NEXUS input — matches dm2's "trust HyPhy" behavior.
    2. `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

v0.1.0-beta.32 Pre-release
Pre-release

Choose a tag to compare

@stevenweaver stevenweaver released this 08 Jun 23:29

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, WasmAnalysisRunner was calling safeParseJSON on a 404 HTML page and surfacing raw V8 Unexpected 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 — selectedTreeSource defaulted 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 plain command.split(' ') with no quote handling, so multi-word genetic code names like 'Vertebrate mitochondrial' got split into --code Vertebrate + a stray mitochondrial, causing HyPhy to reject Vertebrate and consume the next option's value as a fallback (All, 0.1, Source). Pass the numeric geneticCodeId (always single-token) instead, matching the backend's behavior. (#136)
  • Always include a message field on unknown validation errors — 338 of 342 unknown events had no message payload because error.message was falsy. Fall back through error.name → error.toString() → sentinel so analytics always has something to work with. (#136)

v0.1.0-beta.31

v0.1.0-beta.31 Pre-release
Pre-release

Choose a tag to compare

@stevenweaver stevenweaver released this 02 Jun 20:23

Telemetry

  • Capture raw message for invalid-format validation errors — invalid-format is now the dominant file-validation-error bucket (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 to invalid-format events so we can split the bucket properly. (#134)

v0.1.0-beta.30

v0.1.0-beta.30 Pre-release
Pre-release

Choose a tag to compare

@stevenweaver stevenweaver released this 01 Jun 20:08

Improvements

  • Expand file-validation-error telemetry classifier — 43% of file-validation errors were landing in the unknown bucket, hiding the actual failure modes from analytics. Added new buckets (wrong-alphabet, dataset-too-large, insufficient-sequences, runtime-error) and broadened invalid-format to catch datareader.bf and FastaValidator messages that don't contain the literal word "format". The remaining unknown events now include a truncated raw message so future slip-throughs are debuggable. (#133)

v0.1.0-beta.29

v0.1.0-beta.29 Pre-release
Pre-release

Choose a tag to compare

@stevenweaver stevenweaver released this 08 May 19:26

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(), and parseAlignment() utilities from FastaExport into fastaValidation.js.

No other gap-stripping-before-length-check patterns found elsewhere in the codebase.