Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
MS1FeatureMerger.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: Florian Zeller $
32 // $Authors: Lukas Mueller, Markus Mueller $
33 // --------------------------------------------------------------------------
34 //
36 //
37 // written by Lukas N Mueller, 30.3.05
38 // Lukas.Mueller@imsb.biol.ethz.ch
39 // Group of Prof. Ruedi Aebersold, IMSB, ETH Hoenggerberg, Zurich
40 //
41 // Ported to OpenMS by Florian Zeller, florian.zeller@bsse.ethz.ch
42 // December 2010
43 //
44 // **********************************************************************//
45 // CLASS Spec MERGER:
46 // merges 2 spectra which have been preprocessed
47 // by spec_merge-> common lc_peaks are marked!!!!
48 //
49 
50 #ifndef OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_MS1FEATUREMERGER_H
51 #define OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_MS1FEATUREMERGER_H
52 
53 namespace OpenMS
54 {
55 
56  class OPENMS_DLLAPI MS1FeatureMerger
57  {
58 
59 
61  // declaration of the private members:
62 
63 private:
64 
66  // the common lc-ms spectrum,
67  // created from teh overlap of A and B
69 
70  std::vector<int> idsToRemove;
71  std::map<double, std::vector<SHFeature *> > mzClusters;
72 
73 
75  // declaration of the public members:
76 
77 public:
78 
79  /*
80  static double INTENSITY_APEX_THRESHOLD;
81  static double MS1_PEAK_AREA_TR_RESOLUTION;
82 
83  static double INITIAL_TR_TOLERANCE;
84  static double MS1_FEATURE_MERGING_TR_TOLERANCE;
85  static double PERCENTAGE_INTENSITY_ELUTION_BORDER_VARIATION;
86  static double PPM_TOLERANCE_FOR_MZ_CLUSTERING;
87  static bool MS1_FEATURE_CLUSTERING;
88  */
89 
90  // class destructor
92  // class constructor
94 
95 
97  // start the merging process
98  void startFeatureMerging();
99  // create a distribution of delta Tr for the splited features
100  void createMZFeatureClusters();
101  // process a vector of m/z features
102  void processMZFeatureVector(std::vector<SHFeature *> *);
103  // find to this feature the features which should be merged
104  std::vector<SHFeature *>::iterator findFeaturesToMerge(SHFeature *, std::vector<SHFeature *>::iterator, std::vector<SHFeature *> *);
105  // compare if a feature belongs to another feature
106  bool compareMZFeatureBeloning(SHFeature *, SHFeature *);
107  // merge the target to the search feature
108  void mergeFeatures(SHFeature *, SHFeature *);
109  // copmute new parameters for the merged MS1 feature
110  void computeNewMS1FeatureParameters(SHFeature *);
111  // computes the area of between 2 peaks:
112  double computeDeltaArea(double, double, double, double);
113 
114 
115  // this structure provides the function to compare
116  // in the sorting algorithm:
118  {
119  // provide the compare function for sort:
120  bool operator()(const SHFeature A, const SHFeature B) const
121  {
122  // check if they have same mass
123  return A.TR < B.TR;
124  }
125 
126  };
127 
128 
130  // start here all the get / set
131  // function to access the
132  // variables of the class
133 
134  };
135 
136 } // ns
137 
138 #endif // OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_MS1FEATUREMERGER_H
bool operator()(const SHFeature A, const SHFeature B) const
Definition: MS1FeatureMerger.h:120
Definition: MS1FeatureMerger.h:56
LCMS * lcmsMap
Definition: MS1FeatureMerger.h:68
std::vector< int > idsToRemove
Definition: MS1FeatureMerger.h:70
Definition: LCMS.h:55
double TR
Definition: SHFeature.h:120
std::map< double, std::vector< SHFeature * > > mzClusters
Definition: MS1FeatureMerger.h:71
Definition: SHFeature.h:51
Definition: MS1FeatureMerger.h:117

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