about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-11-11 14:49:16 +0000
committerPjotr <wrk@bosa.lan>2026-11-11 14:49:16 +0000
commit8bb9c54d2eb7b4ae2d330a588eff32feceb4324f (patch)
tree80cfb0bd569ca02452538b7a3c7b6f5733c6faf8 /tests
parent492e0c5e8988fda87d361cef4f29639c5f0d0b72 (diff)
downloadgenenetwork4-8bb9c54d2eb7b4ae2d330a588eff32feceb4324f.tar.gz
plot/bulklmm: the 0.05 and 0.01 lines, never 0.10 unless asked
Checked what the plot actually draws: it has never drawn the alpha 0.10
line -- the plotter matches 0.05 and 0.01 only. What lists all three is the
reply's notes ("alpha 0.01: LOD 4.58, alpha 0.05: 3.65, alpha 0.1: 3.50"),
which is where the 0.10 came from.

Still, the point stands on its own: 0.10 is the loosest bar in the set and
drawing it invites reading it as the line to clear. So the defaults are
stated and pinned -- 0.05 and 0.01 on the plot, 0.10 only on request
(?all_thresholds=true, or an explicit ?thresholds=) -- alongside GEMMA's
Bonferroni, which is opt-in for the same reason: a reference line is an
annotation, not a result.

tests/bulklmm.rs counts the lines: exactly two by default, and no
alpha 0.10 label.
Diffstat (limited to 'tests')
-rw-r--r--tests/bulklmm.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/bulklmm.rs b/tests/bulklmm.rs
index eeec09c..b823b6c 100644
--- a/tests/bulklmm.rs
+++ b/tests/bulklmm.rs
@@ -232,11 +232,16 @@ async fn a_scan_plots_and_gemmas_refusal_points_here() {
     assert!(svg.trim_start().starts_with("<svg"), "an SVG");
     // Both thresholds the endpoint reports are drawn: alpha 0.05 (the
     // genome-wide line) and alpha 0.01, when there are enough permutations.
-    assert!(
-        svg.matches("class=\"thr").count() >= 1,
-        "the permutation thresholds are drawn"
+    // Two lines by default -- the genome-wide 0.05 and the stricter 0.01 --
+    // and never the loosest one unless it is asked for.
+    assert_eq!(
+        svg.matches("class=\"thr").count(),
+        2,
+        "the 0.05 and 0.01 thresholds are drawn, and not 0.10"
     );
     assert!(svg.contains("genome-wide (alpha 0.05)"), "the 5 % line is labelled");
+    assert!(svg.contains("alpha 0.01"), "and the 1 % line");
+    assert!(!svg.contains("alpha 0.10"), "the loosest line is not drawn by default");
     assert!(svg.contains("rsm10000000888"), "the summary names the peak");
 
     // A GEMMA permutation request now says where the thresholds are.