about summary refs log tree commit diff
path: root/test/python/test_groups.py
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-11-10 22:35:45 +0000
committerPjotr <wrk@bosa.lan>2026-11-10 22:35:45 +0000
commitb3811de4f2fb0e1d65ade757ad3ea992eb3f9f67 (patch)
treeaad2b1cb2b97f08e202f1931bcd590ecba408e56 /test/python/test_groups.py
parent62cc5f73cb94fe85c31a2f177d1d150e643e84b1 (diff)
downloadgenenetwork4-b3811de4f2fb0e1d65ade757ad3ea992eb3f9f67.tar.gz
traits: genotypes at a confirmed peak, and the plot of them
Returning genotypes is the one thing this API otherwise never does, so it
is fenced and the fence is the feature:

  GET /groups/{group}/traits/{trait_id}/peak-genotypes?marker=<marker>

  * the server re-runs the R/qtl scan for the trait -- the same machinery
    and gate as /compute/rqtl -- and takes the peak from that run, rather
    than trusting a client that names a marker;
  * the marker must lie within ?window= Mb of that peak (default 10), or
    the answer is 422 not_the_peak quoting the peak's marker, chromosome,
    Mb and LOD;
  * the peak must reach ?min_lod= (default 3), or 422 not_a_hit;
  * only animals that have a value for the trait are listed, and only
    this marker's calls. Nothing else of the matrix leaves.

On DOL 10003 that is UNCHS026345 (chr9 75.76 Mb, LOD 5.86) with 192 animals
across A 110 / B 8 / H 74 -- the two a class of eight being exactly the
thing worth seeing.

POST /plot/genotypes draws R/qtl's Fig 4.1 from it: post the reply's
`animals` (or its `genotypes` map) with the trait's values and get an SVG
with one point per animal, genotype class across, value up, class means
marked. Nothing is recomputed -- the plot is of the numbers the client
sends, like the other plots. New script scripts/plot-genotypes.py
(stdlib-only SVG, like its siblings) and the GENOTYPE_PLOTTER key.

tests/peakgenotypes.rs: the peak's calls for animals with values (with the
counts agreeing with the rows), the SVG, and a marker on another
chromosome refused with the peak quoted.

Also keeps /compute/rqtl's error order: naming both a group and a file is
"ambiguous" even when the request also forgot its values.
Diffstat (limited to 'test/python/test_groups.py')
0 files changed, 0 insertions, 0 deletions