From 8bb9c54d2eb7b4ae2d330a588eff32feceb4324f Mon Sep 17 00:00:00 2001 From: Pjotr Date: Wed, 11 Nov 2026 14:49:16 +0000 Subject: 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. --- tests/bulklmm.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tests') 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("= 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. -- cgit 1.4.1