Repository navigation
Conversation
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
🟡 Changes recommended
Zero-weight tables can be falsely rejected as overflowing, and the canonical API reference is incomplete.
2 open findings
What changed in this PR
Adds positional weighting and exhaustive ball reduction to native gap-block scoring.
Changes:
- Adds length-indexed positional weights to matrix and count scoring.
- Adds
ball_batchwithout dense matrix allocation. - Adds validation, documentation, and correctness tests.
| File | Description |
|---|---|
src/gapblock.cpp |
Implements weighted scoring and ball reduction. |
src/_bindings.cpp |
Exposes native APIs to Python. |
python/seqtree/gapblock.py |
Adds validation and public wrappers. |
include/seqtree/seqtree.hpp |
Declares the expanded C++ API. |
docs/gapblock.rst |
Documents weights and ball behavior. |
tests/python/test_gapblock_position_weights.py |
Tests scoring, reducers, and validation. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| gap_prior: GapPrior | None = None, | ||
| alphabet: str = "aa", | ||
| threads: int = 0, | ||
| position_weights_by_length=None, |
Co-Authored-By: Codex <noreply@openai.com>
Member
Author
|
Superseded by the consolidated seqtree 1.1.0 release PR #13; its implementation and validation are retained there. |
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.


Gap-block batch scoring currently accepts only one global substitution matrix. Add optional integer weights indexed by full sequence length, using the longer sequence as the symmetric positional frame. Equal-length scoring reduces to the original weighted substitution sum; omitted weights preserve existing behavior.
Matrix and count reducers share the same native cell. An exhaustive ball reducer returns all accepted reference rows without allocating a dense matrix. Exact exclusions, duplicate rows and reference order are preserved. Width, integer and overflow validation reject invalid tables. This does not introduce an indexed search or statistical calibration.
Validation: 121 installed-binary Python checks, 42 native oracle cells under UBSan, warning-free Sphinx build, independent review including negative-thread compatibility. Stacked on the histogram fast path; no release publication.