lgatto / MSnbase

Base Classes and Functions for Mass Spectrometry and Proteomics
http://lgatto.github.io/MSnbase/
123 stars 50 forks source link

Fix for Issue #583 #586

Closed Pascallio closed 1 year ago

Pascallio commented 1 year ago

This fix adds the parameter descendIfEdge, which changes the behavior of descendPeak if set to TRUE. Doing so will continue the descend if the centroid is near the end of the spectrum by using the full width instead of the half width. Defaults to FALSE to keep the current behavior to preserve current centroid results.

jorainer commented 1 year ago

@Pascallio can I also ask you to have a look whether also the (newer) function in MsCoreUtils has the same issue?

https://github.com/rformassspectrometry/MsCoreUtils/blob/master/R/refineCentroids.R

lgatto commented 1 year ago

Thank you. @Pascallio, if you want, feel free to add yourself to the contributors in the DESCRIPTION file. Bug reports and fixes are important contributions to open source software and deserve proper credit.

Pascallio commented 1 year ago

Thanks @lgatto , I will add myself to the DESCRIPTION file.

It seems the refineCentroids function does not have this exact issue @jorainer , however I did find two other issues (possibly related to this issue) for which I will open separate issues in MsCoreUtils.

On a related note, I made an RCPP version of the descendPeaks function that I can share if you are interested?

jorainer commented 1 year ago

On a related note, I made an RCPP version of the descendPeaks function that I can share if you are interested?

Oh, yes, we would be interested. That should ideally go to MsCoreUtils - good that you already have a look at the code there ;) - and would obviously also deserve a contributor role there.