fixes peak boundaries in PeakPickerHiRes (resolves #1022)

The previous version of the PeakPickerHiRes algorithm relied on trailing zeros of peaks to detect peak boundaries correctly. If such zeros are not present, as in simulated data, the peak boundaries were extended to the previous and next peak, see #1022. This pull request resolves to issue by checking for large gaps in m/z.

The following changes were made:
(i) The number of allowed missing data points when extending to the left/right is now  variable. It can be set with the new advanced parameter missing_.
(ii) Locally, the spacing of the m/z is constant. A missing data point can therefore be defined by > 1.5 * min_spacing [1]. This magic number does not even appear as advanced parameter.
(iii) A large gap is now defined as > spacing_difference_ * min_spacing with default spacing_difference_ = 4. If such a gap occurs the extension is stopped.

The modified code is not used on typical orbitrap data (trailing zeros before big gaps, no missing data points). In simulated data the peak boundaries are now correctly detected, see extended PeakPickerHiRes_test. Together with @timosachsenberg we compared before/after on an orbitrap and a simulated data set.

[1] min_spacing is the smaller of the two m/z steps to the left/right from the seed.
well, I guess most MS data is (at least locally) equispaced. Still I would
suggest to test it on TOF data first as well. Also I dont think that "the
fewer parameter the better" is in any sense meaningful if the parameter is
just hard-coded. If there is an actual parameter then I prefer to able to
adjust it from the command line and not re-compile OpenMS!

On 2 October 2014 13:47, Lars Nilse <notifications@github.com> wrote:

> In src/openms/include/OpenMS/TRANSFORMATIONS/RAW2PEAK/PeakPickerHiRes.h:
>
> > @@ -227,15 +228,17 @@ namespace OpenMS
> >                act_snt_lk = snt.getSignalToNoise(input[i - k]);
> >              }
> >
> > -
> > -            if (act_snt_lk >= signal_to_noise_ && std::fabs(input[i - k].getMZ() - peak_raw_data.begin()->first) < spacing_difference_ * min_spacing)
> > +            if (act_snt_lk >= signal_to_noise_ && std::fabs(input[i - k].getMZ() - peak_raw_data.begin()->first) < 1.5 * min_spacing)
>
> @hroest <https://github.com/hroest> I had a quick discussion with
> @timosachsenberg <https://github.com/timosachsenberg> yesterday. We
> wanted to put this up for discussion in the pull request. Here is my
> reasoning (but I am also happy to introduce a new parameter):
>
> The concept of a 'missing data point' makes only sense in (locally)
> equispaced data. If they aren't, you couldn't spot one missing. If they are
> equispaced, the m/z steps vary only minutely. With any factor 1.1 < f < 2
> you can spot that a data point from a series was removed. The fewer
> (advanced) parameters the better.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/OpenMS/OpenMS/pull/1032/files#r18334129>.
>