about summary refs log tree commit diff
path: root/docs
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-11-10 18:43:24 +0000
committerPjotr <wrk@bosa.lan>2026-11-10 18:43:24 +0000
commitd614b073351773fa5b698a3c8a4374191e9341b9 (patch)
treef4cb313af8a81531a26699f30fa79e281d125b9e /docs
parent9ea2fa0f0d5336814a0c62020b20f55f4394874f (diff)
downloadgenenetwork4-d614b073351773fa5b698a3c8a4374191e9341b9.tar.gz
docs: four analysis gotchas, with DOL trait 10003 as the worked example
SKILL.md told an agent how to call the endpoints, not how to read them
when two engines disagree -- which is the question the last round of
analysis actually asked. A note in "Gotchas that cost time":

  * Count the animals in the peak's genotype class before believing it
    (.../markers/{marker}/classes?trait=<id>). DOL 10003's GEMMA peak is
    A n=2 mean 1.8 against B n=171 mean 3.95, with its next two hits the
    same pattern mirrored: a haplotype carried by a handful of extreme
    animals, not a population effect.
  * H is dropped for R/qtl2 on a riself panel (kept by GEMMA as dosage
    0.5); its HMM re-imputes, so the observation is lost, not the animal.
    A mostly-H marker becomes nearly monomorphic for R/qtl2 -- 2 A vs 171
    B -- which is why the two engines can name different markers of one
    region. Neither is wrong.
  * GEMMA's af is mean(dosage)/2 under B=1, H=0.5, A=0, not an allele
    frequency (0.469 is half of 0.935); allele frequencies come from
    .../markers/{marker}/frequencies, and allele1/allele0 are the BIMBAM
    X, Y placeholders, so the sign of beta is not a strain.
  * Do not compare scores across engines as one scale: GEMMA -log10 p,
    R/qtl/rqtl2 LOD, qtlreaper LRS (lod = lrs / 4.604).
Diffstat (limited to 'docs')
-rw-r--r--docs/www/SKILL.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/docs/www/SKILL.md b/docs/www/SKILL.md
index be50e03..2688f24 100644
--- a/docs/www/SKILL.md
+++ b/docs/www/SKILL.md
@@ -334,6 +334,36 @@ trait), `/publications/2760876/traits` (PubMed id), and
   184.3 Mb). So the trait record's `locus`, R/qtl's peak, the plot summary and a
   reply's `next` can each name a different marker of the same strength. That is
   not an error: say "peak region" and use the marker the reply's `next` gives.
+* **Before you believe a peak, count the animals in its genotype class.**
+  `GET /groups/{g}/genotypes/{v}/markers/{marker}/classes?trait=<id>` gives
+  `n`, `mean`, `sd`, `min`, `max` per class at that marker (no genotypes, no
+  per-animal values). A peak carried by 1–2 animals is a different claim from
+  one carried by a hundred, and the reply says which classes are thin. On DOL
+  trait 10003 GEMMA's top marker `JAX00418132` (chr16 36.35 Mb, −log10 p 7.15)
+  is `A n=2 mean 1.8`, `H n=20 mean 2.53`, `B n=171 mean 3.95`: the two A
+  animals are the trait's two lowest values, and GEMMA's next two hits are the
+  same pattern mirrored (`1 A` among 171, then `2 B` among 171). That block is
+  a haplotype carried by a handful of extreme animals, not a population effect
+  — say so rather than reporting 7.15 as a locus.
+* **`H` is dropped for R/qtl2 on a `riself` panel** (`@type:riset`: BXD, DOL,
+  most RI sets), and kept by GEMMA as dosage 0.5. R/qtl2 writes those cells as
+  missing and its HMM re-imputes them from flanking markers, so the animals are
+  not lost — the observation is. A marker that is mostly `H` becomes nearly
+  monomorphic for R/qtl2 (2 A vs 171 B at the marker above) and cannot produce
+  a peak there, which is why the two engines can name different markers of the
+  same region. Check `/frequencies` or `/classes` before calling one engine
+  wrong.
+* **GEMMA's `af` is not an allele frequency.** It is `mean(dosage)/2` under the
+  BIMBAM coding the deployment ships (B=1, H=0.5, A=0), so `af 0.469` for
+  `JAX00418132` is half the B-allele frequency 0.935, not the A-allele
+  frequency 0.065. Take allele frequencies from
+  `.../markers/{marker}/frequencies`. Likewise `allele1`/`allele0` in GEMMA's
+  output are the BIMBAM `X, Y` placeholders, so the sign of `beta` is not a
+  strain.
+* **Do not compare scores across engines as if they were the same scale.**
+  GEMMA reports −log10 p, R/qtl and R/qtl2 report LOD, qtlreaper reports LRS
+  (`lod = lrs / 4.604`). The same region at "7.15" and "3.92" is not a
+  disagreement, and an LMM's LOD is not a Haley-Knott LOD.
 * PheWAS window matters: at the trait-20010 peak, 10 kb finds 4 traits and 1 Mb
   finds 19. The reply's `next` offers a ten-times wider window.
 * Public-data rule: `public > 0` and `confidentiality < 1`, or older than five