| OpenMS 2.5.0

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