OpenMS
MassTraceDetection.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Timo Sachsenberg $
6 // $Authors: Erhan Kenar, Holger Franken $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
16 
17 namespace OpenMS
18 {
19 
46  class OPENMS_DLLAPI MassTraceDetection :
47  public DefaultParamHandler,
48  public ProgressLogger
49  {
50  public:
53 
55  ~MassTraceDetection() override;
56 
61  void updateIterativeWeightedMeanMZ(const double &, const double &, double &, double &, double &);
62 
67  void run(const PeakMap &, std::vector<MassTrace> &, const Size max_traces = 0);
68 
70  void run(PeakMap::ConstAreaIterator & begin, PeakMap::ConstAreaIterator & end, std::vector<MassTrace> & found_masstraces);
71 
74  protected:
75  void updateMembers_() override;
76 
77  private:
78 
79  struct Apex
80  {
81  Apex(double intensity, Size scan_idx, Size peak_idx);
82  double intensity;
85  };
86 
88  void run_(const std::vector<Apex>& chrom_apices,
89  const Size peak_count,
90  const PeakMap & work_exp,
91  const std::vector<Size>& spec_offsets,
92  std::vector<MassTrace> & found_masstraces,
93  const Size max_traces = 0);
94 
95  // parameter stuff
100 
106 
108  };
109 }
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:66
Forward iterator for an area of peaks in an experiment.
Definition: AreaIterator.h:36
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:46
A mass trace extraction method that gathers peaks similar in m/z and moving along retention time.
Definition: MassTraceDetection.h:49
double noise_threshold_int_
Definition: MassTraceDetection.h:97
String trace_termination_criterion_
Definition: MassTraceDetection.h:101
void updateIterativeWeightedMeanMZ(const double &, const double &, double &, double &, double &)
Allows the iterative computation of the intensity-weighted mean of a mass trace's centroid m/z.
double chrom_peak_snr_
Definition: MassTraceDetection.h:98
MassTrace::MT_QUANTMETHOD quant_method_
Definition: MassTraceDetection.h:99
MassTraceDetection()
Default constructor.
Size trace_termination_outliers_
Definition: MassTraceDetection.h:102
double min_trace_length_
Definition: MassTraceDetection.h:104
void run_(const std::vector< Apex > &chrom_apices, const Size peak_count, const PeakMap &work_exp, const std::vector< Size > &spec_offsets, std::vector< MassTrace > &found_masstraces, const Size max_traces=0)
The internal run method.
double min_sample_rate_
Definition: MassTraceDetection.h:103
void run(const PeakMap &, std::vector< MassTrace > &, const Size max_traces=0)
Main method of MassTraceDetection. Extracts mass traces of a MSExperiment and gathers them into a vec...
~MassTraceDetection() override
Default destructor.
double mass_error_ppm_
Definition: MassTraceDetection.h:96
void updateMembers_() override
This method is used to update extra member variables at the end of the setParameters() method.
double max_trace_length_
Definition: MassTraceDetection.h:105
bool reestimate_mt_sd_
Definition: MassTraceDetection.h:107
void run(PeakMap::ConstAreaIterator &begin, PeakMap::ConstAreaIterator &end, std::vector< MassTrace > &found_masstraces)
Invokes the run method (see above) on merely a subregion of a MSExperiment map.
MT_QUANTMETHOD
Definition: MassTrace.h:40
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:27
A more convenient string class.
Definition: String.h:34
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
Definition: MassTraceDetection.h:80
Size scan_idx
Definition: MassTraceDetection.h:83
Apex(double intensity, Size scan_idx, Size peak_idx)
double intensity
Definition: MassTraceDetection.h:82
Size peak_idx
Definition: MassTraceDetection.h:84