Skip to content
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

feat: add estimatePrecursorMz function (issue #315) #317

Merged
merged 4 commits into from
Mar 28, 2024

Conversation

jorainer
Copy link
Member

  • Add the estimatePrecursorMz functions to estimate/adjust the reported precursor m/z for DDA spectra.

This PR fixes issue #315 , i.e. for DDA data from Waters instruments, the reported precursor m/z value might not be correct because it is not being corrected through the lockmass calibration. Would also be good to get hold of some more (different) Waters DDA files to check.

- Add the `estimatePrecursorMz` functions to estimate/adjust the reported
  precursor m/z for DDA spectra.
Copy link
Collaborator

@philouail philouail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good to me, super cool function and good that this issue was discovered ! I was just confused by one paragraph in the documentation, I put an alternative in case.

@jorainer
Copy link
Member Author

@mar-garcia , can you please check the documentation of the function? just to ensure it's correct and describes the problem properly.

@mar-garcia
Copy link
Contributor

Not sure how I can check the documentation.... I've just checked what is written here: https://github.com/rformassspectrometry/Spectra/blob/adjust_precursor_mz/R/Spectra-estimatePrecursorMz.R
The only small detail I would add the specifcation "in the previous MS1 spectrum" in the following sentence:
Thus, for each fragment spectrum, this method identifies in the previous MS1 spectrum the peak with the highest intensity and an m/z value similar to the fragment spectrum's reported precursor m/z (given parameters tolerance and ppm).

@jorainer
Copy link
Member Author

that's perfect, thanks @mar-garcia !

@jorainer jorainer merged commit 0dddf0f into main Mar 28, 2024
6 checks passed
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.

3 participants