diff options
| author | Pjotr <wrk@bosa.lan> | 2026-11-16 20:20:20 +0000 |
|---|---|---|
| committer | Pjotr <wrk@bosa.lan> | 2026-11-16 20:20:20 +0000 |
| commit | 7f6d92b546892ea5dba5a3f5df541c77c229f1e4 (patch) | |
| tree | 8fd8d02e4a050cbcf4f14b69ea0d7bf48c724a20 /scripts/plot-bnw.py | |
| parent | 94d08ecb58619ae60f048059f24536cac1f1e6e0 (diff) | |
| download | genenetwork4-7f6d92b546892ea5dba5a3f5df541c77c229f1e4.tar.gz | |
impute: one switch for how a missing genotype is treated, on the ravanan path
"How do we treat a missing genotype?" now has one answer shared by every engine,
so the same trait can be mapped both ways and the results compared:
none the file as it stands -- GEMMA does complete-case per marker and reports
n_miss (235 individuals for some markers, 234 for others)
mean every gap takes that marker's mean (complete file, all individuals)
hmm R/qtl2's HMM predicts the gap from flanking markers (maxmarg on the
genotype probabilities, the calls /compute/qtl2 itself maps on)
scripts/prepare-genotypes.sh is that one place. It writes <prefix>.bimbam.txt
and <prefix>.snps.txt and nothing else, so the two engines consume the same
files: /compute/gemma/ravanan takes `impute`, and the pangemma store builder
(the next endpoint) takes the same script with --mode mean|hmm into the LMDB
makers.
On the ravanan path the files are cached under RAVANAN_CACHE_DIR/imputed/
<panel>-<mode>, so a second request for the same panel and treatment costs
nothing: mean is a single pass (1.7 s for BXD.8), hmm is the qtl2 HMM (10 s
including computing the probabilities the first time, then cached beside the
cross). The reply says which treatment ran, and `hmm` refuses without a group
(422 impute_needs_group) since the cross it predicts from is the group's.
Measured, BXD.8 (20 453 markers, 235 individuals), missing calls in the
prepared panel: 1 465 of 4.8M as NA. Both modes produce complete files of 9.2
and 10.0 MB, and a request with impute=mean or impute=hmm writes them and then
proceeds to ravanan. What this box could not finish is the run itself: ravanan
in the scratch instance failed on its own manifest cache ("manifest.scm newer
than compiled ... warning") and, for hmm, answered "no association output
files" -- environment, not the preparation, and the next thing to settle.
Why not keep it in the workflow: the treatment has to be the same for both
engines, and pangemma's store builder needs the file *before* the workflow
exists (it builds an LMDB store from it). One script, two consumers.
Diffstat (limited to 'scripts/plot-bnw.py')
0 files changed, 0 insertions, 0 deletions
