Repository navigation
Stable-1 report risks: unassessed repeat tests, PCA label identity, percent near 100%, anomaly folders - #645
Merged
Merged
Conversation
… significant (#90) With 3 or more biological repeats that all give the same change, the paired t-test has no variance to test with and gives no p. The reading's verdict and the page's table across repeats read that as "not significant across repeats" (or "same direction ..., not significant" from 6 repeats), panel C of the figures and its hover said "fewer than 3 repeats imaged both", and "Plan the next experiment" left out a condition whose repeat plan had no estimable answer, then could say every condition was significant. - reading_text: new verdict NOT_ASSESSED, "not assessed across repeats", in VERDICTS, when enough repeats give no q; the reading keeps its reason. - _html_across: the table's verdict is "not assessed across repeats: <reason>" (contrast_repeats.NO_SPREAD), checked before significance. - plots_pairwise / _html_plotly: panel C marks such a pair "=" with its reason (unpaired_words), "–" only for fewer than 3 shared repeats, and the legend says both. - _html_plan_repeats: a plan without repeats needed stays in the table as "not assessable: <status>"; the panel says so. The shared machine-readable status vocabulary of #90 is not part of this. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
_spread_labels placed the labels from the lowest up and returned them in that order, while _arrows zipped them with the features in the loadings' order: a feature's name could be drawn at another feature's arrow tip, with or without any overlap. The positions now come back in the order given, so each label is anchored at its own arrow; overlapping labels still move apart vertically. Tests read the drawn figure: each label's anchor is 1.06 times its own arrow's tip and its nearest tip is its own, also with coincident loadings in shuffled order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
percent rounded the gap to 100% to 9 decimals before taking its log, so a valid share such as 1 - 1e-12 (or the float just below 1) gave a gap of 0 and a math domain error, which would stop the report or its page. The gap is now kept to the digits a float holds of it (at most 9, never 0), so 1 - 1e-12 reads 99.9999999999% and the float below 1 99.99999999999999%; a share below 1 never reads 100%. Ordinary shares (99.5%, 99.9%, 99.90% for 0.99901) read as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
) On a MorphoFeature export whose conditions are named by condition_id (v33: the folder "control" is "ctrl") or whose repeats are paired by repeat_group (v30, v03), the acquisition anomalies' rows named a field by the IDs only ("ctrl · repeat rep1 · img0"), unlike the comparison rows and the fields to check since #627. with_folder_labels now gives each row a `folder` and the folders in its field ("... (folder control/rep1)"), in the report's table and the page's fields to check. A table whose folders are their IDs is unchanged. Item 3 was the last open part of #628 (items 1, 2 and the comparisons' hint were done in #629). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
3 tasks
guijacquemet
marked this pull request as ready for review
November 24, 2026 21:29
…/common/glossary.md is its rendering) The full suite found test_docs_glossary_is_the_rendering_of_the_glossary failing: the committed glossary doc had the #90 sentence but the glossary source did not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the Stable-1 risks on the
report+html_reportpath (the defaultgroup_colscondition + repeat_group) that the MorphoCoverage triage of 2026-11-24 found. There is one commit per issue. Each fix has a regression test that fails on mainc25c4e9.Closes #557
Closes #555
Closes #628
Refs #90
#90 (part): a paired test with no p is "not assessed", never "not significant"
With 3 or more repeats that all give the same change, the paired t-test has no variance to test with, so it gives no p. Before this change:
What changes:
reading_text.NOT_ASSESSED= "not assessed across repeats" is added toVERDICTS. The summaries iterate overVERDICTS, so they list it._html_across._verdictreturnsnot assessed across repeats: <contrast_repeats.NO_SPREAD>. It checks this before it checks significance.plots_pairwise.unpaired_words: "=" means not assessed because the difference is the same in every repeat, "–" means fewer than 3 shared repeats, and "≠" means normalised to different controls.PAIRED_NOTEexplains "–" and "="._html_plan_repeatskeeps such a plan asnot assessable: <plan status>(DEGENERATE/MISSING_VALUE), and the panel says so.Why no reason is guessed: the upstream paths drop NaN values, and a log ratio is used only when every value is positive. So with at least
MIN_REPEATSfinite inputs,paired_treturns NaN only when the compared values are all equal.Not done here: the shared machine-readable status vocabulary of #90, which the owner described as a design change, and the
legend_text.figure_legendpath (D67). The issue therefore stays open.#557: PCA loading labels stay beside their own arrows
_spread_labelsreturned the positions sorted by height, while_arrowszipped them with the features in the loadings' order. Positions now come back in the order given. The test reads the drawn figure: each label is anchored at 1.06 × its own arrow's tip, its nearest tip is its own, and the case with coincident, shuffled loadings is covered.#555:
percentnear 100%round(100 - share, 9)became 0 for shares such as 1 − 1e-12, and the log of 0 raised a math domain error. The gap is now kept only to the digits a float holds of it, at most 9 and never 0. For example, 1 − 1e-12 reads99.9999999999%andnextafter(1, 0)reads99.99999999999999%. A share below 1 never reads 100%. Ordinary shares give the same output as on main (checked: 99.1, 99.5, 99.9, 99.90 for 0.99901, 99.91, 99.99 and others).#628 item 3: acquisition-anomaly rows name their folder
_pairing.with_folder_labelsgives each anomaly row afoldercolumn and puts the folders in itsfield, for examplectrl · repeat rep1 · img0 (folder control/rep1). This shows in the text report and in the page's fields to check. A table whose folders are their IDs is unchanged. Items 1 and 2 and the comparisons hint were already done in #629, so this closes the issue.The tests use v33 (condition ID), v30 (repeat group) and v03. v27 is not used: it holds 5 fields per folder, fewer than the 8 a group needs to be judged. The "labels are IDs" case uses v33 with its IDs set to the labels.
Evidence
All 15 new or changed tests fail on
c25c4e9. They were run on a worktree of main with the new test files copied in: 14 failed, plustest_html_plan.py::test_a_condition_without_a_repeat_plan_is_said_not_assessable_in_the_table, which asserted the silent drop before and now expects the row. The other 20 selected tests are controls that pass on both.Focused tests on this branch, all passed:
test_unassessed_repeat_tests,test_reading,test_html_tests,test_html_plan,test_plots_pairwise,test_plots_embedding,test_wording,test_morphofeature_exports,test_repeat_groups,test_discovery,test_html_scale,test_unusual_split,test_html_next,test_html_conditions,test_figure_repeat_level,test_bio_reading,test_repeat_plan,test_comparisons,test_contrast,test_style_foundationandtest_html_maps.The whole suite was not run (another heavy job was running on the machine). It must still run before merge.
Gate (on e0f0268)
The function index has been regenerated, and the CHANGELOG, AGENTS.md, glossary, figures.md and data_format.md are updated.
Seen in passing (not changed)
reporton the v27 export with one field raised by 100 inxran for more than 15 minutes insideobject_rules._fovs_until(viaobject_rule_checkincontrol_checks). The same report without the outlier takes about 2 s. This looks like a separate performance problem.Generated by Claude Code