OpenMS
FIAMSDataProcessor.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: Svetlana Kutuzova, Douglas McCloskey $
6 // $Authors: Svetlana Kutuzova, Douglas McCloskey $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
12 #include <OpenMS/FORMAT/MzTab.h>
13 #include <OpenMS/FORMAT/MzTabM.h>
15 #include <OpenMS/FORMAT/MzMLFile.h>
16 
17 namespace OpenMS
18 {
34  class OPENMS_DLLAPI FIAMSDataProcessor :
35  public DefaultParamHandler
36  {
37 public:
40 
42  ~FIAMSDataProcessor() override = default;
43 
45  FIAMSDataProcessor(const FIAMSDataProcessor& cp) = default;
46 
49 
70  bool run(const MSExperiment& experiment, const float n_seconds, OpenMS::MzTab& output, const bool load_cached_spectrum = true);
71 
79  void cutForTime(const MSExperiment& experiment, const float n_seconds, std::vector<MSSpectrum>& output);
80 
91  MSSpectrum mergeAlongTime(const std::vector<OpenMS::MSSpectrum>& input);
92 
100 
110 
120 
130 
134  const std::vector<float>& getMZs();
135 
139  const std::vector<float>& getBinSizes();
140 
141 protected:
142  void updateMembers_() override;
143 
144 private:
148  void storeSpectrum_(const MSSpectrum& input, const String& filename);
149 
150  std::vector<float> mzs_;
151  std::vector<float> bin_sizes_;
154  };
155 } // namespace OpenMS
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:66
Data processing for FIA-MS data.
Definition: FIAMSDataProcessor.h:36
std::vector< float > bin_sizes_
Definition: FIAMSDataProcessor.h:151
MSSpectrum mergeAlongTime(const std::vector< OpenMS::MSSpectrum > &input)
Sum the spectra with different retention times into one.
SavitzkyGolayFilter sgfilter_
Definition: FIAMSDataProcessor.h:152
void cutForTime(const MSExperiment &experiment, const float n_seconds, std::vector< MSSpectrum > &output)
Cut the time axis of the experiment from 0 to n_seconds.
MSSpectrum extractPeaks(const MSSpectrum &input)
Pick peaks from the summed spectrum.
PeakPickerHiRes picker_
Definition: FIAMSDataProcessor.h:153
MSSpectrum trackNoise(const MSSpectrum &input)
Estimate noise for each peak.
const std::vector< float > & getMZs()
Get mass-to-charge ratios to base the summing the spectra along the time axis upon.
void storeSpectrum_(const MSSpectrum &input, const String &filename)
Store the spectrum to the given filepath.
bool run(const MSExperiment &experiment, const float n_seconds, OpenMS::MzTab &output, const bool load_cached_spectrum=true)
Run the full analysis for the experiment for the given time interval.
~FIAMSDataProcessor() override=default
Default destructor.
FIAMSDataProcessor & operator=(const FIAMSDataProcessor &fdp)=default
Assignment.
void updateMembers_() override
This method is used to update extra member variables at the end of the setParameters() method.
FIAMSDataProcessor()
Constructor.
void runAccurateMassSearch(FeatureMap &input, OpenMS::MzTab &output)
Perform accurate mass search.
std::vector< float > mzs_
Definition: FIAMSDataProcessor.h:150
FIAMSDataProcessor(const FIAMSDataProcessor &cp)=default
Copy constructor.
const std::vector< float > & getBinSizes()
Get the sliding bin sizes for summing the spectra along the time axis.
FeatureMap convertToFeatureMap(const MSSpectrum &input)
Convert a spectrum to a feature map with the corresponding polarity.
A container for features.
Definition: FeatureMap.h:80
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:46
The representation of a 1D spectrum.
Definition: MSSpectrum.h:44
Data model of MzTab files. Please see the official MzTab specification at https://code....
Definition: MzTab.h:452
This class implements a fast peak-picking algorithm best suited for high resolution MS data (FT-ICR-M...
Definition: PeakPickerHiRes.h:58
Computes the Savitzky-Golay filter coefficients using QR decomposition.
Definition: SavitzkyGolayFilter.h:78
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22