Conversation
folded
commented
Feb 21, 2026
- feat: Protein variant projection improvements and v0.3.0 release
- Move performance graph to external themed SVGs and use
in README
This commit consolidates a series of structural and correctness improvements to the protein variant projection engine and establishes the v0.3.0 baseline. Core Library (hgvs-weaver): - Refactored `EquivalenceLevel` enum for clarity (Identity vs. Analogous). - Implemented support for Selenoproteins, allowing correct variant projection in transcripts with internal stop codons (e.g., GPX1). - Added a \"God-Mode\" threshold for CDS end coordinates to filter 3' UTR noise: Variants after the primary stop codon are now correctly projected as p.(=). - Corrected distal frameshift termination offsets to follow HGVS spec (+1 relative to the synthesized stop codon). - Refactored coordinate mapping to be anchor-aware, resolving off-by-one errors at transcript boundaries. - Improved repeat region handling by fetching full reference sequences for alignment. - Enhanced out-of-bounds error reporting with explicit coordinate validation. Performance & Visualization: - Overhauled README.md performance dashboard with a new stacked bar chart format. - Added success breakdown: Identity Match vs. Analogous (biologically equivalent) Match. - Recalibrated historical benchmarking data (back to 0.1.0) to include the new granular success metrics for both Weaver and Ref-HGVS. - Achieved a validated 98.77% total success rate on 100k ClinVar variants. Tooling & Release: - Bumped version to 0.3.0 across pyproject.toml and Cargo.toml. - Updated analysis and visualization scripts for automated README generation. - Archived full validation results for the 0.3.0 release in the benchmark directory.
Summary of ChangesHello @folded, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the accuracy and robustness of protein variant projection and introduces a sophisticated system for classifying variant equivalence. By implementing granular equivalence levels and improving amino acid handling, the system can now better identify biologically identical variants despite notational differences. Additionally, the user experience is improved with theme-aware performance visualizations and clearer documentation of the new equivalence logic. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces significant improvements to protein variant projection and a new granular EquivalenceLevel enum, which enhances the library's ability to distinguish between identical notations and biologically equivalent but differently noted variants (e.g., insertions vs. duplications). The move to external themed SVGs in the README and the addition of a troubleshooting section for stub_gen are also welcome improvements. However, there is a regression in how variants affecting the stop codon are normalized, and an efficiency bottleneck in the Python DataProvider's protein sequence retrieval that should be addressed to maintain the library's high-performance goals.
- Normalize p.fsTer1 to standard nonsense (e.g., p.Arg83Ter) or synonymous (e.g., p.Ter1=) descriptions as per HGVS recommendations. - Refactored reporting layer in `altseq_to_hgvsp.rs` to handle this edge case while preserving mechanisitic metadata in the core. - Added regression tests in `analogous_test.rs`. - Finalized v0.3.0 performance visualizations and pre-commit fixes.
Avoids functools.lru_cache on method to eliminate potential memory leak warnings and provide explicit cache management.