-
Notifications
You must be signed in to change notification settings - Fork 38
Handling of applied variants with and without modifications #974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Handling of applied variants with and without modifications #974
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the variant modification system by explicitly separating unapplied database sequence variants from applied sequence variants. The key improvement is that applied variants are now removed from the SequenceVariations collection and tracked separately in AppliedSequenceVariations, providing clearer representation of variant state throughout the codebase.
Key changes:
- Modified
CreateVariantsignatures to accept bothsequenceVariants(database variants) andappliedSequenceVariantsparameters - Implemented logic to remove applied variants from
SequenceVariationscollection in variant construction - Updated all test assertions to reflect the new behavior where variants with applied sequence variations have empty
SequenceVariationslists
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| mzLib/Transcriptomics/RNA.cs | Added overloaded constructor with explicit sequenceVariants parameter and removal logic for applied variants |
| mzLib/Transcriptomics/NucleicAcid.cs | Updated abstract CreateVariant signature to include sequenceVariants parameter |
| mzLib/Proteomics/Protein/Protein.cs | Updated CreateVariant implementation with variant removal logic matching RNA implementation |
| mzLib/Omics/BioPolymer/VariantApplication.cs | Modified variant application logic to pass database variants explicitly through construction chain |
| mzLib/Omics/BioPolymer/IHasSequenceVariants.cs | Updated interface signature and documentation for CreateVariant method |
| mzLib/Test/Transcriptomics/TestVariantOligo.cs | Updated test assertions to expect 0 unapplied variants after application; split test cases and added documentation |
| mzLib/Test/DatabaseTests/TestVariantProtein.cs | Updated test assertions and added comprehensive test for VCF variant with modifications |
| mzLib/Test/Test.csproj | Added new test data file to project |
| mzLib/Test/DatabaseTests/oneVcfProteinWithModsOnVariant.xml | New test data file for VCF variant testing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // • maxHeterozygousVariants only affects heterozygous logic.It does nothing for homozygous ALT variants. | ||
| // Why your specific test applies the variant Your vcfstring is GT= 1 / 1 with AD = 0,15 (ALT depth 15). With the default minAlleleDepth=1 (you didn’t override it), | ||
| // ApplyVariants treats this as homozygous ALT with sufficient depth and applies it, returning only the variant protein. | ||
| // </summary> |
Copilot
AI
Oct 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected XML comment closing tag from '// ' to '/// '.
| // </summary> | |
| /// </summary> |
Codecov Report❌ Patch coverage is Please upload reports for the commit c503815 to get more accurate results.
Additional details and impacted files@@ Coverage Diff @@
## master #974 +/- ##
==========================================
+ Coverage 81.00% 81.01% +0.01%
==========================================
Files 269 269
Lines 38826 38869 +43
Branches 4241 4247 +6
==========================================
+ Hits 31450 31490 +40
Misses 6640 6640
- Partials 736 739 +3
🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
mzLib/Test/DatabaseTests/TestVariantProtein.cs:1
- The test attribute
[Test]is missing from this test method. Without it, the test will not be executed by the test runner.
using System;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…/trishorts/mzLib into variantModificationTestExpansion
…to write that mod to the database
Few things here: