00001 // -------------------------------------------------------------------------- 00002 // OpenMS -- Open-Source Mass Spectrometry 00003 // -------------------------------------------------------------------------- 00004 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, 00005 // ETH Zurich, and Freie Universitaet Berlin 2002-2012. 00006 // 00007 // This software is released under a three-clause BSD license: 00008 // * Redistributions of source code must retain the above copyright 00009 // notice, this list of conditions and the following disclaimer. 00010 // * Redistributions in binary form must reproduce the above copyright 00011 // notice, this list of conditions and the following disclaimer in the 00012 // documentation and/or other materials provided with the distribution. 00013 // * Neither the name of any author or any participating institution 00014 // may be used to endorse or promote products derived from this software 00015 // without specific prior written permission. 00016 // For a full list of authors, refer to the file AUTHORS. 00017 // -------------------------------------------------------------------------- 00018 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00019 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00020 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00021 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING 00022 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00023 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00024 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 00025 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00026 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00027 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 00028 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00029 // 00030 // -------------------------------------------------------------------------- 00031 // $Maintainer: Florian Zeller $ 00032 // $Authors: Lukas Mueller, Markus Mueller $ 00033 // -------------------------------------------------------------------------- 00034 // 00036 // 00037 // PEAK DETECTION OF FOURIER TRANSFORME MS INSTRUMENT DATA 00038 // 00039 // written by Markus Mueller, markus.mueller@imsb.biol.ethz.ch 00040 // and Lukas Mueller, Lukas.Mueller@imsb.biol.ethz.ch 00041 // October 2005 00042 // 00043 // Ported to OpenMS by Florian Zeller, florian.zeller@bsse.ethz.ch 00044 // December 2010 00045 // 00046 // Group of Prof. Ruedi Aebersold, IMSB, ETH Hoenggerberg, Zurich 00047 // 00048 // 00049 00050 00051 #ifndef OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_PROCESSDATA_H 00052 #define OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_PROCESSDATA_H 00053 00054 #include <map> 00055 #include <vector> 00056 #include <string> 00057 #include <list> 00058 00059 namespace OpenMS 00060 { 00061 00062 00063 class OPENMS_DLLAPI ProcessData 00064 { 00065 00066 00068 // declaration of the private members: 00069 00070 public: 00071 typedef std::multimap<int, MSPeak> elution_peak; 00072 typedef std::vector<elution_peak> MZ_series; 00073 typedef std::vector<elution_peak>::iterator MZ_series_ITERATOR; 00074 typedef std::multimap<double, MZ_series> main_data_structure; 00075 typedef main_data_structure::iterator main_iterator; 00076 00077 00078 protected: 00079 00081 // declaration of the public members: 00082 // map that tracts all observed masses in keys 00083 00084 00085 // clustering of ms peak along time axis: 00086 // bool TIME_CLUSTERING_BY_RETENTION_TIME; 00087 00088 // max_distance from next elution peak member in scan numbers: 00089 int max_inter_scan_distance; 00090 00091 // cluster data structure: 00092 LCMSCData * data_; 00093 00094 // and stores as contents vectors of type 00095 main_data_structure pMZ_LIST; 00096 00097 // tracks the number of observed mz cluster 00098 // elements: 00099 std::map<double, int> MZ_CLUSTER; 00100 unsigned int LC_elution_peak_counter; 00101 00102 00104 // data processing classes: 00105 BackgroundControl * backgroundController; 00106 00107 00108 00109 public: 00110 00111 /* 00112 // minimal intensity level: 00113 static float INTENSITY_THRESHOLD; 00114 00115 // m/z tolerance value: 00116 static double MZ_TOLERANCE; 00117 00118 // max_distance from next elution peak member in min.: 00119 static double max_inter_scan_retention_time_distance; 00120 00121 // define minimal number of members in LC elution peaks cluster 00122 static int min_nb_cluster_members; 00123 00124 static std::map<int, float> scan_TR_index; 00125 00126 // to track detected monoistopic mass for debugging: 00127 static bool MonoIsoDebugging; 00128 static double DebugMonoIsoMassMin; 00129 static double DebugMonoIsoMassMax; 00130 static double MS1_intensity_apex_percentil_cutoff; 00131 static double MS1_TR_RESOLUTION; 00132 // if data are in centroid form or not: 00133 static bool CENTROID_DATA_MODUS; 00134 */ 00135 00136 // class destructor 00137 ~ProcessData(); 00138 00139 // class constructor 00140 ProcessData(); 00141 // class copy constructor 00142 ProcessData(const ProcessData &); 00143 00144 00146 // inputs raw /centroided data into the object: 00147 void add_scan_raw_data(int, float, CentroidData *); 00148 // inputs raw data into the object: 00149 void add_scan_raw_data(std::vector<MSPeak>); 00150 00152 // overload operators: 00153 ProcessData & operator=(const ProcessData &); 00154 ProcessData & operator<=(const ProcessData &); 00155 ProcessData & operator>=(const ProcessData &); 00156 ProcessData & operator<(const ProcessData &); 00157 ProcessData & operator>(const ProcessData &); 00158 00159 // insert an already observed mz into the data structure, checks 00160 // if it belongs to an existing LC elution peak or starts a new one: 00161 void insert_observed_mz(main_iterator, MSPeak *); 00162 // insert a newly observed mz into the data structure 00163 void insert_new_observed_mz(MSPeak *); 00164 00165 00166 // converts DeconvPeak list to ms_peak vector 00167 void convert_ms_peaks(int, double, std::list<DeconvPeak> &, std::vector<MSPeak> &); 00168 00169 // check if the ms peak is in the selected mz, z, int range 00170 bool filterDeisotopicMSPeak(MSPeak *); 00171 00173 // function which check if a data structure iterator is similar 00174 // to a peak and should be considered 00175 // returns 1 if ok 00176 // returns 0 if not 00177 // returns -1 if scan range exceeded 00178 int compareIteratorToPeak(MSPeak *, main_iterator); 00179 // checks if a mz value has already been seen, 00180 // also look for very close ones and cluster them 00181 main_iterator check_MZ_occurence(MSPeak *); 00182 00183 00185 // process a series of MS peaks 00186 // set the signal to noise level: 00187 void processMSPeaks(std::multimap<int, MSPeak> *); 00188 00189 00191 // get the full summed up intensity 00192 double getPeakIntensitySum(double); 00193 00194 00195 // check if a peak with this scan number belong to this elution cluster: 00196 bool check_elution_peak_belong(MZ_series_ITERATOR, MSPeak *); 00197 // returns the distance to this elution peak: 00198 int getElutionPeakDistance(MZ_series_ITERATOR, int); 00199 00200 // runs through the whole data structure and puts the elution_peaks into 00201 // a proper LC_elution peak object 00202 void extract_elution_peaks(); 00203 00204 // check if this elution peak is accepted as a really LC-elution peak: 00205 bool check_elution_peak(MZ_series_ITERATOR); 00206 00207 // convert the MZ_series elution peak element into a LC_elution_peak object 00208 void convert_to_LC_elution_peak(MZ_series_ITERATOR, double); 00209 00210 // find a retention time by the scan number: 00211 double find_retention_time(double); 00212 00213 // find closest match mz mass in the main structure 00214 main_iterator find_closest_mz_match(double); 00215 00216 // go back to the MS1 level and 00217 // find the correct precursor mass by mz and z: 00218 void adjustCorrectToMS1Precursor(double *, int, int, int); 00219 00220 00222 // access methods to the object variables: 00223 00224 // get an observed MZ mass, otherwise end of list iterator 00225 main_iterator get_MZ(double); 00226 // get an observed MZ mass, otherwise end of list iterator 00227 main_iterator get_MZ_lower_bound(double); 00228 // get end of MZ list: 00229 main_iterator get_MZ_LIST_end(); 00230 // get start of MZ list: 00231 main_iterator get_MZ_LIST_start(); 00232 // erase element in MZ list: 00233 void erase_MZ_LIST_element(main_iterator); 00234 int getNbMSTraces(){ return (int) pMZ_LIST.size(); } 00235 00236 00237 double getMinimalIntensityLevel(){return SuperHirnParameters::instance()->getIntensityThreshold(); } 00238 00239 00240 00241 // access the MZ_CLUSTER: 00242 // find element numbers: 00243 std::map<double, int>::iterator get_nb_MZ_cluster_elements(double); 00244 // erase an element: 00245 void erase_MZ_cluster_element(std::map<double, int>::iterator); 00246 // insert an element: 00247 void insert_MZ_cluster_element(double, int); 00248 00249 // add the scan vs TR index to the data structure: 00250 // void add_scan_TR_index(std::map<int, float> IN){scan_TR_index = IN;}; 00251 00252 // get the processed data: 00253 LCMSCData * getProcessedData(){return data_; } 00254 00255 // increase the LC_elution_profile counter: 00256 void increase_LC_elution_peak_counter(){LC_elution_peak_counter++; } 00257 unsigned int get_LC_elution_peak_counter(){return LC_elution_peak_counter; } 00258 00259 // get the maximal scan distance between two same monoisotopic masses 00260 int getMaxScanDistance(){ return max_inter_scan_distance; } 00261 void setMaxScanDistance(int in){ max_inter_scan_distance = in; } 00262 00263 00264 // build up an index scan vs retention time: 00265 // static void insert_into_scan_TR_index(int IN, float TR){scan_TR_index.insert(std::pair<int, float>(IN,TR));}; 00266 00267 }; 00268 00269 } // ns 00270 00271 #endif // OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_PROCESSDATA_H
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:43 using doxygen 1.7.1 |