Skip to content

Conversation

@bencap
Copy link
Collaborator

@bencap bencap commented Dec 4, 2025

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_type logic to support forced patching and better decision-making. Several function signatures were also updated to use Mapping for type safety.

Logging and Operational Transparency

  • Added logging setup and startup message in src/api/server_main.py to provide better visibility into server operations.
  • Introduced _logger instances and added informative log messages in src/api/routers/map.py, src/dcd_mapping/align.py, src/dcd_mapping/mavedb_data.py, and src/dcd_mapping/vrs_map.py to track key events and decisions in the workflow. [1] [2] [3]

Alignment Error Handling

  • Enhanced error handling in build_alignment_result to retry BLAT alignment at the protein level if nucleotide-level alignment fails, with appropriate warning and error logs.

Patch Target Sequence Type Logic

  • Refactored patch_target_sequence_type to accept a force parameter, improve decision logic, and add debug/info logs for patching decisions.
  • Updated calls to patch_target_sequence_type to use the new force parameter in mapping workflows. [1] [2]

Type Safety and Function Signature Updates

  • Changed function signatures to use Mapping instead of dict for alignment results and transcript selection, improving type safety and code clarity. [1] [2] [3]

Imports and Dependency Management

  • Updated imports to include new dependencies and ensure correct module usage for logging and refactored functions. [1] [2]

@bencap bencap force-pushed the feature/bencap/57/auto-failover-to-protein-level-alignment branch from 14296e4 to 84b5e58 Compare December 5, 2025 01:56
@bencap bencap requested a review from sallybg December 5, 2025 01:57
@bencap bencap marked this pull request as ready for review December 5, 2025 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-failover to protein level alignment and mapping if nucleotide alignment failed

3 participants