Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
FTPeakDetectController.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 #ifndef OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_FTPEAKDETECTCONTROLLER_H
46 #define OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_FTPEAKDETECTCONTROLLER_H
47 
48 #include <boost/shared_ptr.hpp>
49 
50 namespace OpenMS
51 {
52 
53  class OPENMS_DLLAPI FTPeakDetectController
54  {
55 
57  // declaration of the private members:
58 
59 private:
60 
62  // declaration of the public members:
63 
64  // LCMS runs
65  //LCMS* THIS_LCMS;
67 // std::vector<SHFeature> fakeFeatureList_;
68  std::vector<LCMS> lcmsRuns_;
69 
70  // paths:
71  std::string targetMzXML;
72  std::string SOURCE_DIR;
73  std::string OUTPUT_DIR;
74 
75 public:
76 
77  typedef std::pair<double, boost::shared_ptr<RawData> > Map;
78  typedef std::vector<Map> Vec;
79 
80 // static bool CREATE_FEATURE_ELUTION_PROFILES;
81 // static bool LCelutionPeakDebugging;
82 // static double LCelutionPeakMassMin;
83 // static double LCelutionPeakMassMax;
84 
85 // static MS2Feature* SearchedM2Feature;
86 
87 // static bool FEATURE_FAKE_INSERTION_BASED_ON_MS2_FEATURE;
88 
89  // class destructor
91 
92  // class constructor
94  // class copy constructor
96 
98  // function for batch processing of mzXML data
99  // parses LC-MS from runs from a directory or file of raw mzXML data:
100  void parseMzXMLData();
101 
103  // mzXML parsing functions for a single MzXML file:
104  // start the scan parsing of a mzXML file:
105  void startScanParsing(Vec datavec);
106 
107  // **** for the MS1 level post processing:
108  // process MS1 level data
109  void process_MS1_level_data_structure(ProcessData *);
110  // adds an elution peak to the LC/MS run:
111  void add_raw_peak_to_LC_MS_run(LCElutionPeak *);
112  // function to add the elution profile to the feature:
113  void addLCelutionProfile(SHFeature *, LCElutionPeak *);
114 
116  // reads already paths of existing LC-MS runs in xml format into the
117  // memory
118  // for now, open file system for every check, but otherwise could eb done
119  // in the constructor
120  bool checkIfFeatureExtractionExists(std::string);
121 
122  // **** for the MS2 level post processing:
123  // process MS2 level data
124  void process_MS2_level_data_structure(ProcessData *);
125  // processes the tracted signals on teh MS2 level
126  void extract_MS2_elution_features();
127  // combine the MS2 feature trace data to the MS1 features:
128  void associateMS2FeatureToMS1Feature(MS2Feature *);
129  // add an observed MS2 feature to the MS1 feature
130  // if an observation is already there, then
131  // construct a merged MS2 feature
132  void addMS2FeatureToMS1Feature(MS2Feature *, SHFeature *);
133 
134  // construct here fake ms1 features based on a observed MS2 feature
135  // which however could not be matched to a exiting ms1 feature
136  void constructMS1FeatureFromMS2Feature(MS2Feature *);
137 
139  // write a parsed LC/MS into directory:
140  void write_out_parsed_LC_MS(LCMS *);
141  // add fake MS/MS information for the MS1 feature:
142  void addFakeMSMSToFeature(SHFeature *);
143 
144 
146  // overload operators:
147  FTPeakDetectController & operator=(const FTPeakDetectController &);
148  FTPeakDetectController & operator<=(const FTPeakDetectController &);
149  FTPeakDetectController & operator>=(const FTPeakDetectController &);
150  FTPeakDetectController & operator<(const FTPeakDetectController &);
151  FTPeakDetectController & operator>(const FTPeakDetectController &);
152 
154  // start here all the get / set
155  // function to access the
156  // variables of the class
157 
158  // target file:
159  void set_target_file(std::string IN);
160  std::string get_target_file();
161 
162 // get the vector of LC/MS runs:
163 //std::vector<LCMS> getParsedData();
164 //bool getParsedDataEmpty();
165 //std::vector<LCMS>::iterator get_parsed_DATA_START();
166 //std::vector<LCMS>::iterator get_parsed_DATA_END();
167  LCMS * getLCMS();
168  };
169 
170  inline void FTPeakDetectController::set_target_file(std::string IN)
171  {
172  targetMzXML = IN;
173  }
174 
176  {
177  return targetMzXML;
178  }
179 
180  /*
181  // get the vector of LC/MS runs:
182  inline std::vector<LCMS> FTPeakDetectController::getParsedData()
183  {
184  return lcmsRuns_;
185  }
186 
187  inline bool FTPeakDetectController::getParsedDataEmpty()
188  {
189  return LC_MS_RUNS.empty();
190  }
191 
192  inline std::vector<LCMS>::iterator FTPeakDetectController::get_parsed_DATA_START()
193  {
194  return LC_MS_RUNS.begin();
195  }
196 
197  inline std::vector<LCMS>::iterator FTPeakDetectController::get_parsed_DATA_END()
198  {
199  return LC_MS_RUNS.end();
200  }
201 */
202 
204  {
205  return lcms_;
206  }
207 
208 } // ns
209 
210 #endif // OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_FTPEAKDETECTCONTROLLER_H
Definition: ProcessData.h:63
std::vector< LCMS > lcmsRuns_
Definition: FTPeakDetectController.h:68
std::vector< Map > Vec
Definition: FTPeakDetectController.h:78
LCMS * getLCMS()
Definition: FTPeakDetectController.h:203
std::string SOURCE_DIR
Definition: FTPeakDetectController.h:72
std::string OUTPUT_DIR
Definition: FTPeakDetectController.h:73
Definition: FTPeakDetectController.h:53
Definition: LCMS.h:55
LCMS * lcms_
Definition: FTPeakDetectController.h:66
Definition: MS2Feature.h:54
void set_target_file(std::string IN)
Definition: FTPeakDetectController.h:170
std::pair< double, boost::shared_ptr< RawData > > Map
Definition: FTPeakDetectController.h:77
std::string get_target_file()
Definition: FTPeakDetectController.h:175
Definition: LCElutionPeak.h:65
Definition: SHFeature.h:51
std::string targetMzXML
Definition: FTPeakDetectController.h:71

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