about summary refs log tree commit diff
path: root/scripts/plot-genotypes.py
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-11-17 16:05:11 +0000
committerPjotr <wrk@bosa.lan>2026-11-17 16:05:11 +0000
commit14622e57629d19451cad03f4a69fdd89e81a433f (patch)
tree917814c2ca825f983bb9a06fca1ec1301e6f1024 /scripts/plot-genotypes.py
parentdf7fb3dd11be0a27de8904f7a4cb1309bdb64575 (diff)
downloadgenenetwork4-14622e57629d19451cad03f4a69fdd89e81a433f.tar.gz
qtl2: the .geno conversion is an R script now, and the Rust writer is gone
The conversion wrote qtl2's control file and CSVs by hand in Rust.  Its
output is an R/qtl2 cross, so the script does it and write_control_file
describes it: one implementation of the format, qtl2's.  What Rust keeps
is the endpoint's own limit -- a .geno panel carries no founder
genotypes, so a multiparent crosstype is a 422 with a reason, and the
cross type follows @type and the heterozygous policy.

prepare_cross now runs

  Rscript scripts/qtl2-convert-geno.R --geno GROUP.geno --out DIR
                                     --het drop|keep --crosstype riself|f2

writes the cross into the same versioned cache directory (now v6: the
files it writes are qtl2's own layout), and reads back the report the
script leaves beside it -- markers, non-autosomal, individuals,
het_dropped, cells -- instead of counting them itself.  A failed
conversion reports R's own complaint.  New configuration key
QTL2_CONVERT_SCRIPT (default scripts/qtl2-convert-geno.R).

The Rust writer's 250 lines are deleted, along with count_calls and
metadata_het.

Measured, BXD trait 10001 on the same request:

  before (Rust, alleles 1/3)   top rsm10000005730 chr8 LOD 3.685
  after  (R/qtl2, alleles 1/2) top rs32579649 chr8 LOD 3.8917,
                               rsm10000005700 3.8916
  GEMMA LMM, same trait        rsm10000005700 p 5.90e-07

so the wrong allele code was flattening this endpoint's own scan too: it
still found chromosome 8, at a neighbouring marker and 0.21 LOD lower,
with the marker GEMMA picks not in its top three.  The two engines now
agree on the locus.  Cost: 38.3 s cold for 20453 autosomal markers (the
R conversion is ~35 s of it), 3.5 s with the cross cached.
Diffstat (limited to 'scripts/plot-genotypes.py')
0 files changed, 0 insertions, 0 deletions