about summary refs log tree commit diff
path: root/scripts/plot-bulklmm.py
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-11-17 13:02:21 +0000
committerPjotr <wrk@bosa.lan>2026-11-17 13:02:21 +0000
commitdf7fb3dd11be0a27de8904f7a4cb1309bdb64575 (patch)
tree34995c2e6cc2797e9c14b169fb9ce6282871b356 /scripts/plot-bulklmm.py
parent1fa28faac92bd206cca46b6987c4973360ddadbe (diff)
downloadgenenetwork4-df7fb3dd11be0a27de8904f7a4cb1309bdb64575.tar.gz
qtl2-convert-geno.R: convert a .geno file to a cross in R, where the format lives
The conversion was Rust writing qtl2's files by hand, and one of qtl2's
conventions was wrong in it: the genotype codes.  This does the same
conversion as an R script and lets qtl2 write its own JSON metadata with
write_control_file, so the layout and the codes come from the format's
definition rather than from a second implementation of it.

  qtl2-convert-geno.R --geno BXD.8.geno --out DIR [--het drop|keep]
                      [--crosstype riself|f2]

The allele letters are read from the file's @mat/@pat/@het header lines
(B/D as often as A/B), autosomes only, the heterozygous class dropped for
a riself cross as R/qtl's convert2riself does, and missing calls left
missing because imputing them is the point of the cross.

Measured on BXD.8.geno: 20453 autosomal markers, 235 individuals, 610684
heterozygous calls dropped and 1533 missing cells left to the HMM.
read_cross2 -> calc_genoprob(error_prob 0.002) -> maxmarg(minprob 0.5)
reproduces 4193962 of 4194238 kept calls (99.99%) and imputes the 612217
dropped ones almost evenly (A 306841, B 305376).  At rsm10000005700,
where the old codes produced 218 AA and 17 BB against a truth of 84 A and
125 B, all 209 kept calls are reproduced.

The Rust converter still runs; handing /compute/qtl2 over to this script
is the next commit.
Diffstat (limited to 'scripts/plot-bulklmm.py')
0 files changed, 0 insertions, 0 deletions