From b223757bb5c04d03be5ccccf32488594134bb542 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 22 Nov 2026 18:45:52 +0000 Subject: rqtl: the rows are `data`, and the permutation null is meta.permutation Every compute endpoint kept its rows in `data` except this one, which put them under `data.markers` beside `data.permutation`. A script written from SKILL.md ("rows are positional") broke on the first scan it read, and the same script had to special-case both shapes -- measured in Rob Williams's test drive of the release service. `data` is now the marker array (positional, `meta.columns` names the columns, as /compute/gemma and /compute/qtl2 already did), and the permutation null goes to `meta.permutation`, where Meta's own documentation says endpoint-specific qualifier information belongs. /plot/rqtl and scripts/plot-rqtl.py accept both shapes, so a saved reply from an older build still plots. --- scripts/plot-rqtl.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/plot-rqtl.py b/scripts/plot-rqtl.py index 73d8c51..b24a14f 100644 --- a/scripts/plot-rqtl.py +++ b/scripts/plot-rqtl.py @@ -28,8 +28,13 @@ def main(): if "data" not in doc: sys.exit(f"{a.result}: no 'data' member (error response?): {str(doc)[:200]}") res = doc["data"] - rows = res["markers"] # [name, chr, pos_mb, lod] - perm = res.get("permutation") + # `data` is the marker array itself (a reply from before that change kept + # it under `data.markers`), and the permutation null sits beside it in + # meta; older replies carried it inside data. + rows = res if isinstance(res, list) else res["markers"] + perm = (doc.get("meta") or {}).get("permutation") or ( + res.get("permutation") if isinstance(res, dict) else None + ) thr = [] # (value, label, dash) if perm: thr = [(perm["significant"], "significant (95%)", "7 4"), -- cgit 1.4.1