about summary refs log tree commit diff
path: root/test/python/test_openapi.py
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-11-10 12:53:06 +0000
committerPjotr <wrk@bosa.lan>2026-11-10 12:53:06 +0000
commit7fa899b66f484593e36b175dc6daa5be1d03f2fd (patch)
treeff6d341118a542be14462b2fdf44221fb60f1c24 /test/python/test_openapi.py
parent2b41fc94a5e2b33a411d22721a6ee2a97ac9ae60 (diff)
downloadgenenetwork4-7fa899b66f484593e36b175dc6daa5be1d03f2fd.tar.gz
probesets: cross-dataset lookups by probeset id and by gene symbol
A probeset id is not a Xapian field, so /search cannot find 1427571_at
exactly and the only route to it was guessing a dataset and calling
/datasets/{ds}/probesets/{name} until one answered. A gene symbol could
be searched, but the reply was capped at 100 hits, interleaved probesets
and platforms, and carried no total -- so "did I see all of Shh?" had no
answer. Both questions are one indexed query each: ProbeSet.Name_IDX and
symbol_IDX.

  * GET /probesets/{name}: one row per dataset that carries the probeset,
    with the panel (group, species, platform) and the scan's statistics
    (mean, LRS, LOD, locus, additive). Suffixed chip variants match too
    -- 1427571_at also finds 1427571_at_A -- and each row's `name` says
    which matched, so the answer never hides a substitution. LIKE's
    wildcards are escaped, or every Affymetrix `_at` would match any
    character. 155 rows over 155 datasets in 32 ms.
  * GET /genes/{symbol}/traits: the same rows filtered on Symbol, with a
    real total, ?sort=lod, ?min_lod=, ?group=, ?species=, ?platform= and
    paging -- "BXD datasets where Shh is a strong eQTL" is one call.
    1225 rows over 17 datasets and 13 probesets in 38 ms.
  * Both serve metadata, not values. A token is enough for the index;
    trait values stay per-dataset and authorized per dataset, and `next`
    goes to /datasets/{ds}/probesets/{name}/values, which checks. There
    is no cross-dataset values endpoint, deliberately: that is bulk work
    and /groups/{g}/traits is the bulk call.

The one-statement join took 5.2 s for Shh -- MySQL rescans
InbredSet/Species per row -- so the 933 ProbeSetFreeze rows and the 102
panels are fetched separately and joined in memory: 70 ms each. nsamples
is left out: it is a ProbeSetData count per row (+0.5 s) and the dataset
record already reports strains.
Diffstat (limited to 'test/python/test_openapi.py')
0 files changed, 0 insertions, 0 deletions