diff options
| author | Pjotr <wrk@bosa.lan> | 2026-11-07 17:10:28 +0000 |
|---|---|---|
| committer | Pjotr <wrk@bosa.lan> | 2026-11-07 17:10:28 +0000 |
| commit | 18d18b1c125c06dd67dcf54ccbd89eb128643737 (patch) | |
| tree | efefbdc30000ff459a46457239bc9fb01035d642 /README.md | |
| parent | 1f61f8f86443de6353295f7363abbe1c986d863f (diff) | |
| download | genenetwork4-18d18b1c125c06dd67dcf54ccbd89eb128643737.tar.gz | |
genotypes: expose the metadata, never the genotype calls
The listing named versions but not files; a caller could pick one and
still not see what was in it. Three token-gated routes now describe a
version completely, short of the matrix:
GET /groups/{group}/genotypes versions, files, sizes, current
GET /groups/{group}/genotypes/{version} file name, header labels,
individuals, strains, chromosomes
GET /groups/{group}/genotypes/{version}/markers markers (name, chr, cM, Mb), paged
The detail reads the file's own `@`-labels (type, mat, pat, het, unk,
scale) and its panel in column order, and reports both the whole panel
and the strains a mapping uses after the parents/F1s rule -- so a caller
can check a request before sending it and interpret a result after.
Markers come back as positional rows with `meta.columns`, paged with
`?page`/`?limit` and filterable with `?chr`, following /compute/gemma's
shape rather than inventing one.
The genotype calls stay on the server: file_meta() reads the matrix to
skip it, and nothing returns a cell.
* src/genotypes.rs (Marker, FileMeta, file_meta; GenotypeFile::file):
header labels, individuals and marker positions; unit test.
* src/routes/genotypes.rs: the two new handlers, token-gated like the
listing, plus `file` in the listing and counts in the detail.
* tests/genotypes.rs: the listing carries file names but no paths.
* README.md, docs/genotypes.md, docs/www/ai-instruction.md: what the
three routes give, and that the matrix is not among them.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/README.md b/README.md index 9c33cb1..a134131 100644 --- a/README.md +++ b/README.md @@ -315,16 +315,27 @@ Details, including example responses, below. ``` - `GET /groups/{group}/genotypes` - the genotype files this group can be - mapped with, newest first: each `version` (e.g. `BXD.8`), the panel's - `title`, `individuals`, `markers`, whether `gemma` and `rqtl` can run on - it, and which one is `current` (what a mapping request gets by - default). Files and paths stay server-side -- this names versions, not - locations -- and `POST /compute/rqtl` / `/compute/gemma` take `group` - plus an optional `genotype_version` instead of paths. The order comes - from the deployment's `genotype/<group>.json`, whose `genofile` list is + mapped with, newest first: each `version` (e.g. `BXD.8`), the `file` + name (`BXD.8.geno`), the panel's `title`, `individuals`, `markers`, + whether `gemma` and `rqtl` can run on it, and which one is `current` + (what a mapping request gets by default). The order comes from the + deployment's `genotype/<group>.json`, whose `genofile` list is newest-first, the same rule GeneNetwork2 uses; groups with no JSON (HET3-ITP) fall back to the highest version number and the listing's - `notes` says so. See [docs/genotypes.md](docs/genotypes.md). + `notes` says so. `POST /compute/rqtl` / `/compute/gemma` take `group` + plus an optional `genotype_version` instead of paths. + + `GET /groups/{group}/genotypes/{version}` is the metadata of one of + them: the file name, the header's own `@`-labels (`type`, `mat`, + `pat`, ...), the panel's `individuals` in file order and the `strains` + a mapping actually uses (parents/F1s dropped), `num_individuals`, + `num_strains`, `markers`, and per-chromosome marker counts. + `GET /groups/{group}/genotypes/{version}/markers?page=&limit=&chr=` is + the marker table -- name, chromosome, cM, Mb -- paged, positional rows + like `/compute/gemma`'s. So a caller can see the panel, the markers and + the header it is mapping against; the **genotype calls themselves are + never served**, only summaries of them. See + [docs/genotypes.md](docs/genotypes.md). - `GET /groups/{group}/traits` - returns every published (phenotype) trait belonging to a group, the listing equivalent of |
