about summary refs log tree commit diff
path: root/test/python/test_openapi.py
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-11-09 22:28:20 +0000
committerPjotr <wrk@bosa.lan>2026-11-09 22:28:22 +0000
commit7646276e63fb7c4a7433530cfc3314ace3d362d8 (patch)
tree18a0e233b30748bb433669716b8b88e502af44d9 /test/python/test_openapi.py
parentdc3e0e5ba0fa6f9462d55e9ca9a4802a60eb205f (diff)
downloadgenenetwork4-7646276e63fb7c4a7433530cfc3314ace3d362d8.tar.gz
compute: R/qtl2 as a third scan, POST /compute/qtl2
R/qtl sits between the existing two scans: Haley-Knott on marker
genotypes, no kinship.  GEMMA is an LMM but biallelic BIMBAM with
mean-imputed genotypes.  Neither can analyse a multiparent population,
and neither models relatedness from the actual genotype data.  R/qtl2
does both -- HMM genotype probabilities, then an LMM with
leave-one-chromosome-out kinship -- and it is what names the third peak
on DOL trait 10003 that R/qtl's scan cannot see (chr16, LOD 4.24,
against GEMMA's -log10 p 7.15 there).

  * src/qtl2.rs converts this deployment's own .geno into a qtl2 cross
    under QTL2_CACHE_DIR: control.json plus geno/gmap/pmap/pheno, with
    the genotype-code map, the orientation and the paths written out
    explicitly.  The shipped genotype/rqtl2/ control files cannot be
    used -- they point outside the data directory, declare no code map
    (every genotype reads as missing) and no orientation (individuals
    read as markers) -- and each of those produces a plausible flat
    scan instead of an error, which is why the conversion is ours.
  * Heterozygous calls are dropped on a riself panel, as R/qtl's
    convert2riself does.  Left in, qtl2 reads the cross as multiparent
    and its scan1 takes a path the panel cannot satisfy ("Error in
    scan1_pg ... : No individuals in common").
  * Autosomes only: X needs a sex covariate to be fitted properly and
    Y/MT degenerate the per-chromosome kinship.  GEMMA's LOCO scan is
    restricted the same way.  The note says how many markers were left
    out.
  * scripts/qtl2_scan.R caches genotype probabilities and kinship by a
    hash of the control file *and its directory*; two conversions of
    the same panel can have identical control files and identical file
    sizes, and reusing the first one's probabilities silently scans the
    wrong cross.  It also takes the individual names from whichever
    shape the cross's pheno slot has -- a single-column pheno file
    leaves it a plain matrix, and the resulting empty phenotype reads
    as scan1's "No individuals in common".
  * Rows are marker, chr, pos, lod, so /plot/rqtl draws the reply
    unchanged -- post the same samples as /compute/rqtl.
  * tests/qtl2.rs: the fixture scans and its notes name the cross; BXD
    trait 10001 peaks on chr8 under both scans; refusals carry
    missing_genotype / invalid_kinship.

cost: 2 concurrent scans, gated from RQTL_LARGE_PANEL individuals like
R/qtl; a DO cross costs minutes of genotype probabilities, paid once
per panel.  QTL2_SCRIPT_PATH and QTL2_CACHE_DIR configure it.
Diffstat (limited to 'test/python/test_openapi.py')
0 files changed, 0 insertions, 0 deletions