Repository navigation
Fix base_pairs() missing base pairs with parallel base normals - #1108
Merged
padix-key merged 1 commit intoNov 28, 2026
Merged
Conversation
padix-key
force-pushed
the
fix/basepairs-parallel-normals
branch
from
November 26, 2026 14:53
9ed98bd to
f0133af
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
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.
base_pairs()documents DSSR criterion (iii) as "angle between the base normal vectors <=65°", but_check_dssr_criteria()only accepted pairs whose normal vectors are nearly antiparallel (angle >=115°). Pairs in which both bases share the same face (DSSR's M+N pairs with a positive scalar product of the z-axes, e.g. reverse Watson-Crick and Hoogsteen pairs) were therefore never found. The DSSR paper (Lu et al. 2015, doi:10.1093/nar/gkv716) states the criterion without a direction, so the absolute value of the scalar product is now used. In 1EHZ the G15-C48 Levitt pair and A31-PSU39 are now found.This is a behaviour change of
base_pairs()and of everything built on it (dot_bracket_from_structure(),pseudoknots()input). It is a trade-off: for 1XNR withunique=False, compared to the NDB annotations intests/structure/data/base_pairs/(659 reference pairs), the number of reference pairs found rises from 532 to 592, while the pairs not in the reference rise from 70 to 123, i.e. precision drops from 88% to 83%. The additional non-reference pairs are mostly contacts with zero or one base-base hydrogen bond that are admitted by criterion (v).Changed test references: the expected values in
tests/structure/test_dotbracket.pyandtest_pseudoknotsintests/structure/test_pseudoknots.pyare no external data, but thebase_pairs()output for 4P5J, so they were regenerated.base_pairs()now finds four more pairs in 4P5J (author numbering): C8-C52, U26-C32, C63-C83 and U12-A50. The first three are listed in thendb_struct_na_base_paircategory of the 4P5J entry; with them all 32 pairs annotated there are found, before the fix 29 of them. U12-A50 is not annotated there, it is a contact between the uracil base and the ribose of A50. Hencebasepair_residue_positionshas 34 instead of 30 pairs andexpected_output12 instead of 2 dot-bracket strings. Intest_pseudoknotsthere are now 12 instead of 2 optimal solutions: C8-C52 has order 1, the order of A9-G48, G10-C49 and U12-A50 is a permutation of 1, 2 and 3, and either C63-C83 has order 2 or C82-A23(84) has order 1. The assertions of that test had to be restructured for this, as the old ones were written for exactly one pair of alternatives.Closes #1070
Authored by Claude