OpenMS
PeakPickerMRM.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Hannes Roest $
6 // $Authors: Hannes Roest $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
16 
20 
22 
23 #ifdef WITH_CRAWDAD
24 #include <CrawdadWrapper.h>
25 #endif
26 
27 namespace OpenMS
28 {
29 
42  class OPENMS_DLLAPI PeakPickerMRM :
43  public DefaultParamHandler
44  {
45 
46 public:
47 
49  PeakPickerMRM();
51 
53  ~PeakPickerMRM() override {}
55 
57  enum FLOATINDICES { IDX_FWHM = 0, IDX_ABUNDANCE = 1, IDX_LEFTBORDER = 2, IDX_RIGHTBORDER = 3, SIZE_OF_FLOATINDICES };
58 
66  void pickChromatogram(const MSChromatogram& chromatogram, MSChromatogram& picked_chrom);
67 
68 
76  void pickChromatogram(const MSChromatogram& chromatogram, MSChromatogram& picked_chrom, MSChromatogram& smoothed_chrom);
77 
78 protected:
79 
80  void pickChromatogramCrawdad_(const MSChromatogram& chromatogram, MSChromatogram& picked_chrom);
81 
82  void pickChromatogram_(const MSChromatogram& chromatogram, MSChromatogram& picked_chrom);
83 
87  void integratePeaks_(const MSChromatogram& chromatogram);
88 
97  Size findClosestPeak_(const MSChromatogram& chromatogram, double target_rt, Size current_peak = 0);
98 
103  void removeOverlappingPeaks_(const MSChromatogram& chromatogram, MSChromatogram& picked_chrom);
104 
105 
107  void updateMembers_() override;
108 
111 
112  // Members
118  double gauss_width_;
123 
125  double peak_width_;
128 
130  double sn_win_len_;
137 
139  std::vector<double> integrated_intensities_;
141  std::vector<int> left_width_;
143  std::vector<int> right_width_;
144 
149  };
150 }
151 
152 
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:66
This class represents a Gaussian lowpass-filter which works on uniform as well as on non-uniform prof...
Definition: GaussFilter.h:47
The representation of a chromatogram.
Definition: MSChromatogram.h:31
This class implements a fast peak-picking algorithm best suited for high resolution MS data (FT-ICR-M...
Definition: PeakPickerHiRes.h:58
The PeakPickerMRM finds peaks a single chromatogram.
Definition: PeakPickerMRM.h:44
PeakPickerMRM & operator=(const PeakPickerMRM &rhs)
Assignment operator is protected for algorithm.
std::vector< int > right_width_
Temporary vector to hold the peak right widths.
Definition: PeakPickerMRM.h:143
GaussFilter gauss_
Definition: PeakPickerMRM.h:147
~PeakPickerMRM() override
Destructor.
Definition: PeakPickerMRM.h:53
double sn_win_len_
Signal to noise window length.
Definition: PeakPickerMRM.h:130
void removeOverlappingPeaks_(const MSChromatogram &chromatogram, MSChromatogram &picked_chrom)
Helper function to remove overlapping peaks in a single Chromatogram.
void pickChromatogram(const MSChromatogram &chromatogram, MSChromatogram &picked_chrom)
Finds peaks in a single chromatogram and annotates left/right borders.
UInt sgolay_frame_length_
Frame length for the SGolay smoothing.
Definition: PeakPickerMRM.h:114
String method_
Peak picker method.
Definition: PeakPickerMRM.h:136
double signal_to_noise_
Signal to noise threshold.
Definition: PeakPickerMRM.h:127
double gauss_width_
Width of the Gaussian smoothing.
Definition: PeakPickerMRM.h:118
void pickChromatogram(const MSChromatogram &chromatogram, MSChromatogram &picked_chrom, MSChromatogram &smoothed_chrom)
Finds peaks in a single chromatogram and annotates left/right borders.
bool use_gauss_
Whether to use Gaussian smoothing.
Definition: PeakPickerMRM.h:120
std::vector< double > integrated_intensities_
Temporary vector to hold the integrated intensities.
Definition: PeakPickerMRM.h:139
Size findClosestPeak_(const MSChromatogram &chromatogram, double target_rt, Size current_peak=0)
Helper function to find the closest peak in a chromatogram to "target_rt".
bool write_sn_log_messages_
Whether to write out log messages of the SN estimator.
Definition: PeakPickerMRM.h:134
void integratePeaks_(const MSChromatogram &chromatogram)
Compute peak area (peak integration)
void pickChromatogram_(const MSChromatogram &chromatogram, MSChromatogram &picked_chrom)
void pickChromatogramCrawdad_(const MSChromatogram &chromatogram, MSChromatogram &picked_chrom)
double peak_width_
Forced peak with.
Definition: PeakPickerMRM.h:125
bool remove_overlapping_
Whether to resolve overlapping peaks.
Definition: PeakPickerMRM.h:122
SignalToNoiseEstimatorMedian< MSChromatogram > snt_
Definition: PeakPickerMRM.h:148
FLOATINDICES
indices into FloatDataArrays of resulting picked chromatograms
Definition: PeakPickerMRM.h:57
void updateMembers_() override
Synchronize members with param class.
UInt sgolay_polynomial_order_
Polynomial order for the SGolay smoothing.
Definition: PeakPickerMRM.h:116
UInt sn_bin_count_
Signal to noise bin count.
Definition: PeakPickerMRM.h:132
std::vector< int > left_width_
Temporary vector to hold the peak left widths.
Definition: PeakPickerMRM.h:141
PeakPickerHiRes pp_
Definition: PeakPickerMRM.h:145
SavitzkyGolayFilter sgolay_
Definition: PeakPickerMRM.h:146
Computes the Savitzky-Golay filter coefficients using QR decomposition.
Definition: SavitzkyGolayFilter.h:78
Estimates the signal/noise (S/N) ratio of each data point in a scan by using the median (histogram ba...
Definition: SignalToNoiseEstimatorMedian.h:57
A more convenient string class.
Definition: String.h:34
unsigned int UInt
Unsigned integer type.
Definition: Types.h:68
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:101
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22