OpenMS / OpenMS

The codebase of the OpenMS project
https://www.openms.de
Other
478 stars 318 forks source link

PeakPickerHiRes fails with leading flank peaks #5687

Open hroest opened 2 years ago

hroest commented 2 years ago

Issue

In timsTOF data we sometimes see m/z peaks that have a leading flank and do not have lower intensity peaks on both sides of the peak: Screenshot from 2021-11-26 12-27-11

(see peak on the left).

Running the PPHiRes will miss this peak: Screenshot from 2021-11-26 12-29-16

This is obviously not really a great situation as the most intense peak of an isotopic envelope is missed.

Reproduce

./bin/PeakPickerHiRes -in /tmp/test.mzML -out /tmp/pp_out.mzML -force -algorithm:ms_levels  1 \
-algorithm:spacing_difference_gap 4 -algorithm:spacing_difference 4 -algorithm:missing  4

test.mzML.gz

timosachsenberg commented 2 years ago

Good find. I am a bit surprised that this happens.

hroest commented 2 years ago

Good find. I am a bit surprised that this happens.

@timosachsenberg its currently an integral part of the algorithm, it looks for peaks that have a smaller peak on both sides, eg 20, 40, 50, 40, 20 but not for one-sided peaks eg 20, 40, 50

timosachsenberg commented 2 years ago

Is this a result of Bruker timsTOF recording in centroided mode and then merging spectra? The issue https://github.com/ProteoWizard/pwiz/issues/886 sounded like that.

hroest commented 2 years ago

this is recording Bruker timsTOF data in profile mode but there is preprocessing going on, directly on the instrument leading to this data. This is not centroid mode, this is as raw as you can get (as they let you get it)

timosachsenberg commented 2 years ago

ah ok. From the linked issue I thought these are pseudo-profile spectra

timosachsenberg commented 2 years ago

@hroest we are currently squeezing bugs for the next release. Would you or someone in your lab have time to give this another look and maybe provide a fix (e.g., allow one-sided peaks)?

timosachsenberg commented 2 years ago

Maybe one could just detect either left or right missing flank and allow it? https://github.com/OpenMS/OpenMS/blob/develop/src/openms/source/TRANSFORMATIONS/RAW2PEAK/PeakPickerHiRes.cpp#L209-L216