Skip to content

Conversation

@zhuoxinshi
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.97%. Comparing base (f066fac) to head (78d64ca).

Additional details and impacted files

Impacted file tree graph

@@           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           
Files with missing lines Coverage Δ
...ib/MassSpectrometry/PeakIndexing/IndexingEngine.cs 95.47% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@trishorts trishorts requested a review from Copilot October 21, 2025 16:10
Copy link
Contributor

Copilot AI left a 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 GetAllXics method signature to include out Dictionary<IIndexedPeak, ExtractedIonChromatogram> matchedPeaks parameter
  • Updated all test cases to capture the new out parameter
  • 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)
Copy link

Copilot AI Oct 21, 2025

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.

Copilot uses AI. Check for mistakes.
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.

1 participant