about summary refs log tree commit diff
path: root/scripts/plot-genotypes.py
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-11-10 22:12:29 +0000
committerPjotr <wrk@bosa.lan>2026-11-10 22:12:29 +0000
commit62cc5f73cb94fe85c31a2f177d1d150e643e84b1 (patch)
treef49d5cd0c3a62dd26bdbd5e022b8b6e9a1f0654c /scripts/plot-genotypes.py
parent0253fa66f2ef464d56324c27ba51cec1e27e3108 (diff)
downloadgenenetwork4-62cc5f73cb94fe85c31a2f177d1d150e643e84b1.tar.gz
uploads: every engine maps an upload by name; same name replaces
Two things asked for, and one bug each.

  * POST /uploads/genotypes with an existing name now REPLACES it. A
    genotype is the user's file to keep, not a record the deployment
    curates; the digest in every reply says which version ran.
  * genotype_upload on all four engines -- /compute/{rqtl,gemma,qtl2,
    fitqtl} -- in place of genotype_file/group. The server writes the
    form each engine reads: a GN .geno for R/qtl and R/qtl2, a BIMBAM
    pair (new: genoupload::to_bimbam, coding from the base's
    @mat/@het/@pat, NA for missing, snps as marker/bp/chr) for GEMMA. No
    user path travels with a request.

Verified against the full 3811-marker BXD.4 matrix uploaded as an update:
rqtl 3811 rows, gemma 3809, qtl2 3730, fitqtl by marker.

The bug worth naming: values given by name were being aligned against a
file, and for GEMMA that file is BIMBAM, which has no individual names --
so the phenotype file came out empty and the wrapper failed with a Ruby
backtrace that said nothing. GEMMA's values are now ordered by the
upload's own individual list before the pair is written. The related
fixes: rqtl and fitqtl align named values onto the file's individuals
(they previously demanded its column order), and genotypes::align_to_file
is the one place that does it.

tests/genoupload.rs: mapping an upload on rqtl/qtl2/fitqtl with values by
name, and replacing a name (one row in the listing, a new digest). GEMMA's
LOCO kinship needs more markers per chromosome than a small fixture has,
so it is exercised against a full panel rather than in the fixture.
Diffstat (limited to 'scripts/plot-genotypes.py')
0 files changed, 0 insertions, 0 deletions