about summary refs log tree commit diff
path: root/test/python/server_test_case.py
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-11-09 16:41:34 +0000
committerPjotr <wrk@bosa.lan>2026-11-09 16:41:34 +0000
commit971a619fd28e247bf89057c0a72d1b4f51272a31 (patch)
tree4b632d6eb4f09e89303a59713d26953b8a566b5e /test/python/server_test_case.py
parentc642f87fb33a41032c4af5fda38e6434c2251aae (diff)
downloadgenenetwork4-971a619fd28e247bf89057c0a72d1b4f51272a31.tar.gz
rqtl: map the cM-only genotype files
44 of this deployment's `.geno` files carry `cM` and no `Mb` column, and
none of them could be scanned. GeneNetwork3's wrapper (copied verbatim
here) assumes the position columns are `Chr, Locus, cM, Mb` and then starts
the samples at a hardcoded column 5. On a cM-only file that is one column
too far, so the genotype block loses its first individual and the whole scan
dies in `do.call(rbind, ...)` with "number of columns of result is not a
multiple of vector length" -- a message that says nothing about the cause.

The wrapper now picks the map column from whichever of the requested scale
and the file's own columns exists (falling back, and saying so), and starts
the samples right after the position columns; the sex default and the
sample-count guard use the same count. `scripts/qtl_fitqtl.R` had the same
assumption and got the same fix.

This is the second deliberate deviation from GeneNetwork3's script, after
the sample-count guard, and both are commented as such at the code.

* scripts/rqtl_wrapper.R, scripts/qtl_fitqtl.R: the position column and the
  first sample column are computed, not assumed.
* tests/test_data/rqtl_sample1_cm.geno: the existing fixture with `Mb`
  dropped -- same panel, cM only.
* tests/rqtl.rs: `a_cm_only_genotype_file_maps` scans it and asserts all six
  markers come back (the failure mode was five-vs-six columns, not an
  error message that pointed at the genotype file).
* src/rqtl.rs, src/routes/rqtl.rs: the docs said the script never forwards
  `--scale`; it does, and now falls back, so the request field says what
  `pos` is in.

Verified through the API: DGRP (cM-only) now maps (3 markers), and AXB (499
markers) and BXD.4 (3 811) are unchanged.

307 tests pass; the same four as before do not.
Diffstat (limited to 'test/python/server_test_case.py')
0 files changed, 0 insertions, 0 deletions