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-2015.
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 + 2 < input.size()) &&
201  (left_neighbor_int < input[i - 2].getIntensity()) &&
202  (right_neighbor_int < input[i + 2].getIntensity()) &&
203  (act_snt_l2 >= signal_to_noise_) &&
204  (act_snt_r2 >= signal_to_noise_) &&
205  (!check_spacings ||
206  ((left_neighbor_mz - input[i - 2].getMZ() < spacing_difference_ * min_spacing) &&
207  (input[i + 2].getMZ() - right_neighbor_mz < spacing_difference_ * min_spacing))))
208  {
209  ++i;
210  continue;
211  }
212 
213  std::map<double, double> peak_raw_data;
214 
215  peak_raw_data[central_peak_mz] = central_peak_int;
216  peak_raw_data[left_neighbor_mz] = left_neighbor_int;
217  peak_raw_data[right_neighbor_mz] = right_neighbor_int;
218 
219  // peak core found, now extend it
220  // to the left
221  Size k = 2;
222 
223  bool previous_zero_left(false); // no need to extend peak if previous intensity was zero
224  Size missing_left(0);
225  Size left_boundary(i - 1); // index of the left boundary for the spline interpolation
226 
227  while ((k <= i) && // prevent underflow
228  (i - k + 1 > 0) &&
229  !previous_zero_left &&
230  (missing_left <= missing_) &&
231  (input[i - k].getIntensity() <= peak_raw_data.begin()->second) &&
232  (!check_spacings ||
233  (peak_raw_data.begin()->first - input[i - k].getMZ() < spacing_difference_gap_ * min_spacing)))
234  {
235  double act_snt_lk = 0.0;
236 
237  if (signal_to_noise_ > 0.0)
238  {
239  act_snt_lk = snt.getSignalToNoise(input[i - k]);
240  }
241 
242  if ((act_snt_lk >= signal_to_noise_) &&
243  (!check_spacings ||
244  (peak_raw_data.begin()->first - input[i - k].getMZ() < spacing_difference_ * min_spacing)))
245  {
246  peak_raw_data[input[i - k].getMZ()] = input[i - k].getIntensity();
247  }
248  else
249  {
250  ++missing_left;
251  if (missing_left <= missing_)
252  {
253  peak_raw_data[input[i - k].getMZ()] = input[i - k].getIntensity();
254  }
255  }
256 
257  previous_zero_left = (input[i - k].getIntensity() == 0);
258  left_boundary = i - k;
259  ++k;
260  }
261 
262  // to the right
263  k = 2;
264 
265  bool previous_zero_right(false); // no need to extend peak if previous intensity was zero
266  Size missing_right(0);
267  Size right_boundary(i+1); // index of the right boundary for the spline interpolation
268 
269  while ((i + k < input.size()) &&
270  !previous_zero_right &&
271  (missing_right <= missing_) &&
272  (input[i + k].getIntensity() <= peak_raw_data.rbegin()->second) &&
273  (!check_spacings ||
274  (input[i + k].getMZ() - peak_raw_data.rbegin()->first < spacing_difference_gap_ * min_spacing)))
275  {
276  double act_snt_rk = 0.0;
277 
278  if (signal_to_noise_ > 0.0)
279  {
280  act_snt_rk = snt.getSignalToNoise(input[i + k]);
281  }
282 
283  if ((act_snt_rk >= signal_to_noise_) &&
284  (!check_spacings ||
285  (input[i + k].getMZ() - peak_raw_data.rbegin()->first < spacing_difference_ * min_spacing)))
286  {
287  peak_raw_data[input[i + k].getMZ()] = input[i + k].getIntensity();
288  }
289  else
290  {
291  ++missing_right;
292  if (missing_right <= missing_)
293  {
294  peak_raw_data[input[i + k].getMZ()] = input[i + k].getIntensity();
295  }
296  }
297 
298  previous_zero_right = (input[i + k].getIntensity() == 0);
299  right_boundary = i + k;
300  ++k;
301  }
302 
303  //skip if the minimal number of 3 points for fitting is not reached
304  if (peak_raw_data.size() < 4) continue;
305 
306  CubicSpline2d peak_spline (peak_raw_data);
307 
308  // calculate maximum by evaluating the spline's 1st derivative
309  // (bisection method)
310  double max_peak_mz = central_peak_mz;
311  double max_peak_int = central_peak_int;
312  double threshold = 0.000001;
313  double lefthand = left_neighbor_mz;
314  double righthand = right_neighbor_mz;
315 
316  bool lefthand_sign = 1;
317  double eps = std::numeric_limits<double>::epsilon();
318 
319  // bisection
320  do
321  {
322  double mid = (lefthand + righthand) / 2.0;
323  double midpoint_deriv_val = peak_spline.derivatives(mid, 1);
324 
325  // if deriv nearly zero then maximum already found
326  if (!(std::fabs(midpoint_deriv_val) > eps))
327  {
328  break;
329  }
330 
331  bool midpoint_sign = (midpoint_deriv_val < 0.0) ? 0 : 1;
332 
333  if (lefthand_sign ^ midpoint_sign)
334  {
335  righthand = mid;
336  }
337  else
338  {
339  lefthand = mid;
340  }
341  }
342  while (righthand - lefthand > threshold);
343 
344  // sanity check?
345  max_peak_mz = (lefthand + righthand) / 2;
346  max_peak_int = peak_spline.eval(max_peak_mz);
347 
348  // save picked peak into output spectrum
349  PeakType peak;
350  PeakBoundary peak_boundary;
351  peak.setMZ(max_peak_mz);
352  peak.setIntensity(max_peak_int);
353  peak_boundary.mz_min = input[left_boundary].getMZ();
354  peak_boundary.mz_max = input[right_boundary].getMZ();
355  output.push_back(peak);
356  boundaries.push_back(peak_boundary);
357 
358  // jump over raw data points that have been considered already
359  i = i + k - 1;
360  }
361  }
362 
363  return;
364  }
365 
373  template <typename PeakType>
374  void pick(const MSChromatogram<PeakType>& input, MSChromatogram<PeakType>& output) const
375  {
376  std::vector<PeakBoundary> boundaries;
377  pick(input, output, boundaries);
378  }
379 
388  template <typename PeakType>
389  void pick(const MSChromatogram<PeakType>& input, MSChromatogram<PeakType>& output, std::vector<PeakBoundary>& boundaries) const
390  {
391  // copy meta data of the input chromatogram
392  output.clear(true);
393  output.ChromatogramSettings::operator=(input);
394  output.MetaInfoInterface::operator=(input);
395  output.setName(input.getName());
396 
397  MSSpectrum<PeakType> input_spectrum;
398  MSSpectrum<PeakType> output_spectrum;
399  for (typename MSChromatogram<PeakType>::const_iterator it = input.begin(); it != input.end(); ++it)
400  {
401  input_spectrum.push_back(*it);
402  }
403  pick(input_spectrum, output_spectrum, boundaries, false); // no spacing checks!
404  for (typename MSSpectrum<PeakType>::const_iterator it = output_spectrum.begin(); it != output_spectrum.end(); ++it)
405  {
406  output.push_back(*it);
407  }
408  }
409 
419  template <typename PeakType, typename ChromatogramPeakT>
420  void pickExperiment(const MSExperiment<PeakType, ChromatogramPeakT>& input, MSExperiment<PeakType, ChromatogramPeakT>& output, const bool check_spectrum_type = true) const
421  {
422  std::vector<std::vector<PeakBoundary> > boundaries_spec;
423  std::vector<std::vector<PeakBoundary> > boundaries_chrom;
424  pickExperiment(input, output, boundaries_spec, boundaries_chrom, check_spectrum_type);
425  }
426 
438  template <typename PeakType, typename ChromatogramPeakT>
439  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
440  {
441  // make sure that output is clear
442  output.clear(true);
443 
444  // copy experimental settings
445  static_cast<ExperimentalSettings &>(output) = input;
446 
447  // resize output with respect to input
448  output.resize(input.size());
449 
450  Size progress = 0;
451  startProgress(0, input.size() + input.getChromatograms().size(), "picking peaks");
452 
453  if (input.getNrSpectra() > 0)
454  {
455  for (Size scan_idx = 0; scan_idx != input.size(); ++scan_idx)
456  {
457  if (!ListUtils::contains(ms_levels_, input[scan_idx].getMSLevel()))
458  {
459  output[scan_idx] = input[scan_idx];
460  }
461  else
462  {
463  std::vector<PeakBoundary> boundaries_s; // peak boundaries of a single spectrum
464 
465  // determine type of spectral data (profile or centroided)
466  SpectrumSettings::SpectrumType spectrum_type = input[scan_idx].getType();
467 
468  if (spectrum_type == SpectrumSettings::PEAKS && check_spectrum_type)
469  {
470  throw OpenMS::Exception::IllegalArgument(__FILE__, __LINE__, __FUNCTION__, "Error: Centroided data provided but profile spectra expected.");
471  }
472 
473  pick(input[scan_idx], output[scan_idx], boundaries_s);
474  boundaries_spec.push_back(boundaries_s);
475  }
476  setProgress(++progress);
477  }
478  }
479 
480 
481  for (Size i = 0; i < input.getChromatograms().size(); ++i)
482  {
484  std::vector<PeakBoundary> boundaries_c; // peak boundaries of a single chromatogram
485  pick(input.getChromatograms()[i], chromatogram, boundaries_c);
486  output.addChromatogram(chromatogram);
487  boundaries_chrom.push_back(boundaries_c);
488  setProgress(++progress);
489  }
490  endProgress();
491 
492  return;
493  }
494 
502  template <typename PeakType, typename ChromatogramPeakT>
503  void pickExperiment(/* const */ OnDiscMSExperiment<PeakType, ChromatogramPeakT>& input, MSExperiment<PeakType, ChromatogramPeakT>& output, const bool check_spectrum_type = true) const
504  {
505  // make sure that output is clear
506  output.clear(true);
507 
508  // copy experimental settings
509  static_cast<ExperimentalSettings &>(output) = *input.getExperimentalSettings();
510 
511  Size progress = 0;
512  startProgress(0, input.size() + input.getNrChromatograms(), "picking peaks");
513 
514  if (input.getNrSpectra() > 0)
515  {
516 
517  // resize output with respect to input
518  output.resize(input.size());
519 
520  for (Size scan_idx = 0; scan_idx != input.size(); ++scan_idx)
521  {
522  if (!ListUtils::contains(ms_levels_, input[scan_idx].getMSLevel()))
523  {
524  output[scan_idx] = input[scan_idx];
525  }
526  else
527  {
528  MSSpectrum<PeakType> s = input[scan_idx];
529  s.sortByPosition();
530 
531  // determine type of spectral data (profile or centroided)
532  SpectrumSettings::SpectrumType spectrum_type = s.getType();
533 
534  if (spectrum_type == SpectrumSettings::PEAKS && check_spectrum_type)
535  {
536  throw OpenMS::Exception::IllegalArgument(__FILE__, __LINE__, __FUNCTION__, "Error: Centroided data provided but profile spectra expected.");
537  }
538 
539  pick(s, output[scan_idx]);
540  }
541  setProgress(++progress);
542  }
543  }
544 
545  for (Size i = 0; i < input.getNrChromatograms(); ++i)
546  {
548  pick(input.getChromatogram(i), chromatogram);
549  output.addChromatogram(chromatogram);
550  setProgress(++progress);
551  }
552  endProgress();
553 
554  return;
555  }
556 
557 protected:
558  // signal-to-noise parameter
560 
561  // maximal spacing difference defining a large gap
563 
564  // maximal spacing difference defining a missing data point
566 
567  // maximum number of missing points
568  unsigned missing_;
569 
570  // MS levels to which peak picking is applied
571  std::vector<Int> ms_levels_;
572 
573  // docu in base class
574  void updateMembers_();
575 
576  }; // end PeakPickerHiRes
577 
578 } // namespace OpenMS
579 
580 #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:808
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:117
void setMZ(CoordinateType coordinate)
Mutable access to the m/z coordinate (index 1)
Definition: Peak2D.h:197
void sortByPosition()
Lexicographically sorts the peaks by their position.
Definition: MSSpectrum.h:419
Peak data (also called centroided data or stick data)
Definition: SpectrumSettings.h:74
The representation of a chromatogram.
Definition: MSChromatogram.h:52
Size size() const
alias for getNrSpectra
Definition: OnDiscMSExperiment.h:137
SpectrumType
Spectrum peak type.
Definition: SpectrumSettings.h:71
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:503
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:122
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:420
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:782
double spacing_difference_gap_
Definition: PeakPickerHiRes.h:562
void setIntensity(IntensityType intensity)
Non-mutable access to the data point intensity (height)
Definition: Peak2D.h:167
SpectrumType getType() const
returns the spectrum type
unsigned missing_
Definition: PeakPickerHiRes.h:568
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:571
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
double getRT() const
Definition: MSSpectrum.h:243
void setMSLevel(UInt ms_level)
Sets the MS level.
Definition: MSSpectrum.h:265
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:635
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:69
double signal_to_noise_
Definition: PeakPickerHiRes.h:559
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:850
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:439
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:50
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:389
const std::vector< MSChromatogram< ChromatogramPeakType > > & getChromatograms() const
returns the chromatogram list
Definition: MSExperiment.h:788
double spacing_difference_
Definition: PeakPickerHiRes.h:565
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:374

OpenMS / TOPP release 2.0.0 Documentation generated on Wed Mar 30 2016 12:49:24 using doxygen 1.8.11