diff options
| author | Pjotr Prins <pjotr.public01@thebird.nl> | 2026-11-24 10:47:37 +0000 |
|---|---|---|
| committer | Pjotr Prins <pjotr.public01@thebird.nl> | 2026-11-24 10:47:37 +0000 |
| commit | f139fb3f1d1b9738aea403520e64fd121cd8ee62 (patch) | |
| tree | bdbaeb90825a6f1a2e386c5d294ddd4a1ee52420 /scripts/plot-compare.py | |
| parent | 7281ee24bc479831fbfd5679896202685dffc49a (diff) | |
| download | genenetwork4-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-compare.py')
0 files changed, 0 insertions, 0 deletions
