about summary refs log tree commit diff
path: root/docs
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-11-13 13:27:06 +0000
committerPjotr <wrk@bosa.lan>2026-11-13 13:27:06 +0000
commite552bb6407718c986123e574a59494ca6184f2e2 (patch)
tree8543d8f5fd3277525cc9685e65913dae30012201 /docs
parentd9e1bf7fd9da4e0bae6579b95fd0028296b997ac (diff)
downloadgenenetwork4-e552bb6407718c986123e574a59494ca6184f2e2.tar.gz
plot/bnw: two SVG figures, drawn the way /plot/gemma draws one
Post the reply from /compute/bnw back and get an SVG: the same plumbing as
/plot/gemma and /plot/bulklmm (plot::render, PLOT_PYTHON + BNW_PLOTTER, image/
svg+xml, the plotter's line in x-plot-summary), nothing recomputed.

Two figures, because one cannot say what the other can:

  * the network (default): nodes on a circle, one arrow per edge that survived
    the threshold, arrow width and label = the edge's posterior, and the
    below-threshold edges as faint dotted lines -- so a reader sees what was
    *considered* as well as what survived, which is half of why the posterior
    table exists;
  * ?kind=posterior: every candidate edge as a cell in a matrix, dark = high
    posterior, outlined cells are the ones above the threshold.  The diagram
    cannot show that an edge came within 0.02 of the threshold; this can.

Pure-Python SVG, standard library only: no graphviz in the deployment.  A
circular layout is less pretty than a force-directed one and is deterministic,
which matters more for a figure that accompanies a JSON result.  Node labels
keep the distinguishing tail of a long id, with the full name beside the node.

Verified live on the dev instance: POST /plot/bnw with a saved /compute/bnw
reply returns 200, image/svg+xml, 5 256 bytes, and x-plot-summary naming the
strongest edge (Trait2 -> Trait1, posterior 1.000); ?kind=posterior returns the
second figure.  tests/plot.rs covers both figures plus the 422s (not a BNW
result, unknown kind).
Diffstat (limited to 'docs')
-rw-r--r--docs/www/SKILL.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/www/SKILL.md b/docs/www/SKILL.md
index bb8bd3e..b14d08e 100644
--- a/docs/www/SKILL.md
+++ b/docs/www/SKILL.md
@@ -160,7 +160,10 @@ header (peak, and the reference lines drawn when you asked for them).
   this sample, so quote it as a structural claim and never as a threshold on a
   QTL. Parameters default to BNW's own (maxparents 4, k 1, tiers 3, threshold
   0.5) and the reply names the ones used. At most 40 variables, at least 3
-  samples complete across every variable.
+  samples complete across every variable. `POST /plot/bnw` draws it from the
+  posted reply — the network by default, `?kind=posterior` for the matrix of
+  every candidate edge (arrow width and label are the posterior; dotted lines
+  are edges that did not clear the threshold).
 * `/compute/fitqtl`: **how big** an effect is, not just where. Give it the
   marker names a scan found (its peaks) and it fits R/qtl's `fitqtl` at
   each: columns `marker, chr, pos, lod, pct_var, additive, se, t, p`. Use it