about summary refs log tree commit diff
path: root/scripts/plot-gemma.py
diff options
context:
space:
mode:
authorPjotr Prins <pjotr.public01@thebird.nl>2026-11-24 10:47:37 +0000
committerPjotr Prins <pjotr.public01@thebird.nl>2026-11-24 10:47:37 +0000
commitf139fb3f1d1b9738aea403520e64fd121cd8ee62 (patch)
treebdbaeb90825a6f1a2e386c5d294ddd4a1ee52420 /scripts/plot-gemma.py
parent7281ee24bc479831fbfd5679896202685dffc49a (diff)
downloadgenenetwork4-f139fb3f1d1b9738aea403520e64fd121cd8ee62.tar.gz
genotypes: read latin-1 panels, and key the subset pair on its source file
Two things that a new panel exposed at once.

**Encoding.** At-Serin.geno came from a GeneNetwork export whose header comment
carries a latin-1 multiplication sign ("Bay-0 \xd7 Shahdara").  Every reader used
`std::fs::read_to_string`, so one byte in a comment hid the whole panel with
"stream did not contain valid UTF-8" -- `panel_of`, `marker_count`,
`individuals_with_genotypes`, the subset writer, and qtl2's cross reader.  They
now read the file and take it lossily (the data lines are ASCII; nothing parses
the comments), so a stray latin-1 byte is not a reason to refuse a panel.

**The prepared subset's key.** `subset_path` hashed the kept *indices* and the
version name, and nothing about the genotypes themselves, so replacing
`<stem>.geno` (or its BIMBAM) in place kept serving the previously prepared
subset and noY pair for as long as the animal set was unchanged -- an updated
genotype file would have been mapped as the old one.  The key now includes the
source file's size and mtime, exactly what `prepare_cross` already keys on.
Diffstat (limited to 'scripts/plot-gemma.py')
0 files changed, 0 insertions, 0 deletions