Skip to content

Add per-seed candidate selection before final output filtering - #290

Merged
martin-raden merged 3 commits into
masterfrom
feat/288-per-seed-selection
Oct 26, 2026
Merged

martin-raden merged 3 commits into
masterfrom
feat/288-per-seed-selection

Conversation

@Alexander-Mitrofanov

Copy link
Copy Markdown
Collaborator

Per-seed diversity needs candidate selection before global ranking; filtering final tracebacks loses some seeds' best sites. This implements --outNumberPerSeed=K using the maintainer's decisions in #288.

Fixes #285. Supersedes the documentation checkpoint in #288.

  • Keep each seed's best K distinct sites across merged regions/windows, deduplicate their union using the lowest-energy eligible conformation, then apply final energy, overlap and count restrictions without refilling quotas. --outPerRegion resets quotas per region combination.
  • Cover S/H, S/M, X/H, X/M, X/R, X/K, B/H and seed-only S/X/P. MFE passes constrain the generating seed and retain coherent energy/traceback pairs. P/H and P/M rank and report each left-most anchor's site ensemble, before full-site aggregation.
  • Preserve the existing execution path at the default zero; reject positive quotas with --noSeed, ignore the option for evaluation, and accept parameter files and values in [0,1000]. Zall, trackers and actual-pair probabilities retain their ordinary prediction semantics.
  • Document behavior, library usage, compatibility and runtime in README, ChangeLog and the updated implementation note.

Validation: GCC 14 / ViennaRNA 2.7.2 release and debug make tests -j2 both passed 9/9 suites. The API suite passed 123 cases (529,850 release / 529,851 debug assertions), including exhaustive chain enumeration, noLP and cropped-coordinate oracles, anchor callback comparisons across the existing theory/random fixtures, heuristic/bulged ensembles and retained traceback energies. CLI regressions cover the mode matrix, explicit zero, invalid values, parameter files, evaluation, regions/windows, thread determinism, final restrictions, unchanged trackers and byte-identical probability files. Installation, a linked/running pkg-config consumer, five affected public headers compiled independently, and git diff --check also passed.

Out-of-tree validation used the source src/ include path, the generated source-side IntaRNA.pc expected by current build rules, and unchanged CLI fixtures copied into each build's tests/data/; no expected outputs were regenerated.

Tradeoff: enabling this option runs the selected MFE predictor once per admitted seed, plus one ordinary pass when statistics/trackers are needed. Runtime can increase substantially; retained candidate storage is bounded by K sites per seed. Model P uses its existing anchor decomposition directly, including its canonical ownership of nested explicit seeds and the existing legacy bulged-mode limitations. Custom MFE predictor subclasses can override the per-seed factory hook; incompatible inherited factories fail explicitly instead of silently dropping custom recurrence behavior.

@martin-raden

Copy link
Copy Markdown
Member

@Alexander-Mitrofanov

thanks, please extend:

incorporate into "gui"

  • add a new input field for "--outNumberPerSeed" similar to "outNumber" input on right of "outNumber" and left of "outOverlap"
    • default value = "0"
  • move "outMaxE", "outDeltaE" and "outMinPu" into a new second row (making the current 2nd row the 3rd)

@martin-raden
martin-raden merged commit 084e1b2 into master Oct 26, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RRI output diversity: 1 mfe per seed

2 participants