rformassspectrometry / Spectra

Low level infrastructure to handle MS spectra
https://rformassspectrometry.github.io/Spectra/
34 stars 24 forks source link

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

Closed jorainer closed 3 months ago

jorainer commented 3 months ago

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.

jorainer commented 3 months ago

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

mar-garcia commented 3 months ago

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 commented 3 months ago

that's perfect, thanks @mar-garcia !