-
Notifications
You must be signed in to change notification settings - Fork 48
MetaMorpheusDIA #2546
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?
MetaMorpheusDIA #2546
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2546 +/- ##
==========================================
+ Coverage 96.75% 96.86% +0.11%
==========================================
Files 157 167 +10
Lines 23410 23886 +476
Branches 3252 3315 +63
==========================================
+ Hits 22650 23138 +488
+ Misses 755 743 -12
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Precursor/FragmentRank removed
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…pingEngine.cs Co-authored-by: Copilot <[email protected]>
…i/MetaMorpheus into precursorFragmentGroup
…i/MetaMorpheus into precursorFragmentGroup
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 introduces DIA (Data-Independent Acquisition) analysis capabilities to MetaMorpheus by implementing a workflow that reconstructs DIA MS2 scans into pseudo Ms2WithSpecificMass objects that can be searched by existing DDA search engines.
Key changes:
- Implements a complete DIA workflow including MS2 scan grouping by isolation windows, XIC construction, precursor-fragment grouping, and pseudo MS2 scan generation
- Introduces abstract base classes (XicConstructor, PfGroupingEngine) with concrete implementations for different XIC construction strategies
- Adds comprehensive test coverage for all major DIA workflow components
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
Test.csproj | Adds test data file for DIA testing |
TestXicGrouping.cs | Comprehensive tests for XIC correlation, overlap calculations, and grouping logic |
DIAEngineTest.cs | End-to-end tests for the complete DIA workflow including scan window mapping and pseudo scan conversion |
XicConstructor.cs | Abstract base class defining XIC construction interface |
NeutralMassXicConstructor.cs | Concrete implementation for neutral mass-based XIC construction |
MzPeakXicConstructor.cs | Concrete implementation for m/z peak-based XIC construction |
PrecursorFragmentPair.cs | Data structure representing precursor-fragment XIC pairs |
XicGroupingEngine.cs | Implementation of precursor-fragment grouping based on correlation and overlap thresholds |
PfGroupingEngine.cs | Abstract base class for precursor-fragment grouping strategies |
PrecursorFragmentGroup.cs | Core logic for XIC correlation/overlap calculations and pseudo MS2 scan generation |
PseudoMs2ConstructionType.cs | Enum defining different pseudo MS2 construction strategies |
DIAparameters.cs | Configuration class for DIA workflow parameters |
DIAEngine.cs | Main engine orchestrating the complete DIA workflow |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
MetaMorpheus/EngineLayer/DIA/PrecursorFragmentGrouping/XicGroupingEngine.cs
Outdated
Show resolved
Hide resolved
MetaMorpheus/EngineLayer/DIA/PrecursorFragmentGrouping/XicGroupingEngine.cs
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
…pingEngine.cs Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
pfGroup.PFpairs.Sort((a, b) => a.FragmentXic.AveragedM.CompareTo(b.FragmentXic.AveragedM)); | ||
// This is currently taking the mz value of the first peak as the representative mz for the fragment XIC; it is only for testing purposes | ||
// It will be changed to the mz value of the highest peak or the averaged mz value of the XIC when there is a release for the updated mzLib. | ||
var mzs = pfGroup.PFpairs.Select(pf => (double)pf.FragmentXic.Peaks.First().M).ToArray(); |
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.
This should be updated after new mzlib is merged and before we merge this PR.
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.
There are many places in which this class can be optimized. The main slowdowns here will be collection handling. Many new lists are created throughout this process and immediately discarded. We can optimize this by using object pools and IEnumerable return.
I am happy to work with you on this if you would like, either before or after this PR is merged
This is the first part of incorporating DIA analysis into MetaMorpheus. The DIA workflow being implemented here reconstructs DIA MS2 scans into pseudo Ms2WithSpecificMass that can be searched directly by our DDA search engines. This includes the following steps:
The DIAEngine class contains this complete workflow and outputs the final list of pseudo Ms2WithSpecificMass. Inside DIAEngine, the process of constructing XICs and grouping precursors and fragments are represented by abstract classes XicConstructor and PfGroupingEngine that can take in different strategies.