about summary refs log tree commit diff
path: root/src/gemma.rs
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-10-11 20:07:40 +0000
committerPjotr <wrk@bosa.lan>2026-10-11 20:07:40 +0000
commit53ae1b4cbf8bd68278e7a59cd41a4c145f8362ab (patch)
treed173a0648fa4b3726fc3b365920141103420ae0b /src/gemma.rs
parent9e03cf40b875790c19d3fa1623297841b72b553e (diff)
downloadgenenetwork4-53ae1b4cbf8bd68278e7a59cd41a4c145f8362ab.tar.gz
gemma: default lmm to 9, matching GeneNetwork's own convention
GeneNetwork2 (wqflask/marker_regression/gemma_mapping.py) and gn-guile
(gn/runner/gemma.scm) both always use -lmm 9 in their working --loco
invocations. Checked by running it: gemma-gn2 accepts 9 fine, and the
resulting .assoc.txt carries p_lrt, not p_wald -- some mapping other
than stock GEMMA's 1-4 scale, not independently verified here, but
consistent with what both of those codebases rely on in production.

Widened validation from a 1-4 range to the explicit set {1, 2, 3, 4,
9}: 9 is now known-good, but 5-8 remain untested and stock-invalid, so
they're still rejected rather than guessed at.

Updated the real end-to-end test to assert on p_lrt (what lmm=9
actually produces) instead of p_wald, and moved the
out-of-range-lmm test from 9 (now valid) to 5.

Verified: cargo test passes in full, including the real gemma-wrapper/
GEMMA run against the BXD fixtures with the new default.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'src/gemma.rs')
-rw-r--r--src/gemma.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gemma.rs b/src/gemma.rs
index b1f17ed..eee16b6 100644
--- a/src/gemma.rs
+++ b/src/gemma.rs
@@ -215,8 +215,10 @@ fn assoc_file_basenames(record: &Value) -> Vec<&str> {
 }
 
 /// One row of a GEMMA `.assoc.txt` file, keyed by its header column
-/// names. Columns vary with `-lmm` (1/2/3 run one test; 4 runs all
-/// three), so this stays a generic map rather than a fixed struct.
+/// names. Columns vary with `-lmm` (stock 1/2/3 run one test, 4 runs
+/// all three; this build's `9`, GeneNetwork's convention, was observed
+/// to carry `p_lrt`), so this stays a generic map rather than a fixed
+/// struct.
 pub type AssocRow = serde_json::Map<String, Value>;
 
 /// Parse a GEMMA `.assoc.txt` file (tab-separated, header row first)