about summary refs log tree commit diff
path: root/test/python/test_version.py
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-11-07 17:56:57 +0000
committerPjotr <wrk@bosa.lan>2026-11-07 17:56:57 +0000
commitb6c5538bc2bf1166ba176a0d80966c04229854ad (patch)
treed8f4ebd200971105504e64532fdb8753d96a999e /test/python/test_version.py
parent2e3f0845d789f624f9e974af0595639d96cc1279 (diff)
downloadgenenetwork4-b6c5538bc2bf1166ba176a0d80966c04229854ad.tar.gz
compute: suggest 100 permutations after a scan, and say what GEMMA can do
A scan gives LOD scores; the thresholds that make them readable come from
permuting the phenotype, which R/qtl supports (nperm) and this API
already ran -- but nothing told a caller to run it. So an unpermuted
R/qtl scan now ends with the same scan at nperm=100 in `actions` (a POST,
so not a `next` link), rebuilt from what actually ran: group + version +
the caller's own named samples, or the genotype file. The description
says what the thresholds are for and that it costs about 100 scans.

GEMMA is the honest half: it has no permutation test, and this endpoint
passes it nothing that would create one, so there is no nperm to suggest.
Its response says so in a note -- judge a peak against the smallest
p_lrt, not a genome-wide threshold -- and its `actions` suggests the
R/qtl permutation run over the same group and values instead. That is
real and runnable rather than a flag that would do nothing.
(gemma-wrapper does have `--permutate n`, which shuffles the phenotype
file and writes a permutation-stats file; wiring it up is a separate
job -- docs/genotypes.md and the README say it is not passed.)

* src/routes/rqtl.rs: the nperm=100 suggestion when nperm was 0, built
from the request that ran (original named samples, not the aligned
panel-length vector -- thousands of entries on a real panel).
* src/routes/gemma.rs: the note, and the cross-engine suggestion.
* tests/rqtl.rs: a path-based scan's suggestion reuses the same files.
* tests/phewas.rs: a group-scoped scan suggests both -- the PheWAS in
`next` (resolved) and the permutation run in `actions`.
* README.md, docs/www/ai-instruction.md (4a): what thresholds are, that
R/qtl offers them and GEMMA does not, and what to do about it.
Diffstat (limited to 'test/python/test_version.py')
0 files changed, 0 insertions, 0 deletions