OpenMS
PeakPickerIM.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: Timo Sachsenberg, Mohammed Alhigaylan $
6 // $Maintainer: Timo Sachsenberg $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
14 
15 namespace OpenMS
16 {
37  class OPENMS_DLLAPI PeakPickerIM : public DefaultParamHandler
38  {
39  public:
42 
44  ~PeakPickerIM() override = default;
45 
56  void pickIMTraces(MSSpectrum& spectrum);
57 
61 
62 
92  void pickIMCluster(MSSpectrum& spec) const;
93 
102  void pickIMElutionProfiles(MSSpectrum& input) const;
103 
104  protected:
105  void updateMembers_() override;
106 
107  private:
109  double computeOptimalSamplingRate(const std::vector<MSSpectrum>& spectra);
110 
121  void sumFrame_(const MSSpectrum& input_spectrum, MSSpectrum& output_spectrum, double tolerance = 0.01, bool use_ppm = true);
122 
124  std::pair<double, double> ppmBounds(double mz, double ppm);
125 
129  std::vector<MSSpectrum> extractIonMobilityTraces(
130  const MSSpectrum& picked_spectrum,
131  const MSSpectrum& raw_spectrum);
132 
134  MSSpectrum computeCentroids_(const std::vector<MSSpectrum>& mobilogram_traces,
135  const std::vector<MSSpectrum>& picked_traces);
136 
137  double sum_tolerance_mz_{1.0};
138  double gauss_ppm_tolerance_{5.0};
139  double sum_tolerance_im_{0.0006};
140  int sgolay_frame_length_{5};
141  int sgolay_polynomial_order_{3};
142  double ppm_tolerance_cluster_{50.0};
143  double im_tolerance_cluster_{0.1};
144 
145  double ppm_tolerance_elution_{50.0};
146  };
147 } // namespace OpenMS
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:66
const Param & getParameters() const
Non-mutable access to the parameters.
void setParameters(const Param &param)
Sets the parameters.
The representation of a 1D spectrum.
Definition: MSSpectrum.h:44
Peak picking algorithm for ion mobility data.
Definition: PeakPickerIM.h:38
MSSpectrum computeCentroids_(const std::vector< MSSpectrum > &mobilogram_traces, const std::vector< MSSpectrum > &picked_traces)
compute m/z and ion mobility centers for picked traces. Returns centroided spectrum.
std::pair< double, double > ppmBounds(double mz, double ppm)
Compute lower and upper m/z bounds based on ppm.
double computeOptimalSamplingRate(const std::vector< MSSpectrum > &spectra)
determine sampling rate for linear resampler
void pickIMCluster(MSSpectrum &spec) const
Converts an ion mobility frame to a single spectrum with averaged IM values.
std::vector< MSSpectrum > extractIonMobilityTraces(const MSSpectrum &picked_spectrum, const MSSpectrum &raw_spectrum)
~PeakPickerIM() override=default
Destructor.
void pickIMElutionProfiles(MSSpectrum &input) const
Picks ion mobility elution profiles from the given spectrum using eluting profiles.
PeakPickerIM()
Default constructor initializing parameters with default values.
void updateMembers_() override
This method is used to update extra member variables at the end of the setParameters() method.
void pickIMTraces(MSSpectrum &spectrum)
Centroids ion mobility data by iteratively extracting mobilograms for each m/z peak centroid.
void sumFrame_(const MSSpectrum &input_spectrum, MSSpectrum &output_spectrum, double tolerance=0.01, bool use_ppm=true)
Sum up the intensity of data points with nearly identical float values.
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19