diff options
| author | Pjotr Prins <pjotr.public01@thebird.nl> | 2026-11-27 11:22:38 +0000 |
|---|---|---|
| committer | Pjotr Prins <pjotr.public01@thebird.nl> | 2026-11-27 11:22:38 +0000 |
| commit | cd9f46633bcc55ab2a72cda1a0f1a667e79c2e57 (patch) | |
| tree | e56b04e85f9d69b28695ed57345c1dff28d8d14c /scripts/plot-rqtl.py | |
| parent | f76043bf82b6c86b5e844b27b53e957d770aeb33 (diff) | |
| parent | 4f609454ba5b8db543863d6f20b042ca15cfe99f (diff) | |
| download | genenetwork4-cd9f46633bcc55ab2a72cda1a0f1a667e79c2e57.tar.gz | |
Merge branch 'main' into search/extract-engine-merge
Diffstat (limited to 'scripts/plot-rqtl.py')
| -rw-r--r-- | scripts/plot-rqtl.py | 9 |
1 files changed, 7 insertions, 2 deletions
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"), |
