diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/plot.rs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/routes/plot.rs b/src/routes/plot.rs index cf73637..8bcbd5b 100644 --- a/src/routes/plot.rs +++ b/src/routes/plot.rs @@ -48,6 +48,9 @@ pub struct PlotParams { /// Labels for those lines, comma separated and in the same order, e.g. /// "bulklmm alpha 0.05". Anything missing defaults to "bulklmm threshold". pub threshold_labels: Option<String>, + /// BulkLMM only: also draw the loosest line the reply reports + /// (alpha 0.10). The default is the genome-wide 0.05 and the stricter 0.01. + pub all_thresholds: Option<String>, } /// The reference lines a caller passed, validated: `(value, label)`. @@ -254,7 +257,7 @@ pub async fn plot_rqtl( member) and get the plot scripts/plot-gemma.py draws from it: -log10(p_lrt) per marker. \ **No reference line is drawn unless one is asked for** -- a line is an annotation, not part of \ the result, and each is labelled with where it came from: `?bonferroni=true` for GEMMA's own \ --Bonferroni (0.05 over the analysed markers, computed by the plotter, conservative under \ +Bonferroni (0.05 over the analysed markers, computed by the plotter, conservative under \ linkage and unrelated to relatedness), and `?thresholds=` for a threshold another engine \ computed on the same values (e.g. /compute/bulklmm's rotation thresholds). Nothing is \ recomputed. image/svg+xml, not the JSON envelope; `x-plot-summary` carries the plotter's \ @@ -574,6 +577,20 @@ pub async fn plot_bulklmm( extra.push("--title".to_string()); extra.push(title.to_string()); } + if matches!( + plot_params.all_thresholds.as_deref(), + Some("true") | Some("1") | Some("yes") | Some("all") + ) { + extra.push("--all-thresholds".to_string()); + } + for (value, label) in external_thresholds( + plot_params.thresholds.as_deref(), + plot_params.threshold_labels.as_deref(), + &rid, + )? { + extra.push("--threshold".to_string()); + extra.push(format!("{value}:{label}")); + } let borrowed: Vec<&str> = extra.iter().map(String::as_str).collect(); let rendered = plot::render( &config.plot_python, |
