Devel#38
Open
huiwenke wants to merge 38 commits into
Open
Conversation
…r short sub-blocks
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.
Summary
This PR refactors and extends the flexible alignment (
flexalign) engine in US-align.The main changes include:
-mm 7option.FLEX_BESTas the default flexible alignment mode.-afp.-hingecommand-line option for user-controlled hinge constraints.Key Features & Implementation Details
1. Standard Flexible Alignment (
-mm 7)Running
-mm 7without-afpperforms flexible alignment usingFLEX_BESTmode (flexalign_greedy).Automatic Secondary-Structure Optimization
The alignment is performed using both secondary-structure configurations (
ss_opt = 0andss_opt = 1), and the alignment with the higher TM-score is retained automatically.2. USBCAT Flexible Alignment (
-mm 7 -afp)Using
-afptogether with-mm 7enablesFLEX_USBCAT, which invokesflexalign_usbcat/flexalign_usbcat_main.USBCAT combines topology-based flexible segmentation with the standard US-align TM-score optimization through the following workflow.
Baseline Alignment
A baseline alignment is first computed using
flexalign_greedyunder both secondary-structure configurations (ss_opt = 0andss_opt = 1). The best TM-score is stored asbest_global_max_TM.Early Exit
If the baseline alignment already satisfies
the baseline result is accepted directly and the remaining USBCAT pipeline is skipped.
AFP Generation and Search-Space Pruning
During AFP generation in
generate_bounds,best_global_max_TMprovides an alignment-score baseline for pruning the search space.Candidate regions whose upper-bound alignment length (
d3_term) cannot exceedare discarded before Kabsch fitting and distance evaluation, reducing unnecessary computations.
Distance Precalculation
Intra-protein distance matrices (
disTable1anddisTable2) are precomputed within a sliding window (max_dist_window) to accelerate repeated dRMSD calculations during AFP evaluation.AFP Seed Optimization (
fragLen = 12)Initial AFPs are generated using Kabsch superposition with
Using a longer seed fragment reduces noisy candidate AFPs during the initial search and decreases the number of candidates processed in subsequent chaining and domain splitting.
Adjacent AFPs located along the same alignment diagonal are subsequently merged.
Dynamic Programming and Domain Splitting
AFP chaining and domain partitioning are performed using the dual dynamic programming procedure implemented in
generate_bounds.The optimization considers gap, twist, and RMSD penalty terms to identify geometrically consistent hinge positions and structural domains.
Block Refinement with US-align
The resulting structural blocks are refined using the standard US-align optimization (
execute_flexalign_with_fallback).The optimized local alignments are then assembled into the final flexible alignment.
3. Hinge Control
The command-line parser has been updated to support the
-hingeoption.A corresponding internal flag (
hinge_set) is introduced to distinguish user-specified hinge limits from the default value (hinge_opt = 9) during multi-block alignment.Command-Line Usage