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

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:00 using doxygen 1.8.13