Skip to content

Conversation

@trishorts
Copy link
Contributor

@trishorts trishorts commented Nov 18, 2025

This pull request improves the accuracy and robustness of spectral angle calculations in the spectral library search workflow by correctly handling both absolute (Da) and ppm mass tolerances. It also adds a new unit test to verify this behavior. The most important changes are as follows:

Spectral similarity calculation improvements:

  • Updated the spectral angle calculation in SpectralLibrarySearchFunction.cs to check if the product mass tolerance is absolute or ppm, and to convert absolute tolerances to ppm based on the scan's precursor m/z. This ensures correct mass tolerance handling during spectrum similarity calculations. [1] [2] [3]

Testing enhancements:

  • Added a new unit test DaltonToleranceSpectralLibrarySearchTest in SpectralLibraryReaderTest.cs to verify that spectral angle calculations work correctly when using an absolute (Dalton) mass tolerance. The test checks that the normalized spectral angle is as expected.

Dependency and SDK adjustments:

  • Updated global.json to use .NET SDK version 8.0.100 and changed the roll-forward policy to latestPatch for improved stability and compatibility.

Code style and organization:

  • Cleaned up and reordered using directives in SpectralLibrarySearchFunction.cs for better readability and maintainability.
  • Minor formatting and whitespace adjustments for code clarity.

@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.71%. Comparing base (4465df8) to head (bbf0125).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2594      +/-   ##
==========================================
- Coverage   94.72%   94.71%   -0.01%     
==========================================
  Files         187      187              
  Lines       19651    19658       +7     
  Branches     3635     3641       +6     
==========================================
+ Hits        18614    18620       +6     
  Misses        566      566              
- Partials      471      472       +1     
Flag Coverage Δ
unittests 94.71% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...tralLibrarySearch/SpectralLibrarySearchFunction.cs 98.46% <100.00%> (+0.18%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@trishorts trishorts requested a review from Copilot November 18, 2025 21:47
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@trishorts trishorts requested a review from Copilot November 19, 2025 16:50
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

nbollis
nbollis previously approved these changes Nov 19, 2025
pcruzparri
pcruzparri previously approved these changes Dec 16, 2025
zhuoxinshi
zhuoxinshi previously approved these changes Dec 18, 2025
@trishorts trishorts dismissed stale reviews from zhuoxinshi, pcruzparri, and nbollis via 565c175 December 18, 2025 16:46
Alexander-Sol
Alexander-Sol previously approved these changes Dec 18, 2025
nbollis
nbollis previously approved these changes Jan 12, 2026
RayMSMS
RayMSMS previously approved these changes Jan 22, 2026
@trishorts trishorts dismissed stale reviews from RayMSMS, Alexander-Sol, and nbollis via 5258eb6 January 22, 2026 17:56
@Alexander-Sol Alexander-Sol merged commit 4954590 into smith-chem-wisc:master Jan 26, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants