MsCoreUtils icon indicating copy to clipboard operation
MsCoreUtils copied to clipboard

Expand possible smoothers

Open ococrook opened this issue 4 years ago • 6 comments

Having the MA, WMA and SG smoothers are great, especially for noisy spectra. Though I have noticed poor performance occasionaly (and empircally) for low-intensity spectra which are slightly skewed. A number of fast, alternative smoothers/filters are available (such as wavelets), but I dont know how they perform empirically. I'm wondering if it would be possible to expand the set of possible smoothers. A couple of questions/thoughts, as I dont want to repeat work or if these conclusions have already been acheived many years ago:

  1. I'd be happy to implement and test the relative merits of the approaches.
  2. I can start a package called MSsmoothers (depending on Spectra), which could stand on its own or could be gobbled into another package later
  3. Any methods that people would want to be tested?
  4. What criteria is it good to test performance against?
  5. general thoughts

ococrook avatar Mar 30 '21 10:03 ococrook

The smoothers were all implemented by @sgibb (that's why I'm pinging him here). In general I would be superhappy if you would contribute additional smoothing approaches. Ideally, you could define smoothing function(s) that you apply to a Spectra by passing it to addProcessing. Whether they should go into a separate package or directly into Spectra or even MsCoreUtils is something we should then decide at one point - if they would not add too many dependencies I would be OK adding them to MsCoreUtils maybe.

jorainer avatar Mar 30 '21 13:03 jorainer

For the other questions (3-4) I actually don't know - I'm mostly working with centroided spectra.

jorainer avatar Mar 30 '21 13:03 jorainer

Point taken on dependencies, and I'd do everything in the same style as the current smoother approaches. Question since you work with centroided spectra, do you centroid from profile data and ever find the m/z is slightly too high because of the right skew of Spectra? (or are you not centroiding yourself?)

ococrook avatar Mar 30 '21 13:03 ococrook

The idea is to have low level implementations in MsCoreUtils, and then use them in Spectra (though addProcessing, as mentioned above). I would certainly welcome new smoothers in MsCoreUtils or elsewhere.

lgatto avatar Mar 30 '21 13:03 lgatto

Yepp, we're recording the data in profile mode and doing the centroiding in R (with MSnbase). I made some comparisons some time ago and found that this option:

                tmp <- pickPeaks(
                    smooth(tmp, method = "SavitzkyGolay",
                           halfWindowSize = 6L),
                    refineMz = "descendPeak", signalPercentage = 33)

worked best for us. And this was better than the build-in centroiding in the Sciex software or proteowizard centroiding. I was comparing the difference between expected and measured m/z as well as the scattering of m/z for the same ion in consecutive scans (LC-MS data).

jorainer avatar Mar 31 '21 05:03 jorainer

Great, we've independently reached a similar conclusion - though I'm doing it via spectra

ococrook avatar Mar 31 '21 09:03 ococrook