Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
PeakPickerHiRes.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2016.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Erhan Kenar $
32 // --------------------------------------------------------------------------
33 
34 #ifndef OPENMS_TRANSFORMATIONS_RAW2PEAK_PEAKPICKERHIRES_H
35 #define OPENMS_TRANSFORMATIONS_RAW2PEAK_PEAKPICKERHIRES_H
36 
43 
45 
46 
47 #define DEBUG_PEAK_PICKING
48 #undef DEBUG_PEAK_PICKING
49 //#undef DEBUG_DECONV
50 namespace OpenMS
51 {
75  class OPENMS_DLLAPI PeakPickerHiRes :
76  public DefaultParamHandler,
77  public ProgressLogger
78  {
79 public:
82 
84  virtual ~PeakPickerHiRes();
85 
87  struct PeakBoundary
88  {
89  double mz_min;
90  double mz_max;
91  };
92 
101  template <typename PeakType>
102  void pick(const MSSpectrum<PeakType>& input, MSSpectrum<PeakType>& output) const
103  {
104  std::vector<PeakBoundary> boundaries;
105  pick(input, output, boundaries);
106  }
107 
118  template <typename PeakType>
119  void pick(const MSSpectrum<PeakType>& input, MSSpectrum<PeakType>& output, std::vector<PeakBoundary>& boundaries, bool check_spacings = true) const
120  {
121  // copy meta data of the input spectrum
122  output.clear(true);
123  output.SpectrumSettings::operator=(input);
124  output.MetaInfoInterface::operator=(input);
125  output.setRT(input.getRT());
126  output.setMSLevel(input.getMSLevel());
127  output.setName(input.getName());
129 
130  // don't pick a spectrum with less than 5 data points
131  if (input.size() < 5) return;
132 
133  // if both spacing constraints are disabled, don't check spacings at all:
134  if ((spacing_difference_ == std::numeric_limits<double>::infinity()) &&
135  (spacing_difference_gap_ == std::numeric_limits<double>::infinity()))
136  {
137  check_spacings = false;
138  }
139 
140  // signal-to-noise estimation
142  snt.setParameters(param_.copy("SignalToNoise:", true));
143 
144  if (signal_to_noise_ > 0.0)
145  {
146  snt.init(input);
147  }
148 
149  // find local maxima in raw data
150  for (Size i = 2; i < input.size() - 2; ++i)
151  {
152  double central_peak_mz = input[i].getMZ(), central_peak_int = input[i].getIntensity();
153  double left_neighbor_mz = input[i - 1].getMZ(), left_neighbor_int = input[i - 1].getIntensity();
154  double right_neighbor_mz = input[i + 1].getMZ(), right_neighbor_int = input[i + 1].getIntensity();
155 
156  // do not interpolate when the left or right support is a zero-data-point
157  if (std::fabs(left_neighbor_int) < std::numeric_limits<double>::epsilon()) continue;
158  if (std::fabs(right_neighbor_int) < std::numeric_limits<double>::epsilon()) continue;
159 
160  // MZ spacing sanity checks
161  double left_to_central = 0.0, central_to_right = 0.0, min_spacing = 0.0;
162  if (check_spacings)
163  {
164  left_to_central = central_peak_mz - left_neighbor_mz;
165  central_to_right = right_neighbor_mz - central_peak_mz;
166  min_spacing = (left_to_central < central_to_right) ? left_to_central : central_to_right;
167  }
168 
169  double act_snt = 0.0, act_snt_l1 = 0.0, act_snt_r1 = 0.0;
170  if (signal_to_noise_ > 0.0)
171  {
172  act_snt = snt.getSignalToNoise(input[i]);
173  act_snt_l1 = snt.getSignalToNoise(input[i - 1]);
174  act_snt_r1 = snt.getSignalToNoise(input[i + 1]);
175  }
176 
177  // look for peak cores meeting MZ and intensity/SNT criteria
178  if ((central_peak_int > left_neighbor_int) &&
179  (central_peak_int > right_neighbor_int) &&
180  (act_snt >= signal_to_noise_) &&
181  (act_snt_l1 >= signal_to_noise_) &&
182  (act_snt_r1 >= signal_to_noise_) &&
183  (!check_spacings ||
184  ((left_to_central < spacing_difference_ * min_spacing) &&
185  (central_to_right < spacing_difference_ * min_spacing))))
186  {
187  // special case: if a peak core is surrounded by more intense
188  // satellite peaks (indicates oscillation rather than
189  // real peaks) -> remove
190 
191  double act_snt_l2 = 0.0, act_snt_r2 = 0.0;
192 
193  if (signal_to_noise_ > 0.0)
194  {
195  act_snt_l2 = snt.getSignalToNoise(input[i - 2]);
196  act_snt_r2 = snt.getSignalToNoise(input[i + 2]);
197  }
198 
199  // checking signal-to-noise?
200  if ((i > 1) &&
201  (i + 2 < input.size()) &&
202  (left_neighbor_int < input[i - 2].getIntensity()) &&
203  (right_neighbor_int < input[i + 2].getIntensity()) &&
204  (act_snt_l2 >= signal_to_noise_) &&
205  (act_snt_r2 >= signal_to_noise_) &&
206  (!check_spacings ||
207  ((left_neighbor_mz - input[i - 2].getMZ() < spacing_difference_ * min_spacing) &&
208  (input[i + 2].getMZ() - right_neighbor_mz < spacing_difference_ * min_spacing))))
209  {
210  ++i;
211  continue;
212  }
213 
214  std::map<double, double> peak_raw_data;
215 
216  peak_raw_data[central_peak_mz] = central_peak_int;
217  peak_raw_data[left_neighbor_mz] = left_neighbor_int;
218  peak_raw_data[right_neighbor_mz] = right_neighbor_int;
219 
220  // peak core found, now extend it
221  // to the left
222  Size k = 2;
223 
224  bool previous_zero_left(false); // no need to extend peak if previous intensity was zero
225  Size missing_left(0);
226  Size left_boundary(i - 1); // index of the left boundary for the spline interpolation
227 
228  while ((k <= i) && // prevent underflow
229  (i - k + 1 > 0) &&
230  !previous_zero_left &&
231  (missing_left <= missing_) &&
232  (input[i - k].getIntensity() <= peak_raw_data.begin()->second) &&
233  (!check_spacings ||
234  (peak_raw_data.begin()->first - input[i - k].getMZ() < spacing_difference_gap_ * min_spacing)))
235  {
236  double act_snt_lk = 0.0;
237 
238  if (signal_to_noise_ > 0.0)
239  {
240  act_snt_lk = snt.getSignalToNoise(input[i - k]);
241  }
242 
243  if ((act_snt_lk >= signal_to_noise_) &&
244  (!check_spacings ||
245  (peak_raw_data.begin()->first - input[i - k].getMZ() < spacing_difference_ * min_spacing)))
246  {
247  peak_raw_data[input[i - k].getMZ()] = input[i - k].getIntensity();
248  }
249  else
250  {
251  ++missing_left;
252  if (missing_left <= missing_)
253  {
254  peak_raw_data[input[i - k].getMZ()] = input[i - k].getIntensity();
255  }
256  }
257 
258  previous_zero_left = (input[i - k].getIntensity() == 0);
259  left_boundary = i - k;
260  ++k;
261  }
262 
263  // to the right
264  k = 2;
265 
266  bool previous_zero_right(false); // no need to extend peak if previous intensity was zero
267  Size missing_right(0);
268  Size right_boundary(i+1); // index of the right boundary for the spline interpolation
269 
270  while ((i + k < input.size()) &&
271  !previous_zero_right &&
272  (missing_right <= missing_) &&
273  (input[i + k].getIntensity() <= peak_raw_data.rbegin()->second) &&
274  (!check_spacings ||
275  (input[i + k].getMZ() - peak_raw_data.rbegin()->first < spacing_difference_gap_ * min_spacing)))
276  {
277  double act_snt_rk = 0.0;
278 
279  if (signal_to_noise_ > 0.0)
280  {
281  act_snt_rk = snt.getSignalToNoise(input[i + k]);
282  }
283 
284  if ((act_snt_rk >= signal_to_noise_) &&
285  (!check_spacings ||
286  (input[i + k].getMZ() - peak_raw_data.rbegin()->first < spacing_difference_ * min_spacing)))
287  {
288  peak_raw_data[input[i + k].getMZ()] = input[i + k].getIntensity();
289  }
290  else
291  {
292  ++missing_right;
293  if (missing_right <= missing_)
294  {
295  peak_raw_data[input[i + k].getMZ()] = input[i + k].getIntensity();
296  }
297  }
298 
299  previous_zero_right = (input[i + k].getIntensity() == 0);
300  right_boundary = i + k;
301  ++k;
302  }
303 
304  //skip if the minimal number of 3 points for fitting is not reached
305  if (peak_raw_data.size() < 4) continue;
306 
307  CubicSpline2d peak_spline (peak_raw_data);
308 
309  // calculate maximum by evaluating the spline's 1st derivative
310  // (bisection method)
311  double max_peak_mz = central_peak_mz;
312  double max_peak_int = central_peak_int;
313  double threshold = 0.000001;
314  double lefthand = left_neighbor_mz;
315  double righthand = right_neighbor_mz;
316 
317  bool lefthand_sign = 1;
318  double eps = std::numeric_limits<double>::epsilon();
319 
320  // bisection
321  do
322  {
323  double mid = (lefthand + righthand) / 2.0;
324  double midpoint_deriv_val = peak_spline.derivatives(mid, 1);
325 
326  // if deriv nearly zero then maximum already found
327  if (!(std::fabs(midpoint_deriv_val) > eps))
328  {
329  break;
330  }
331 
332  bool midpoint_sign = (midpoint_deriv_val < 0.0) ? 0 : 1;
333 
334  if (lefthand_sign ^ midpoint_sign)
335  {
336  righthand = mid;
337  }
338  else
339  {
340  lefthand = mid;
341  }
342  }
343  while (righthand - lefthand > threshold);
344 
345  // sanity check?
346  max_peak_mz = (lefthand + righthand) / 2;
347  max_peak_int = peak_spline.eval(max_peak_mz);
348 
349  // save picked peak into output spectrum
350  PeakType peak;
351  PeakBoundary peak_boundary;
352  peak.setMZ(max_peak_mz);
353  peak.setIntensity(max_peak_int);
354  peak_boundary.mz_min = input[left_boundary].getMZ();
355  peak_boundary.mz_max = input[right_boundary].getMZ();
356  output.push_back(peak);
357  boundaries.push_back(peak_boundary);
358 
359  // jump over raw data points that have been considered already
360  i = i + k - 1;
361  }
362  }
363 
364  return;
365  }
366 
374  template <typename PeakType>
375  void pick(const MSChromatogram<PeakType>& input, MSChromatogram<PeakType>& output) const
376  {
377  std::vector<PeakBoundary> boundaries;
378  pick(input, output, boundaries);
379  }
380 
389  template <typename PeakType>
390  void pick(const MSChromatogram<PeakType>& input, MSChromatogram<PeakType>& output, std::vector<PeakBoundary>& boundaries) const
391  {
392  // copy meta data of the input chromatogram
393  output.clear(true);
394  output.ChromatogramSettings::operator=(input);
395  output.MetaInfoInterface::operator=(input);
396  output.setName(input.getName());
397 
398  MSSpectrum<PeakType> input_spectrum;
399  MSSpectrum<PeakType> output_spectrum;
400  for (typename MSChromatogram<PeakType>::const_iterator it = input.begin(); it != input.end(); ++it)
401  {
402  input_spectrum.push_back(*it);
403  }
404  pick(input_spectrum, output_spectrum, boundaries, false); // no spacing checks!
405  for (typename MSSpectrum<PeakType>::const_iterator it = output_spectrum.begin(); it != output_spectrum.end(); ++it)
406  {
407  output.push_back(*it);
408  }
409  }
410 
420  template <typename PeakType, typename ChromatogramPeakT>
421  void pickExperiment(const MSExperiment<PeakType, ChromatogramPeakT>& input, MSExperiment<PeakType, ChromatogramPeakT>& output, const bool check_spectrum_type = true) const
422  {
423  std::vector<std::vector<PeakBoundary> > boundaries_spec;
424  std::vector<std::vector<PeakBoundary> > boundaries_chrom;
425  pickExperiment(input, output, boundaries_spec, boundaries_chrom, check_spectrum_type);
426  }
427 
439  template <typename PeakType, typename ChromatogramPeakT>
440  void pickExperiment(const MSExperiment<PeakType, ChromatogramPeakT>& input, MSExperiment<PeakType, ChromatogramPeakT>& output, std::vector<std::vector<PeakBoundary> >& boundaries_spec, std::vector<std::vector<PeakBoundary> >& boundaries_chrom, const bool check_spectrum_type = true) const
441  {
442  // make sure that output is clear
443  output.clear(true);
444 
445  // copy experimental settings
446  static_cast<ExperimentalSettings &>(output) = input;
447 
448  // resize output with respect to input
449  output.resize(input.size());
450 
451  Size progress = 0;
452  startProgress(0, input.size() + input.getChromatograms().size(), "picking peaks");
453 
454  if (input.getNrSpectra() > 0)
455  {
456  for (Size scan_idx = 0; scan_idx != input.size(); ++scan_idx)
457  {
458  if (!ListUtils::contains(ms_levels_, input[scan_idx].getMSLevel()))
459  {
460  output[scan_idx] = input[scan_idx];
461  }
462  else
463  {
464  std::vector<PeakBoundary> boundaries_s; // peak boundaries of a single spectrum
465 
466  // determine type of spectral data (profile or centroided)
467  SpectrumSettings::SpectrumType spectrum_type = input[scan_idx].getType();
468 
469  if (spectrum_type == SpectrumSettings::PEAKS && check_spectrum_type)
470  {
471  throw OpenMS::Exception::IllegalArgument(__FILE__, __LINE__, __FUNCTION__, "Error: Centroided data provided but profile spectra expected.");
472  }
473 
474  pick(input[scan_idx], output[scan_idx], boundaries_s);
475  boundaries_spec.push_back(boundaries_s);
476  }
477  setProgress(++progress);
478  }
479  }
480 
481 
482  for (Size i = 0; i < input.getChromatograms().size(); ++i)
483  {
485  std::vector<PeakBoundary> boundaries_c; // peak boundaries of a single chromatogram
486  pick(input.getChromatograms()[i], chromatogram, boundaries_c);
487  output.addChromatogram(chromatogram);
488  boundaries_chrom.push_back(boundaries_c);
489  setProgress(++progress);
490  }
491  endProgress();
492 
493  return;
494  }
495 
503  template <typename PeakType, typename ChromatogramPeakT>
504  void pickExperiment(/* const */ OnDiscMSExperiment<PeakType, ChromatogramPeakT>& input, MSExperiment<PeakType, ChromatogramPeakT>& output, const bool check_spectrum_type = true) const
505  {
506  // make sure that output is clear
507  output.clear(true);
508 
509  // copy experimental settings
510  static_cast<ExperimentalSettings &>(output) = *input.getExperimentalSettings();
511 
512  Size progress = 0;
513  startProgress(0, input.size() + input.getNrChromatograms(), "picking peaks");
514 
515  if (input.getNrSpectra() > 0)
516  {
517 
518  // resize output with respect to input
519  output.resize(input.size());
520 
521  for (Size scan_idx = 0; scan_idx != input.size(); ++scan_idx)
522  {
523  if (!ListUtils::contains(ms_levels_, input[scan_idx].getMSLevel()))
524  {
525  output[scan_idx] = input[scan_idx];
526  }
527  else
528  {
529  MSSpectrum<PeakType> s = input[scan_idx];
530  s.sortByPosition();
531 
532  // determine type of spectral data (profile or centroided)
533  SpectrumSettings::SpectrumType spectrum_type = s.getType();
534 
535  if (spectrum_type == SpectrumSettings::PEAKS && check_spectrum_type)
536  {
537  throw OpenMS::Exception::IllegalArgument(__FILE__, __LINE__, __FUNCTION__, "Error: Centroided data provided but profile spectra expected.");
538  }
539 
540  pick(s, output[scan_idx]);
541  }
542  setProgress(++progress);
543  }
544  }
545 
546  for (Size i = 0; i < input.getNrChromatograms(); ++i)
547  {
549  pick(input.getChromatogram(i), chromatogram);
550  output.addChromatogram(chromatogram);
551  setProgress(++progress);
552  }
553  endProgress();
554 
555  return;
556  }
557 
558 protected:
559  // signal-to-noise parameter
561 
562  // maximal spacing difference defining a large gap
564 
565  // maximal spacing difference defining a missing data point
567 
568  // maximum number of missing points
569  unsigned missing_;
570 
571  // MS levels to which peak picking is applied
572  std::vector<Int> ms_levels_;
573 
574  // docu in base class
575  void updateMembers_();
576 
577  }; // end PeakPickerHiRes
578 
579 } // namespace OpenMS
580 
581 #endif
const double k
virtual double getSignalToNoise(const PeakIterator &data_point)
Definition: SignalToNoiseEstimator.h:129
MSChromatogram< ChromatogramPeakT > getChromatogram(Size id)
returns a single chromatogram
Definition: OnDiscMSExperiment.h:209
Size getNrChromatograms() const
get the total number of chromatograms available
Definition: OnDiscMSExperiment.h:155
Size getNrSpectra() const
get the total number of spectra available
Definition: MSExperiment.h:876
const String & getName() const
Definition: MSChromatogram.h:217
A 2-dimensional raw data point or peak.
Definition: Peak2D.h:55
UInt getMSLevel() const
Returns the MS level.
Definition: MSSpectrum.h:259
Size size() const
Definition: MSExperiment.h:119
void setMZ(CoordinateType coordinate)
Mutable access to the m/z coordinate (index 1)
Definition: Peak2D.h:203
void sortByPosition()
Lexicographically sorts the peaks by their position.
Definition: MSSpectrum.h:419
The representation of a chromatogram.
Definition: MSChromatogram.h:52
Size size() const
alias for getNrSpectra
Definition: OnDiscMSExperiment.h:137
void pickExperiment(OnDiscMSExperiment< PeakType, ChromatogramPeakT > &input, MSExperiment< PeakType, ChromatogramPeakT > &output, const bool check_spectrum_type=true) const
Applies the peak-picking algorithm to a map (MSExperiment). This method picks peaks for each scan in ...
Definition: PeakPickerHiRes.h:504
const String & getName() const
Returns the name.
Definition: MSSpectrum.h:271
void setName(const String &name)
Sets the name.
Definition: MSSpectrum.h:277
void resize(Size s)
Definition: MSExperiment.h:124
double eval(double x) const
evaluates the spline at position x
void pickExperiment(const MSExperiment< PeakType, ChromatogramPeakT > &input, MSExperiment< PeakType, ChromatogramPeakT > &output, const bool check_spectrum_type=true) const
Applies the peak-picking algorithm to a map (MSExperiment). This method picks peaks for each scan in ...
Definition: PeakPickerHiRes.h:421
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
void setParameters(const Param &param)
Sets the parameters.
void setName(const String &name)
Sets the name.
Definition: MSChromatogram.h:223
void addChromatogram(const MSChromatogram< ChromatogramPeakType > &chromatogram)
adds a chromatogram to the list
Definition: MSExperiment.h:844
double spacing_difference_gap_
Definition: PeakPickerHiRes.h:563
void setIntensity(IntensityType intensity)
Non-mutable access to the data point intensity (height)
Definition: Peak2D.h:173
SpectrumType getType() const
returns the spectrum type
unsigned missing_
Definition: PeakPickerHiRes.h:569
Representation of a mass spectrometry experiment on disk.
Definition: OnDiscMSExperiment.h:67
virtual void init(const PeakIterator &it_begin, const PeakIterator &it_end)
Set the start and endpoint of the raw data interval, for which signal to noise ratios will be estimat...
Definition: SignalToNoiseEstimator.h:110
A method or algorithm argument contains illegal values.
Definition: Exception.h:634
std::vector< Int > ms_levels_
Definition: PeakPickerHiRes.h:572
double mz_min
Definition: PeakPickerHiRes.h:89
void pick(const MSSpectrum< PeakType > &input, MSSpectrum< PeakType > &output) const
Applies the peak-picking algorithm to a single spectrum (MSSpectrum). The resulting picked peaks are ...
Definition: PeakPickerHiRes.h:102
SpectrumType
Spectrum peak type.
Definition: SpectrumSettings.h:71
double getRT() const
Definition: MSSpectrum.h:243
void setMSLevel(UInt ms_level)
Sets the MS level.
Definition: MSSpectrum.h:265
Peak data (also called centroided data or stick data)
Definition: SpectrumSettings.h:74
boost::shared_ptr< const ExperimentalSettings > getExperimentalSettings() const
returns the meta information of this experiment (const access)
Definition: OnDiscMSExperiment.h:161
void clear(bool clear_meta_data)
Clears all data and meta data.
Definition: MSSpectrum.h:718
void setRT(double rt)
Sets the absolute retention time (is seconds)
Definition: MSSpectrum.h:249
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:71
double signal_to_noise_
Definition: PeakPickerHiRes.h:560
Estimates the signal/noise (S/N) ratio of each data point in a scan by using the median (histogram ba...
Definition: SignalToNoiseEstimatorMedian.h:81
void setType(SpectrumType type)
sets the spectrum type
Size getNrSpectra() const
get the total number of spectra available
Definition: OnDiscMSExperiment.h:149
void clear(bool clear_meta_data)
Clears all data and meta data.
Definition: MSExperiment.h:918
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:55
double derivatives(double x, unsigned order) const
evaluates derivative of spline at position x
void pickExperiment(const MSExperiment< PeakType, ChromatogramPeakT > &input, MSExperiment< PeakType, ChromatogramPeakT > &output, std::vector< std::vector< PeakBoundary > > &boundaries_spec, std::vector< std::vector< PeakBoundary > > &boundaries_chrom, const bool check_spectrum_type=true) const
Applies the peak-picking algorithm to a map (MSExperiment). This method picks peaks for each scan in ...
Definition: PeakPickerHiRes.h:440
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
double mz_max
Definition: PeakPickerHiRes.h:90
void pick(const MSSpectrum< PeakType > &input, MSSpectrum< PeakType > &output, std::vector< PeakBoundary > &boundaries, bool check_spacings=true) const
Applies the peak-picking algorithm to a single spectrum (MSSpectrum). The resulting picked peaks are ...
Definition: PeakPickerHiRes.h:119
void clear(bool clear_meta_data)
Clears all data and meta data.
Definition: MSChromatogram.h:587
cubic spline interpolation as described in R.L. Burden, J.D. Faires, Numerical Analysis, 4th ed. PWS-Kent, 1989, ISBN 0-53491-585-X, pp. 126-131.
Definition: CubicSpline2d.h:54
static bool contains(const std::vector< T > &container, const E &elem)
Checks whether the element elem is contained in the given container.
Definition: ListUtils.h:150
This class implements a fast peak-picking algorithm best suited for high resolution MS data (FT-ICR-M...
Definition: PeakPickerHiRes.h:75
structure for peak boundaries
Definition: PeakPickerHiRes.h:87
Description of the experimental settings.
Definition: ExperimentalSettings.h:59
void pick(const MSChromatogram< PeakType > &input, MSChromatogram< PeakType > &output, std::vector< PeakBoundary > &boundaries) const
Applies the peak-picking algorithm to a single chromatogram (MSChromatogram). The resulting picked pe...
Definition: PeakPickerHiRes.h:390
const std::vector< MSChromatogram< ChromatogramPeakType > > & getChromatograms() const
returns the chromatogram list
Definition: MSExperiment.h:850
double spacing_difference_
Definition: PeakPickerHiRes.h:566
void pick(const MSChromatogram< PeakType > &input, MSChromatogram< PeakType > &output) const
Applies the peak-picking algorithm to a single chromatogram (MSChromatogram). The resulting picked pe...
Definition: PeakPickerHiRes.h:375

OpenMS / TOPP release 2.0.0 Documentation generated on Tue Jan 31 2017 06:39:51 using doxygen 1.8.8