diff options
| author | Pjotr <wrk@bosa.lan> | 2026-11-09 11:52:57 +0000 |
|---|---|---|
| committer | Pjotr <wrk@bosa.lan> | 2026-11-09 11:55:25 +0000 |
| commit | de07aabd384d3adabf2b095b0a76a09efd81de45 (patch) | |
| tree | a9655dcca7f849a8f77c82c5eca3963c993b239b /test/python/server_test_case.py | |
| parent | 731e085c42e22104f4cba9975a33f5d22b058caf (diff) | |
| download | genenetwork4-de07aabd384d3adabf2b095b0a76a09efd81de45.tar.gz | |
plot: say which trait a plot is, not just draw it
Two traits over the same panel really do draw two different pictures --
verified on BXD.4, where all 20 chromosomes' polylines differ and the peaks
are LOD 2.93 at chr8 69.4 Mb (mCV24409492) against LOD 4.78 at chr8
95.7 Mb (rs3666069) -- but you could not tell from the title: every plot
came out headed **"trait rqtl: LOD along the genome"**, because
`/plot/rqtl` labelled it from `?trait=` and nothing else, defaulting to
"rqtl". The only visible difference was the peak annotation, and a caller
posting the saved response back (which is the documented way) could not
know the label was missing.
The response now names what it mapped: `/compute/rqtl` writes `Trait:
<name>` as its **first** note, and `/plot/rqtl` and `/plot/gemma` take the
title's label from that note when `?trait=` was not given. The
`POST /plot/rqtl` suggestion in `actions` also carries `?trait=`, so a
caller that posts only `data` still gets the right title.
* src/routes/rqtl.rs: the `Trait:` note, ahead of the column note; the
plot suggestion's href names the trait.
* src/routes/plot.rs: `trait_from_document`, used by both plot endpoints.
* tests/plot.rs: `two_traits_draw_two_different_plots` -- two canned
responses differing only in LOD, asserting each title names its own
trait from its own note, each annotates its own peak and not the
other's, and every polyline differs. That is the regression this is
about: a plot that reused anything between requests would draw the
first trait's shape for the second.
* tests/{rqtl,phewas}.rs: the plot suggestion is now matched by prefix,
with the trait asserted.
* README.md, docs/www/ai-instruction.md: where the title comes from, and
to post the whole response (or add `?trait=`) if you post only `data`.
Diffstat (limited to 'test/python/server_test_case.py')
0 files changed, 0 insertions, 0 deletions
