Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
LmaIsotopeFitter1D.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2013.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Clemens Groepl $
32 // $Authors: $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_TRANSFORMATIONS_FEATUREFINDER_LMAISOTOPEFITTER1D_H
36 #define OPENMS_TRANSFORMATIONS_FEATUREFINDER_LMAISOTOPEFITTER1D_H
37 
39 
40 
41 
42 namespace OpenMS
43 {
49  class OPENMS_DLLAPI LmaIsotopeFitter1D :
50  public LevMarqFitter1D
51  {
52 public:
53 
54  enum Averagines {C = 0, H, N, O, S, AVERAGINE_NUM};
55 
58 
60  LmaIsotopeFitter1D(const LmaIsotopeFitter1D & source);
61 
63  virtual ~LmaIsotopeFitter1D();
64 
66  virtual LmaIsotopeFitter1D & operator=(const LmaIsotopeFitter1D & source);
67 
69  static Fitter1D * create()
70  {
71  return new LmaIsotopeFitter1D();
72  }
73 
75  static const String getProductName()
76  {
77  return "LmaIsotopeFitter1D";
78  }
79 
81  QualityType fit1d(const RawDataArrayType & range, InterpolationModel * & model);
82 
83 protected:
84 
86  struct Data
87  {
88  typedef Peak1D PeakType;
89  typedef std::vector<PeakType> RawDataArrayType;
90  typedef std::vector<double> ContainerType;
92 
97  // bool mono_known;
98  // CoordinateType monoisotopic_mz;
101  };
102 
104  void setInitialParameters_();
105 
107  static Int residual_(const gsl_vector * x, void * params, gsl_vector * f);
108 
110  static Int jacobian_(const gsl_vector * x, void * params, gsl_matrix * J);
111 
113  static Int evaluate_(const gsl_vector * x, void * params, gsl_vector * f, gsl_matrix * J);
114 
119  void printState_(Int iter, gsl_multifit_fdfsolver * s);
120 
138  DoubleReal averagine_[AVERAGINE_NUM];
143 
144  void updateMembers_();
145  };
146 }
147 
148 #endif // OPENMS_TRANSFORMATIONS_FEATUREFINDER_LMAISOTOPEFITTER1D_H
Abstract class for 1D-model fitter using Levenberg-Marquardt algorithm for parameter optimization...
Definition: LevMarqFitter1D.h:52
Int max_isotope_
maximum isotopic rank to be considered
Definition: LmaIsotopeFitter1D.h:130
DoubleReal CoordinateType
Coordinate type (of the position)
Definition: Peak2D.h:65
Feature::CoordinateType CoordinateType
Definition: LmaIsotopeFitter1D.h:91
A more convenient string class.
Definition: String.h:56
static Fitter1D * create()
create new LmaIsotopeFitter1D object (function needed by Factory)
Definition: LmaIsotopeFitter1D.h:69
CoordinateType isotope_distance
Definition: LmaIsotopeFitter1D.h:96
bool monoisotopic_mass_known_
The position of the monoisotopic mass is known(=1) or unknown(=0).
Definition: LmaIsotopeFitter1D.h:142
CoordinateType sigma
Definition: LmaIsotopeFitter1D.h:100
Helper struct (contains the size of an area, a raw data container, the relative abundance of i-th iso...
Definition: LmaIsotopeFitter1D.h:86
RawDataArrayType set
Definition: LmaIsotopeFitter1D.h:94
Size n
Definition: LmaIsotopeFitter1D.h:93
Abstract class for 1D-models that are approximated using linear interpolation.
Definition: InterpolationModel.h:55
CoordinateType total_intensity_
total intensity (area under curve)
Definition: LmaIsotopeFitter1D.h:126
DoubleReal trim_right_cutoff_
cutoff in averagine distribution, trailing isotopes below this relative intensity are not considered ...
Definition: LmaIsotopeFitter1D.h:132
Isotope distribution fitter (1-dim.) approximated using Levenberg-Marquardt algorithm (GSL implementa...
Definition: LmaIsotopeFitter1D.h:49
CoordinateType monoisotopic_mz_
monoisotopic mass
Definition: LmaIsotopeFitter1D.h:128
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:55
UInt charge_
isotope charge
Definition: LmaIsotopeFitter1D.h:122
CoordinateType isotope_stdev_
standard derivation in isotope
Definition: LmaIsotopeFitter1D.h:124
CoordinateType isotopes_stdev
Definition: LmaIsotopeFitter1D.h:99
CoordinateType mean_
Centroid m/z (as opposed to monoisotopic m/z)
Definition: LmaIsotopeFitter1D.h:136
Peak1D PeakType
Definition: LmaIsotopeFitter1D.h:88
Definition: LmaIsotopeFitter1D.h:54
static const String getProductName()
name of the model (needed by Factory)
Definition: LmaIsotopeFitter1D.h:75
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:144
Abstract base class for all 1D-dimensional model fitter.
Definition: Fitter1D.h:59
Averagines
Definition: LmaIsotopeFitter1D.h:54
std::vector< double > ContainerType
Definition: LevMarqFitter1D.h:58
std::vector< double > ContainerType
Definition: LmaIsotopeFitter1D.h:90
ContainerType isotopes_exact_
relative abundance of i-th isotopic peak
Definition: LmaIsotopeFitter1D.h:140
int Int
Signed integer type.
Definition: Types.h:100
ContainerType isotopes_exact
Definition: LmaIsotopeFitter1D.h:95
DoubleReal isotope_distance_
distance between consecutive isotopic peaks
Definition: LmaIsotopeFitter1D.h:134
std::vector< PeakType > RawDataArrayType
Definition: LmaIsotopeFitter1D.h:89

OpenMS / TOPP release 1.11.1 Documentation generated on Thu Nov 14 2013 11:19:16 using doxygen 1.8.5