spacr.figures.summary

What a finished regression found, in prose, for the console.

PROSE, NOT A TABLE DUMP. A table of a thousand coefficients is already on screen and already in a CSV; what is missing is the paragraph a person would write after looking at it. So this says how many hypotheses were tested, how many survived and under which rule, which genes they were, whether the assay worked, and – because the calibration on real screens is routinely off in one direction or the other – whether the test was conservative or anti-conservative.

IT COMES FROM THE SAME NUMBERS THE PANELS DO. Every figure in spacr.figures.panels computes its own statistic; a summary that recomputed them separately would be a second implementation that can disagree with the pictures beside it, and the reader would have no way to tell which one was wrong.

Functions

summarise(→ str)

A paragraph describing what this coefficient table found.

Module Contents

spacr.figures.summary.summarise(frame, *, alpha: float = 0.05, effect_threshold: float | None = 'auto', max_named: int = 8) → str[source]

A paragraph describing what this coefficient table found.

Parameters:
  • frame – the coefficient table a run returned.

  • alpha – the level the calls were made at.

  • effect_threshold – 'auto' to use the control-based cut, a number to force one, or None for significance only.

  • max_named – how many hits to name before saying “and N more”.

Returns:

the summary, ready to print. Empty string when there is nothing to summarise – a caller should say so itself rather than print a paragraph about an absence.