Repository navigation
Faster prefilter and alignment stage, bit-identical to 1.0.0 - #46
Merged
Merged
Conversation
Query positions are grouped by 4-mer code, so a code that recurs in the query (helical homopolymer 4-mers, which also have the longest posting lists) is scanned once instead of once per position. Output is identical to the released kernel; test added for repeated codes. NuFold v914, top_n 500, single core: prefilter 1.92x, search 1.58x faster.
SW traceback: flat uninitialised pointer matrix (row/column 0 are never read), H rows swapped instead of copied and zeroed, substitution row hoisted. Recurrences, comparison order and tie rules are unchanged. TM_a: the block-seed refinement stops once its selection repeats a step of the all-pairs run at the same or an earlier step; the rest of that run cannot raise the maximum. Gapless alignments (block = every pair) skip it entirely. tests/structure_score_v100.py freezes the 1.0.0 module as the reference for the new bitwise equivalence tests. NuFold v914, 50,000 query-candidate pairs: 0 mismatches, SW+TM_a stage 1.09x faster.
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.
Code-only speed-ups. No change to the algorithm, parameters (top_n 500), scores or rankings.
Prefilter (4d19b49): query positions are grouped by 4-mer code, so each posting list is read once per distinct code instead of once per query position. Helical homopolymer 4-mers recur at many positions and have the longest lists (up to 1.59M postings), so this removes most index reads. Output is identical to the released kernel.
SW traceback + TM_a (cc771cf):
Verification
tests/structure_score_v100.pyfreezes the 1.0.0 module;tests/test_structure_score_equivalence.pychecks SW, TM_a andscore_candidatesagainst it bit for bit. Added a repeated-code prefilter test.Speed (single core)