Auto-failover for Protein Level Alignment #64
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.
This pull request introduces improved logging and error handling throughout the mapping and alignment workflow, as well as refactors some function signatures for clarity and robustness. The most significant changes include enhanced logging for debugging and operational transparency, more resilient alignment logic that retries at the protein level if nucleotide-level alignment fails, and updates to the
patch_target_sequence_typelogic to support forced patching and better decision-making. Several function signatures were also updated to useMappingfor type safety.Logging and Operational Transparency
src/api/server_main.pyto provide better visibility into server operations._loggerinstances and added informative log messages insrc/api/routers/map.py,src/dcd_mapping/align.py,src/dcd_mapping/mavedb_data.py, andsrc/dcd_mapping/vrs_map.pyto track key events and decisions in the workflow. [1] [2] [3]Alignment Error Handling
build_alignment_resultto retry BLAT alignment at the protein level if nucleotide-level alignment fails, with appropriate warning and error logs.Patch Target Sequence Type Logic
patch_target_sequence_typeto accept aforceparameter, improve decision logic, and add debug/info logs for patching decisions.patch_target_sequence_typeto use the newforceparameter in mapping workflows. [1] [2]Type Safety and Function Signature Updates
Mappinginstead ofdictfor alignment results and transcript selection, improving type safety and code clarity. [1] [2] [3]Imports and Dependency Management