about summary refs log tree commit diff
path: root/src/error.rs
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-11-16 20:00:23 +0000
committerPjotr <wrk@bosa.lan>2026-11-16 20:00:23 +0000
commit94d08ecb58619ae60f048059f24536cac1f1e6e0 (patch)
treefdded1c8c0e6ab661c4c4be638bfc68f0515d943 /src/error.rs
parentc9777828482d03affc912688bed316f1a16c5640 (diff)
downloadgenenetwork4-94d08ecb58619ae60f048059f24536cac1f1e6e0.tar.gz
make-mdb.sh: HMM genotypes from qtl2, for the pangemma path
The pangemma endpoint is to agree with R/qtl2, not with GEMMA, so the store's
genotypes now come from qtl2's HMM rather than from a marker mean: maxmarg on
the genotype probabilities /compute/qtl2 already computes and caches, at
minprob 0 so every cell is called.  GEMMA's own endpoints are untouched.

  scripts/make-mdb.sh --impute qtl2 --cross <qtl2 cross dir> --probs <probs.rds>

writes a BIMBAM from the HMM's calls (marker, X, Y, genotypes -- the annotation
mdb carries the positions, as the makers expect), the snps file from the cross's
physical map, and then the store as before: lock file deleted, .mdb made
read-only, renamed into place.  Measured on BXD.8: 7 s for the HMM over 20 453
markers x 235 individuals, 4.7 s for geno2mdb, 28.9 MB as Gf, no gaps left.

Three things found while wiring it, each now handled:

* maxmarg returns individuals x markers -- the transpose of a BIMBAM -- and a
  first version wrote 4 465 lines with individuals where markers belong;
* both makers name their output after their argument and write it in the
  current directory, so they now run inside the work directory with bare names.
  A hand run with absolute paths had put a 2 MB .mdb inside gn4-data;
* pangemma's startup smoke test wants the working directory to be its own
  source root.  Run from anywhere else it exits in 0.03 s having done nothing,
  which looks like a very fast scan rather than a failure.

Comparison, three BXD traits, 20 451 markers, each engine with its own kinship
matrix, positional phenotype in the cross's individual order:

  trait   same top marker   Spearman rho   top-50 overlap   median |d(-log10 p)|
  10001   yes (rs27829136)      0.99732         48/50              0.008
  16627   yes (rs29388476)      0.98415         43/50              0.029
  16769   yes (rs29388476)      0.98339         32/50              0.029

K 0.13 s against gemma's 0.84 s; the LMM scan 2.5 s against 3.0 s.
Diffstat (limited to 'src/error.rs')
0 files changed, 0 insertions, 0 deletions