-
Notifications
You must be signed in to change notification settings - Fork 38
out matchedPeaks in GetAllXics #958
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?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #958 +/- ##
=======================================
Coverage 80.97% 80.97%
=======================================
Files 269 269
Lines 38740 38740
Branches 4226 4226
=======================================
Hits 31371 31371
Misses 6639 6639
Partials 730 730
🚀 New features to boost your workflow:
|
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 modifies the GetAllXics method to expose matched peaks information by adding an out parameter. This allows callers to receive a dictionary mapping individual peaks to their corresponding XICs, improving visibility into the peak-matching process.
- Changed
GetAllXicsmethod signature to includeout Dictionary<IIndexedPeak, ExtractedIonChromatogram> matchedPeaksparameter - Updated all test cases to capture the new
outparameter - Added test assertion to verify the total count of matched peaks
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| mzLib/MassSpectrometry/PeakIndexing/IndexingEngine.cs | Modified GetAllXics method signature to expose matchedPeaks as an out parameter instead of keeping it internal |
| mzLib/Test/TestXic.cs | Updated all test calls to GetAllXics to capture the new out parameter and added validation for matched peaks count |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| /// <param name="cutPeakDiscriminationFactor"> The discrimination factor to determine if a peak should be cut if we are doing peak cutting </param> | ||
| /// <returns> A list of ExtractedIonChromatogram objects representing all XICs that can be found in an indexingEngine </returns> | ||
| public virtual List<ExtractedIonChromatogram> GetAllXics(Tolerance peakFindingTolerance, int maxMissedScanAllowed, double maxRTRange, int numPeakThreshold, double? cutPeakDiscriminationFactor = null) | ||
| public virtual List<ExtractedIonChromatogram> GetAllXics(Tolerance peakFindingTolerance, int maxMissedScanAllowed, double maxRTRange, int numPeakThreshold, out Dictionary<IIndexedPeak, ExtractedIonChromatogram> matchedPeaks, double? cutPeakDiscriminationFactor = null) |
Copilot
AI
Oct 21, 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.
The optional parameter cutPeakDiscriminationFactor should appear before the out parameter matchedPeaks. In C#, optional parameters must come after all required parameters, but out parameters are considered required. The current ordering violates this convention and could cause API confusion.
No description provided.