quantificationMethod.h 3.25 KB
Newer Older
Edlira Nano's avatar
Edlira Nano committed
1
/*
Edlira Nano's avatar
Edlira Nano committed
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 *
 * MassChroQ: Mass Chromatogram Quantification software.
 * Copyright (C) 2010 Olivier Langella, Edlira Nano, Benoit Valot, Michel Zivy.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
Edlira Nano's avatar
 
Edlira Nano committed
20
21
22
23
24
25
/**
 * \file quantificationMethod.h
 * \date October 26, 2010
 * \author Edlira Nano
 */

Langella Olivier's avatar
Langella Olivier committed
26
#pragma once
Edlira Nano's avatar
 
Edlira Nano committed
27

28
#include <QTextStream>
Langella Olivier's avatar
Langella Olivier committed
29
#include <pappsomspp/types.h>
Langella Olivier's avatar
Langella Olivier committed
30
31
#include <pappsomspp/processing/detection/tracedetectioninterface.h>
#include <pappsomspp/processing/filters/filtersuite.h>
32
#include <odsstream/calcwriterinterface.h>
Edlira Nano's avatar
 
Edlira Nano committed
33
34
35
36

/**
   \class QuantificationMethod
   \brief Represents a method of quantification
Edlira Nano's avatar
Edlira Nano committed
37
*/
Langella Olivier's avatar
Langella Olivier committed
38
39
class QuantificationMethod
{
Edlira Nano's avatar
 
Edlira Nano committed
40

41
42
43
44
  public:
  QuantificationMethod(const QString &xml_id);
  QuantificationMethod(const QuantificationMethod &other);
  virtual ~QuantificationMethod();
45

46
  const QString &getXmlId() const;
47

48
  virtual void printInfos(QTextStream &out) const;
49

Langella Olivier's avatar
Langella Olivier committed
50
51
  void
  setDetectionMethod(pappso::TraceDetectionInterfaceCstSPtr detection_method);
52

Langella Olivier's avatar
Langella Olivier committed
53
  const pappso::TraceDetectionInterfaceCstSPtr &getDetectionMethod() const;
54

55
  void setXicExtractMethod(pappso::XicExtractMethod xic_type);
56

57
  pappso::XicExtractMethod getXicExtractMethod() const;
58

Langella Olivier's avatar
Langella Olivier committed
59
  void addFilter(pappso::FilterInterfaceSPtr filter_sp);
60

61
  const pappso::FilterSuite &getXicFilters() const;
Edlira Nano's avatar
 
Edlira Nano committed
62

63
64
65
  pappso::PrecisionPtr getLowerPrecision() const;
  pappso::PrecisionPtr getUpperPrecision() const;
  pappso::PrecisionPtr getMeanPrecision() const;
66

67
  const pappso::MzRange getMzRange(pappso::pappso_double mz) const;
68

69
70
  void setXicExtractLowerPrecision(pappso::pappso_double min);
  void setXicExtractUpperPrecision(pappso::pappso_double max);
71
  void setXicExtractPrecisionUnit(pappso::PrecisionUnit precision_unit);
72

73
  void setXicExtractPrecision(pappso::PrecisionPtr precision);
74

75
76
77
78
79
80
  /** @brief tells if we want a second chance to detect small peaks, very near
   * the targeted retention time if enabled, this looks for small peaks with
   * boundary retention time smaller than the MS1 minimum range
   */
  bool getSecondChance() const;

81
82
83
  private:
  /// unique xml id for this method
  const QString _xml_id;
Edlira Nano's avatar
 
Edlira Nano committed
84

85
  /// the xic filters
86
  pappso::FilterSuite m_filter_list;
87
  // pappso::XicFilterInterface *_p_xic_filter = nullptr;
Langella Olivier's avatar
Langella Olivier committed
88

89
  /// the peak detection method for this quantification
Langella Olivier's avatar
Langella Olivier committed
90
  pappso::TraceDetectionInterfaceCstSPtr mcsp_detection_method;
Langella Olivier's avatar
Langella Olivier committed
91

92
93
  pappso::XicExtractMethod _m_xic_extract_method =
    pappso::XicExtractMethod::max;
Langella Olivier's avatar
Langella Olivier committed
94

95
  pappso::PrecisionUnit _precision_unit = pappso::PrecisionUnit::ppm;
Langella Olivier's avatar
Langella Olivier committed
96

97
98
  pappso::pappso_double _upper_precision = 10;
  pappso::pappso_double _lower_precision = 10;
Langella Olivier's avatar
Langella Olivier committed
99

100
101
  pappso::PrecisionPtr _lower_precision_p = nullptr;
  pappso::PrecisionPtr _upper_precision_p = nullptr;
102
103

  bool m_secondChance = false;
Langella Olivier's avatar
Langella Olivier committed
104
};