Skip to content

Carry gaps never searched into the evolutionary audit and run comparison - #19

Merged
Paururo merged 2 commits into
mainfrom
fix/evolution-not-searched
Oct 17, 2026
Merged

Paururo merged 2 commits into
mainfrom
fix/evolution-not-searched

Conversation

@Paururo

@Paururo Paururo commented Oct 17, 2026

Copy link
Copy Markdown
Member

Follow-up to #18, which told gaps never searched apart from searched empty ones in the states file and the report. Two places downstream still treated them as audited absences.

Evolutionary audit. Gains and losses are made of absences, and evolutionary_events.tsv built them whether or not Recore had searched those gaps; under the default --min-prevalence, every gain on a cluster in fewer than one genome in ten read as an audited call.

  • New columns absent_not_searched and not_searched_reason (low_prevalence, no_cluster_sequence, no_fasta).
  • For calls that rest on absences (acquisition, reference loss, deletion loss, homoplastic, unresolved): when none of the absences behind the call were searched (for a reference loss, when the reference genome's was not), support drops one level, so score and priority follow, and mechanism_detail gets absences_not_searched. When only some were, it gets absences_not_searched=N/M and no downgrade. Either way recommended_wording says so.
  • Calls made from rescue evidence (pseudogenes, fragments, paralogs, reference events) are untouched.

Run comparison. benchmarks/compare_runs.py counted any state other than ABSENT as a call, so comparing against a run from before #18 listed every NOT_SEARCHED_* cell as a new correction. They are absences now, and a cell searched in one run and not the other is search_coverage_changed, counted apart from changed_cells.

Checked by running it

  • fmt, clippy -D warnings, 187 library tests, 3 integration tests with minimap2 required, mkdocs build --strict.
  • The new unit and end-to-end tests fail when the downgrade, the count or the qualification is removed.
  • Tutorial: Rescued 11 and Matrix-corrected 8 unchanged; only Rv3810 (below the floor) gains the tag and wording, keeping its priority.
  • Tutorial without the L5_AS00501 FASTA: Rv0008c, whose only absence is L5, goes from moderate to low support and from highlight to candidate (score 0.884 to 0.664); Rv1180, Rv1181 and Rv2930 are tagged 1/9 or 1/8 and keep their calls.
  • compare_runs.py, tutorial output against a copy with ABSENT in place of NOT_SEARCHED_*: 11 new corrections before the fix, 0 after, with 11 search_coverage_changed; a run against itself is all same.

…and run comparison

Gain and loss calls in evolutionary_events.tsv were built on absences whether or not Recore had searched them, so a gain on a cluster below --min-prevalence read as an audited result. New columns count those absences and say why, a call none of whose absences were searched drops one support level, and every affected call is tagged and explained. compare_runs.py also counted NOT_SEARCHED_* cells as calls, listing every unsearched cell as a new correction against older runs; they are absences now, and a change in search coverage has its own class.
Rv3810, below the prevalence floor, now carries the not-searched tag and wording in its mechanism card.
@Paururo Paururo added documentation Improvements or additions to documentation pipeline Run orchestration, evolution calls, the quality guard, reference audit report The HTML run report and what the writer emits tests Test suites and fixtures benchmarks The Python benchmark harness and its checked-in metrics labels Oct 17, 2026
@Paururo
Paururo merged commit aaa38b6 into main Oct 17, 2026
8 checks passed
@Paururo
Paururo deleted the fix/evolution-not-searched branch October 18, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

benchmarks The Python benchmark harness and its checked-in metrics documentation Improvements or additions to documentation pipeline Run orchestration, evolution calls, the quality guard, reference audit report The HTML run report and what the writer emits tests Test suites and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant