diff options
| author | Pjotr <wrk@bosa.lan> | 2026-11-09 13:00:47 +0000 |
|---|---|---|
| committer | Pjotr <wrk@bosa.lan> | 2026-11-09 13:00:47 +0000 |
| commit | 216d1491435cce156f89a01684eb5c07e07db31e (patch) | |
| tree | ee9eb9b183a60c4916ae9d26c60d7a26876a1fc6 /docs | |
| parent | c560ce726bc0c45ac87b8f0f9bf83870e25ac195 (diff) | |
| download | genenetwork4-216d1491435cce156f89a01684eb5c07e07db31e.tar.gz | |
compute: report GEMMA's effect size next to the score
A GEMMA row now carries the effect beside the p-value it belongs to: `… beta, se, l_mle, additive, p_lrt`. `additive` is `-beta/2`, which is what GeneNetwork's own tables and CSV call the additive effect (gn2/wqflask/marker_regression/gemma_mapping.py:240). Halved because half the difference between the two homozygotes is the usual additive effect; negated because GN2's BIMBAM conversion codes `@mat` as 1, so GEMMA's beta is per *maternal* copy while GeneNetwork's published sign is anchored on the other allele. Two facts that make this worth doing carefully: * `beta` and `se` are left exactly where GEMMA put them. `se` is what makes the effect interpretable (`beta +/- 1.96*se` is a 95% interval) and both are GEMMA's own numbers, so replacing them with a derived one would lose information; * the derived column goes *before* the p-value, not after it. `p_lrt` must stay the last column: `gemma::peak_marker` reads `row.last()` for the peak (and with it the PheWAS and plot suggestions), and the plotters and the docs all say "the last column is the p-value". Appending would have silently pointed every peak at an effect size. The response also says what the three columns mean, and that they describe *this run* on these samples and this genotype version -- not the `additive` trait info reports, which came from the published mapping (trait 20010: this run -0.54, published +2.118, same peak marker). Nothing is added when GEMMA wrote no `beta` (a non-LMM run): the columns are then exactly GEMMA's. * src/gemma.rs: `with_effect_size`, applied by `parse_assoc_file`, so /compute/gemma and /compute/gemma/ravanan both get it. * src/routes/gemma.rs: the note. * tests: four unit tests (placement, sign and halving, `peak_marker` still finds the peak from the last column, a table without beta untouched, a null effect for a row with `NA` beta) and one end-to-end test asserting the column sits immediately before `p_lrt`, every value is `-beta/2`, `p_lrt` stays a probability, and the note is there. * README.md (the response example and what the column means), docs/www/SKILL.md (how to read and quote it). 286 tests pass; the same four as before do not.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/www/SKILL.md | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/docs/www/SKILL.md b/docs/www/SKILL.md index ad61253..ce02e39 100644 --- a/docs/www/SKILL.md +++ b/docs/www/SKILL.md @@ -127,8 +127,15 @@ header (peak and, for GEMMA, the Bonferroni line). * `/compute/rqtl`: R/qtl `scanone` (Haley-Knott) over the group's genotypes. Columns `name, chr, pos, lod`. `nperm=0` by default, so no permutation lines. * `/compute/gemma`: GEMMA LMM with leave-one-chromosome-out kinship. Columns - `chr, rs, ps, ..., p_lrt`. Pass `?id=` and poll `/compute/gemma/status/{id}` - for long runs. Per-marker p-values only; the plot draws a Bonferroni line. + `chr, rs, ps, n_miss, allele1, allele0, af, beta, se, l_mle, additive, p_lrt`. + Pass `?id=` and poll `/compute/gemma/status/{id}` for long runs. Per-marker + p-values only; the plot draws a Bonferroni line. + **Effect size is in the row, next to the score**: `beta` (GEMMA's effect per + maternal-allele copy) with `se`, and `additive` = `−beta/2`, which is the + number GeneNetwork's own tables and CSV show. Quote `additive` with its sign + ("each maternal-allele copy lowers the trait by X" / the other way) and + remember it is *this run* on these samples, not the `additive` in trait info, + which came from the published mapping. * `/plot/rqtl`, `/plot/gemma`: post the compute reply back, receive an `image/svg+xml` plot. Do not draw your own. * Options (all optional, add to the posted body; full list in |
