diff options
| author | Pjotr <wrk@bosa.lan> | 2026-11-10 12:53:06 +0000 |
|---|---|---|
| committer | Pjotr <wrk@bosa.lan> | 2026-11-10 12:53:06 +0000 |
| commit | 7fa899b66f484593e36b175dc6daa5be1d03f2fd (patch) | |
| tree | ff6d341118a542be14462b2fdf44221fb60f1c24 /README.md | |
| parent | 2b41fc94a5e2b33a411d22721a6ee2a97ac9ae60 (diff) | |
| download | genenetwork4-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 'README.md')
| -rw-r--r-- | README.md | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/README.md b/README.md index bea4dbf..985d4f3 100644 --- a/README.md +++ b/README.md @@ -432,6 +432,40 @@ fails if any link does not answer 200. come the same way: `/groups/unlisted/genotypes/{name}/markers` (names) and `.../markers/{marker}/location` (position). +- `GET /probesets/{name}` - **every dataset that carries a probeset with this + name** (indexed on `ProbeSet.Name`): one row per dataset with the panel + (`group`, `species`, `platform`) and the probeset's mapping statistics + there (`chr`, `mb`, `mean`, `lrs`, `lod`, `locus`, `additive`). Suffixed + variants match too -- `1427571_at` also finds `1427571_at_A`, the older + chips -- and each row's `name` says which one it was, so the reply never + leaves you guessing. `?group=BXD`, `?species=mouse` and `?platform=M430` + (substring: there is no platform id in this schema) narrow it; `?page=` + and `?limit=` page it, and `notes` carries the count that matters. + + GET /probesets/1427571_at + → 155 rows over 155 datasets (Shh on chr5 28.46 Mb), e.g. + ["SA_M2_1104_R","BXD","mouse","Striatum_M430_V2_RMA_November04", + "1427571_at","Shh","5",28.4579,6.039,16.318,3.544, + "rs52243480",0.129] + + This is the lookup a probeset id needed: it is not a Xapian field, so + `/search` cannot answer it and the only alternative was guessing a dataset + and calling `/datasets/{dataset}/probesets/{name}`. + +- `GET /genes/{symbol}/traits` - the same rows, filtered on + `ProbeSet.Symbol` instead: **every expression trait of a gene, across + datasets**, with a real total (unlike `/search`'s capped list), grouped by + dataset, and `?sort=lod` / `?min_lod=` / `?group=` / `?species=` / + `?platform=` so "BXD datasets where Shh is a strong eQTL" is one call. + `GET /genes/Shh/traits?sort=lod` → 1 225 rows over 17 datasets and 13 + probesets, strongest first (`HXB_Liver_1208 / 1387584_at`, LOD 18.46). + + **Both serve metadata, not values.** A token buys the index; the values + are per dataset and authorized per dataset, and the `next` link goes to + `/datasets/{dataset}/probesets/{name}/values`, which checks. There is no + endpoint that returns values across datasets, deliberately: that is bulk + work and `/groups/{group}/traits` is the bulk call. + - `GET /groups/{group}/traits` - returns every published (phenotype) trait belonging to a group, the listing equivalent of `/groups/{group}/traits/{trait_id}` (same fields, same join, no |
