OpenMS
Loading...
Searching...
No Matches
PeakPickerChromatogram.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// $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
27namespace OpenMS
28{
29
49 class OPENMS_DLLAPI PeakPickerChromatogram :
51 {
52
53public:
54
56
58
62
64 enum FLOATINDICES { IDX_FWHM = 0, IDX_ABUNDANCE = 1, IDX_LEFTBORDER = 2, IDX_RIGHTBORDER = 3, IDX_SN = 4, SIZE_OF_FLOATINDICES };
65
73 void pickChromatogram(const MSChromatogram& chromatogram, MSChromatogram& picked_chrom);
74
75
83 void pickChromatogram(const MSChromatogram& chromatogram, MSChromatogram& picked_chrom, MSChromatogram& smoothed_chrom);
84
85protected:
86
87 void pickChromatogramCrawdad_(const MSChromatogram& chromatogram, MSChromatogram& picked_chrom);
88
89 void pickChromatogram_(const MSChromatogram& chromatogram, MSChromatogram& picked_chrom);
90
94 void integratePeaks_(const MSChromatogram& chromatogram);
95
104 Size findClosestPeak_(const MSChromatogram& chromatogram, double target_rt, Size current_peak = 0);
105
110 void removeOverlappingPeaks_(const MSChromatogram& chromatogram, MSChromatogram& picked_chrom);
111
112
114 void updateMembers_() override;
115
118
119 // Members
130
135
146 std::string method_;
147
149 std::vector<double> integrated_intensities_;
151 std::vector<int> left_width_;
153 std::vector<int> right_width_;
155 std::vector<double> apex_sn_;
156
161 };
162}
163
164
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:33
The PeakPickerChromatogram finds peaks a single chromatogram.
Definition PeakPickerChromatogram.h:51
std::string method_
Peak picker method.
Definition PeakPickerChromatogram.h:146
PeakPickerChromatogram & operator=(const PeakPickerChromatogram &rhs)
Assignment operator is protected for algorithm.
std::vector< int > right_width_
Temporary vector to hold the peak right widths.
Definition PeakPickerChromatogram.h:153
GaussFilter gauss_
Definition PeakPickerChromatogram.h:159
bool report_sn_
Definition PeakPickerChromatogram.h:144
double sn_win_len_
Signal to noise window length.
Definition PeakPickerChromatogram.h:137
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 PeakPickerChromatogram.h:121
double signal_to_noise_
Signal to noise threshold.
Definition PeakPickerChromatogram.h:134
double gauss_width_
Width of the Gaussian smoothing.
Definition PeakPickerChromatogram.h:125
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 PeakPickerChromatogram.h:127
std::vector< double > integrated_intensities_
Temporary vector to hold the integrated intensities.
Definition PeakPickerChromatogram.h:149
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 PeakPickerChromatogram.h:141
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 PeakPickerChromatogram.h:132
bool remove_overlapping_
Whether to resolve overlapping peaks.
Definition PeakPickerChromatogram.h:129
SignalToNoiseEstimatorMedian< MSChromatogram > snt_
Definition PeakPickerChromatogram.h:160
std::vector< double > apex_sn_
Temporary vector to hold the apex signal-to-noise ratios.
Definition PeakPickerChromatogram.h:155
FLOATINDICES
indices into FloatDataArrays of resulting picked chromatograms
Definition PeakPickerChromatogram.h:64
void updateMembers_() override
Synchronize members with param class.
PeakPickerChromatogram()
Constructor.
UInt sgolay_polynomial_order_
Polynomial order for the SGolay smoothing.
Definition PeakPickerChromatogram.h:123
UInt sn_bin_count_
Signal to noise bin count.
Definition PeakPickerChromatogram.h:139
std::vector< int > left_width_
Temporary vector to hold the peak left widths.
Definition PeakPickerChromatogram.h:151
PeakPickerHiRes pp_
Definition PeakPickerChromatogram.h:157
~PeakPickerChromatogram() override
Destructor.
Definition PeakPickerChromatogram.h:60
SavitzkyGolayFilter sgolay_
Definition PeakPickerChromatogram.h:158
This class implements a fast peak-picking algorithm best suited for high resolution MS data (FT-ICR-M...
Definition PeakPickerHiRes.h:59
Computes the Savitzky-Golay filter coefficients using QR decomposition.
Definition SavitzkyGolayFilter.h:79
Estimates the signal/noise (S/N) ratio of each data point in a scan by using the median (histogram ba...
Definition SignalToNoiseEstimatorMedian.h:63
unsigned int UInt
Unsigned integer type.
Definition Types.h:64
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19