about summary refs log tree commit diff
path: root/scripts/plot-compare.py
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-11-17 10:25:14 +0000
committerPjotr <wrk@bosa.lan>2026-11-17 10:25:14 +0000
commit2df90559ca597c0d35daf68e8648f8a46c823787 (patch)
tree8271acf86c37f3750a18e92682d0d0c6b17f2cfc /scripts/plot-compare.py
parentbce93d3deedfc4f0a00a931b1b06ee1c9e8520d1 (diff)
downloadgenenetwork4-2df90559ca597c0d35daf68e8648f8a46c823787.tar.gz
impute=hmm runs now: individuals from rownames, and a versioned cache
Two more faults, both measured, both in the plumbing rather than the statistics.

maxmarg returns individuals x markers, so colnames are *markers*: the
individuals file I added last commit listed 1 452 marker names, every trait
value aligned to nothing, and the workflow answered "number of analyzed
individuals equals 0".  It writes rownames now -- 235 names for BXD.8 -- and
impute=hmm completes: 200, 11 657 rows, 26 s, single machine, with both notes
("missing calls predicted by R/qtl2's HMM", "trait values aligned by name to the
235 individuals").

The second fault was the cache: the prepared files are keyed on (panel, mode)
and not on the code that writes them, so the corrected individuals file was
ignored and the run kept failing on the stale one.  The key now carries
IMPUTE_CACHE_VERSION, bumped when either script changes what it writes.

Three modes through the workflow, same trait, same machine:

  none 200, 21 055 rows
  mean 200, 21 056 rows
  hmm  200, 11 657 rows

none and mean agree as they should: identical top marker (rs32133186),
Spearman rho 1.00000, top-50 50/50, median |d(-log10 p)| 0.00004.

hmm disagrees, and that is a real finding rather than a rounding matter: rho
-0.07 against both, different top marker, and only 11 657 of the 20 453 markers
reported.  A rank correlation near zero means the genotypes and the markers are
not being paired the way the other two modes pair them, so the next thing to
check is the annotation file this path feeds GEMMA (it comes from the cross's
physical map, while the genotype rows come from the HMM's marker order) --
not the imputation itself, which the same-genotype comparison already showed to
be sound (rho 0.999971 against pangemma on the identical calls).
Diffstat (limited to 'scripts/plot-compare.py')
0 files changed, 0 insertions, 0 deletions