about summary refs log tree commit diff
path: root/scripts/plot-pca.py
diff options
context:
space:
mode:
authorPjotr Prins <pjotr.public01@thebird.nl>2026-11-19 11:41:28 +0000
committerPjotr Prins <pjotr.public01@thebird.nl>2026-11-19 11:41:28 +0000
commit6bd032d565233016f2c658840ab2769cf2359fe2 (patch)
tree6d7e10b9733fa761a8849b5737e7e1f90ffe90cd /scripts/plot-pca.py
parent84de1f715cc013465efd7f6876e3ed5f7ffc2a3d (diff)
downloadgenenetwork4-6bd032d565233016f2c658840ab2769cf2359fe2.tar.gz
gemma: /compute/gemma runs the Slurm route, and the wrapper is its fallback
Slurm is now the default engine (GEMMA_ENGINE=slurm) because a ravanan step
is keyed on (script, inputs) and the K matrix is one of those inputs, while
gemma-wrapper keys its GWA cache on the phenotype file and the chromosome
alone.  Measured on BXD.8 (198 strains, lmm 9, synthetic trait 4242): with a
stale chr1 LOCO K left in the wrapper's cache, 2060 of 21055 rows disagreed
with both Slurm routes -- gemma through ravanan and pangemma on lmdb -- and
clearing that GWA entry made all three agree cell for cell.  A rebuilt K can
therefore leave stale association rows behind on the wrapper path, and
cannot on the Slurm one.

compute_gemma_ravanan's body moved into gemma_via_ravanan(...),
parameterised by the endpoint name it reports in errors and claims, so
/compute/gemma calls it first and keeps its own body as the fallback.  Only a
5xx falls back: Slurm or ravanan unreachable, or the engine exiting
non-zero.  A 4xx is the caller's error and is returned as such, and a
numerical disagreement never falls back, because that would hide a
regression behind an answer from the other engine.  The fallback takes a
fresh light claim -- the first went with the Slurm attempt -- and adds an
"Engine: the Slurm route was unavailable (<status> <code>), so this answer
comes from the local gemma-wrapper run instead" note, so a reply says which
engine produced it.

Clone derives on ComputeGemmaParams, GemmaRequest and GemmaSample, and a
Clone impl for Ctx: a request id and a start instant, so a clone is another
handle on the same request.

Validated on two scratch instances of the built tree against the live
database: :3002 answers warm from ravanan in 3.79 s, and :3003 with
RAVANAN_SLURM_API_ENDPOINT pointed at a dead port answers 200 in 21.38 s
from the local wrapper, with the note naming "502 gemma_failed", on 21055
rows identical to the Slurm answer.
Diffstat (limited to 'scripts/plot-pca.py')
0 files changed, 0 insertions, 0 deletions