OpenMS
Loading...
Searching...
No Matches
PeakPickerHiRes.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Author: Erhan Kenar $
6// $Maintainer: Timo Sachsenberg $
7// --------------------------------------------------------------------------
8
9#pragma once
10
12
16
17#define DEBUG_PEAK_PICKING
18#undef DEBUG_PEAK_PICKING
19//#undef DEBUG_DECONV
20namespace OpenMS
21{
22 class MSChromatogram;
23 class Mobilogram;
24 class OnDiscMSExperiment;
25
57 class OPENMS_DLLAPI PeakPickerHiRes :
59 public ProgressLogger
60 {
61public:
64
66 ~PeakPickerHiRes() override;
67
70 {
71 double mz_min;
72 double mz_max;
73 };
74
83 void pick(const MSSpectrum& input, MSSpectrum& output) const;
84
92 void pick(const MSChromatogram& input, MSChromatogram& output) const;
93
97 void pick(const Mobilogram& input, Mobilogram& output) const;
98
109 void pick(const MSSpectrum& input, MSSpectrum& output, std::vector<PeakBoundary>& boundaries, bool check_spacings = true) const;
110
120 void pick(const MSChromatogram& input, MSChromatogram& output, std::vector<PeakBoundary>& boundaries, bool check_spacings = false) const;
121
131 void pick(const Mobilogram& input, Mobilogram& output, std::vector<PeakBoundary>& boundaries, bool check_spacings = false) const;
132
142 void pickExperiment(const PeakMap& input, PeakMap& output, const bool check_spectrum_type = true) const;
143
155 void pickExperiment(const PeakMap& input,
156 PeakMap& output,
157 std::vector<std::vector<PeakBoundary> >& boundaries_spec,
158 std::vector<std::vector<PeakBoundary> >& boundaries_chrom,
159 const bool check_spectrum_type = true) const;
160
168 void pickExperiment(/* const */ OnDiscMSExperiment& input, PeakMap& output, const bool check_spectrum_type = true) const;
169
170protected:
171
172 template <typename ContainerType>
173 void pick_(const ContainerType& input, ContainerType& output, std::vector<PeakBoundary>& boundaries, bool check_spacings = true, int im_index = -1) const;
174
175 // signal-to-noise parameter
177
180
181 // maximal spacing difference defining a large gap
183
184 // maximal spacing difference defining a missing data point
186
187 // maximum number of missing points
188 unsigned missing_;
189
190 // MS levels to which peak picking is applied
191 std::vector<Int> ms_levels_;
192
195
198
201
202 // docu in base class
203 void updateMembers_() override;
204
205 }; // end PeakPickerHiRes
206
207} // namespace OpenMS
208
A base class for all classes handling default parameters.
Definition DefaultParamHandler.h:66
The representation of a chromatogram.
Definition MSChromatogram.h:33
In-Memory representation of a mass spectrometry run.
Definition MSExperiment.h:49
The representation of a 1D spectrum.
Definition MSSpectrum.h:44
The representation of a 1D ion mobilogram.
Definition Mobilogram.h:35
Representation of a mass spectrometry experiment on disk.
Definition OnDiscMSExperiment.h:73
This class implements a fast peak-picking algorithm best suited for high resolution MS data (FT-ICR-M...
Definition PeakPickerHiRes.h:60
void pick(const MSSpectrum &input, MSSpectrum &output) const
Applies the peak-picking algorithm to a single spectrum (MSSpectrum). The resulting picked peaks are ...
unsigned missing_
Definition PeakPickerHiRes.h:188
double spacing_difference_
Definition PeakPickerHiRes.h:185
double signal_to_noise_
Definition PeakPickerHiRes.h:176
double spacing_difference_gap_
Definition PeakPickerHiRes.h:182
bool report_FWHM_
add floatDataArray 'FWHM'/'FWHM_ppm' to spectra with peak FWHM
Definition PeakPickerHiRes.h:194
~PeakPickerHiRes() override
Destructor.
std::vector< Int > ms_levels_
Definition PeakPickerHiRes.h:191
double mz_max
Definition PeakPickerHiRes.h:72
PeakPickerHiRes()
Constructor.
void pick(const MSSpectrum &input, MSSpectrum &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 ...
void pick(const Mobilogram &input, Mobilogram &output, std::vector< PeakBoundary > &boundaries, bool check_spacings=false) const
Applies the peak-picking algorithm to a single mobilogram (Mobilogram). The resulting picked peaks ar...
void pick(const MSChromatogram &input, MSChromatogram &output) const
Applies the peak-picking algorithm to a single chromatogram (MSChromatogram). The resulting picked pe...
void pick(const Mobilogram &input, Mobilogram &output) const
Applies the peak-picking algorithm to a map (Mobilogram). The resulting picked peaks are written to t...
double mz_min
Definition PeakPickerHiRes.h:71
void pick(const MSChromatogram &input, MSChromatogram &output, std::vector< PeakBoundary > &boundaries, bool check_spacings=false) const
Applies the peak-picking algorithm to a single chromatogram (MSChromatogram). The resulting picked pe...
void pick_(const ContainerType &input, ContainerType &output, std::vector< PeakBoundary > &boundaries, bool check_spacings=true, int im_index=-1) const
bool report_FWHM_as_ppm_
unit of 'FWHM' float data array (can be absolute or ppm).
Definition PeakPickerHiRes.h:197
void updateMembers_() override
This method is used to update extra member variables at the end of the setParameters() method.
void pickExperiment(OnDiscMSExperiment &input, PeakMap &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 ...
void pickExperiment(const PeakMap &input, PeakMap &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 ...
bool allow_missing_flank_
allow peaks without flanking data points on both sides (for TimsTOF data)
Definition PeakPickerHiRes.h:200
SignalToNoiseEstimatorMedianSettings sn_settings_
settings of the S/N estimation (parameters "SignalToNoise:*"), read once in updateMembers_()
Definition PeakPickerHiRes.h:179
void pickExperiment(const PeakMap &input, PeakMap &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 ...
structure for peak boundaries
Definition PeakPickerHiRes.h:70
Base class for all classes that want to report their progress.
Definition ProgressLogger.h:27
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
The parameters of SignalToNoiseEstimatorMedian as plain values; the defaults are those of its paramet...
Definition SignalToNoiseEstimatorMedianSettings.h:26