about summary refs log tree commit diff
path: root/docs
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-11-07 15:33:28 +0000
committerPjotr <wrk@bosa.lan>2026-11-07 15:33:28 +0000
commit2fcb57a627ed261b6650522b256cc509ebd65ddd (patch)
treedc356cc6fa962a3ec89eb393dbd9a0f4b15ca2fd /docs
parente5c333959af6675a0d80934c8cf76275d5571ef8 (diff)
downloadgenenetwork4-2fcb57a627ed261b6650522b256cc509ebd65ddd.tar.gz
rqtl: refuse a phenotype whose sample count is not the cross's
Asked to map a 9-strain trait, the wrapper scanned it against the
6-individual fixture cross and returned six markers with LOD scores and
`state: complete` -- a plausible answer belonging to nobody. R recycled
and truncated the values silently, and nothing downstream could tell.
GeneNetwork3's copy of this script has the same hole.

The cross-file format carries no per-sample names, so the count is the
only check available; order remains the caller's responsibility (and the
reason values and genotype file must come from the same panel). With the
check, the same request is a 502 rqtl_failed quoting both counts, and the
correctly-shaped request still returns the documented LODs.

* scripts/rqtl_wrapper.R: compare the pheno file's rows with nind() of
the cross, and stop.
* README.md (/compute/rqtl): the second fix relative to gn3, and what
stays the caller's job.
* docs/www/ai-instruction.md (4a): values and genotypes must describe the
same individuals, one for one, in the same order.
* docs/www/operator-checklist.md (Compute): what genotype files actually
exist on this box (test fixtures, 198 BXD individuals) and why a database
trait, with its own strain subset, cannot be mapped against them.
Diffstat (limited to 'docs')
-rw-r--r--docs/www/ai-instruction.md9
-rw-r--r--docs/www/operator-checklist.md12
2 files changed, 21 insertions, 0 deletions
diff --git a/docs/www/ai-instruction.md b/docs/www/ai-instruction.md
index e59ce2a..0c8bfb4 100644
--- a/docs/www/ai-instruction.md
+++ b/docs/www/ai-instruction.md
@@ -266,6 +266,15 @@ deployment already holds. You cannot upload a genotype file, and you
 should not go looking for one: ask the operator which paths the
 deployment uses for the panel you are working on.
 
+The values and the genotype file have to describe the **same
+individuals, in the same order, one for one**. Both engines match them by
+position, not by name. Get that wrong and the computation is meaningless;
+GEMMA refuses outright, and R/qtl now refuses too rather than returning
+plausible-looking numbers for the wrong strains. So: use the values from
+the values endpoint and the genotype file the deployment pairs with that
+panel — never a genotype file from a different panel, and never a
+hand-built trait vector.
+
 Results are **cached** by input, so running the same request twice costs
 little the second time (a cached GEMMA run on the BXD fixtures comes back
 in ~2 s against ~20 s cold). That is another reason not to compute
diff --git a/docs/www/operator-checklist.md b/docs/www/operator-checklist.md
index dc02d5a..6d4e18d 100644
--- a/docs/www/operator-checklist.md
+++ b/docs/www/operator-checklist.md
@@ -132,6 +132,18 @@ PATH=$P/bin:$PATH R_LIBS_SITE=$P/site-library/ genenetwork4 …other env…
   fails with `rqtl_failed` and `there is no package called 'optparse'`
   — an environment problem, not a token or proxy problem.
 
+What genotype files exist is a deployment question, and today the only
+ones on this box are the test fixtures in `tests/test_data/`:
+`BXD_geno.txt.gz` (198 BXD individuals × 7 320 markers), `BXD_snps.txt`
+(the marker map) and `rqtl_sample1.geno` (a 6-individual cross). They are
+fixtures, not a panel-matched dataset: a database trait has its own
+strain subset (BXD traits typically ~10–35 of the 198), and both engines
+match values to individuals **by position**, so mapping such a trait
+against the full 198-individual file is wrong by construction. Until the
+deployment ships genotype files subset to a trait's strains (or the team
+says which panel file pairs with which trait), real mappings should not
+be offered — the fixtures are for smoke tests and for the test suite.
+
 `/compute/gemma/ravanan` additionally needs `ravanan` and `ccwl` on
 `PATH`, and with `RAVANAN_BATCH_SYSTEM=slurm-api` a reachable slurmrestd
 (see `docs/ravanan-slurm.md`).