OpenMS
ChromatogramExtractorAlgorithm.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 
13 
14 namespace OpenMS
15 {
16 
32  class OPENMS_DLLAPI ChromatogramExtractorAlgorithm :
33  public ProgressLogger
34  {
35 
36 public:
37 
39  {
40  double mz = 0.0;
41  double ion_mobility = 0.0;
42  double mz_precursor = 0.0;
43  double rt_start = 0.0;
44  double rt_end = 0.0;
45  std::string id;
46 
50  {
51  return left.mz < right.mz;
52  }
56  {
57  return left.mz > right.mz;
58  }
59  };
60 
78  std::vector< OpenSwath::ChromatogramPtr >& output,
79  const std::vector<ExtractionCoordinates>& extraction_coordinates,
80  double mz_extraction_window,
81  bool ppm,
82  double im_extraction_window,
83  const String& filter);
84 
109  void extract_value_tophat(const std::vector<double>::const_iterator& mz_start,
110  std::vector<double>::const_iterator& mz_it,
111  const std::vector<double>::const_iterator& mz_end,
112  std::vector<double>::const_iterator& int_it,
113  const double mz,
114  double& integrated_intensity,
115  const double mz_extraction_window,
116  const bool ppm);
117 
146  void extract_value_tophat(const std::vector<double>::const_iterator& mz_start,
147  std::vector<double>::const_iterator& mz_it,
148  const std::vector<double>::const_iterator& mz_end,
149  std::vector<double>::const_iterator& int_it,
150  std::vector<double>::const_iterator& im_it,
151  const double mz,
152  const double im,
153  double& integrated_intensity,
154  const double mz_extraction_window,
155  const double im_extraction_window,
156  const bool ppm);
157 
158 private:
159 
160  int getFilterNr_(const String& filter);
161 
162  };
163 
164 }
165 
166 
The ChromatogramExtractorAlgorithm extracts chromatograms from a MS data.
Definition: ChromatogramExtractorAlgorithm.h:34
void extract_value_tophat(const std::vector< double >::const_iterator &mz_start, std::vector< double >::const_iterator &mz_it, const std::vector< double >::const_iterator &mz_end, std::vector< double >::const_iterator &int_it, const double mz, double &integrated_intensity, const double mz_extraction_window, const bool ppm)
Extract the next mz value and add the integrated intensity to integrated_intensity.
void extract_value_tophat(const std::vector< double >::const_iterator &mz_start, std::vector< double >::const_iterator &mz_it, const std::vector< double >::const_iterator &mz_end, std::vector< double >::const_iterator &int_it, std::vector< double >::const_iterator &im_it, const double mz, const double im, double &integrated_intensity, const double mz_extraction_window, const double im_extraction_window, const bool ppm)
Extract the next m/z value and add the integrated intensity to integrated_intensity.
int getFilterNr_(const String &filter)
void extractChromatograms(const OpenSwath::SpectrumAccessPtr &input, std::vector< OpenSwath::ChromatogramPtr > &output, const std::vector< ExtractionCoordinates > &extraction_coordinates, double mz_extraction_window, bool ppm, double im_extraction_window, const String &filter)
Extract chromatograms at the m/z and RT defined by the ExtractionCoordinates.
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:27
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
boost::shared_ptr< ISpectrumAccess > SpectrumAccessPtr
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:131
Definition: ChromatogramExtractorAlgorithm.h:39
double mz
m/z value around which should be extracted
Definition: ChromatogramExtractorAlgorithm.h:40
static bool SortExtractionCoordinatesReverseByMZ(const ChromatogramExtractorAlgorithm::ExtractionCoordinates &left, const ChromatogramExtractorAlgorithm::ExtractionCoordinates &right)
Definition: ChromatogramExtractorAlgorithm.h:53
static bool SortExtractionCoordinatesByMZ(const ChromatogramExtractorAlgorithm::ExtractionCoordinates &left, const ChromatogramExtractorAlgorithm::ExtractionCoordinates &right)
Definition: ChromatogramExtractorAlgorithm.h:47
std::string id
identifier
Definition: ChromatogramExtractorAlgorithm.h:45