Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

MSPeak.h

Go to the documentation of this file.
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 #ifndef OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_MSPEAK_H
00050 #define OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_MSPEAK_H
00051 
00052 #include <string>
00053 #include <vector>
00054 #include <map>
00055 
00056 #include <OpenMS/CONCEPT/Types.h>
00057 #include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/SUPERHIRN/CentroidPeak.h>
00058 
00059 namespace OpenMS
00060 {
00061 
00062 //class CentroidPeak; // changed to include
00063 
00064   class OPENMS_DLLAPI MSPeak
00065   {
00066 
00068     // declaration of the private members:
00069 
00070     double precursorMZ;
00071     double MZ;
00072     float INTENSITY;
00073     int SCAN;
00074     double TR;
00075     unsigned int CHRG;
00076     unsigned int NRISOTOPES;
00077     float SCORE;
00078 
00079     std::string extraMSPeakInfo;
00080 
00081     // child scan options:
00082     bool precursorMass;
00083     int childScan;
00084 
00085     double SignalToNoise;
00086     std::vector<CentroidPeak> ISOPEAKS;
00087 
00088 private:
00089 
00091     // declaration of the public members:
00092 
00093 public:
00094 
00095     // class destructor
00096     ~MSPeak();
00097 
00098     // class constructor
00099     MSPeak(int, double, float);
00100     MSPeak();
00101     MSPeak(int, double, float, unsigned int, unsigned int, float, std::vector<CentroidPeak>);
00102     MSPeak(const MSPeak &);
00103     MSPeak(const MSPeak *);
00104 
00106     // overload operators:
00107     MSPeak & operator=(const MSPeak &);
00108     MSPeak & operator<=(const MSPeak &);
00109     MSPeak & operator>=(const MSPeak &);
00110     MSPeak & operator<(const MSPeak &);
00111     MSPeak & operator>(const MSPeak &);
00112 
00113     // show content of peak:
00114     void show_info();
00115 
00116     // store the MS/MS scan number and activate this peak as precursor peak:
00117     void activateAsPrecursorPeak(int);
00118 
00120     // check if the input mass matches one of the isotopic masses
00121     bool checkIsotopeBelongingAndAdjustMass(double, double);
00122 
00124     // start here all the get / set
00125     // function to access the
00126     // variables of the class
00127 
00128     std::vector<CentroidPeak> & get_isotopic_peaks()
00129     {
00130       return ISOPEAKS;
00131     }
00132 
00133     std::vector<CentroidPeak>::iterator get_isotopic_peaks_start()
00134     {
00135       return ISOPEAKS.begin();
00136     }
00137 
00138     std::vector<CentroidPeak>::iterator get_isotopic_peaks_end()
00139     {
00140       return ISOPEAKS.end();
00141     }
00142 
00143     void setExtraPeakInfo(std::string in)
00144     {
00145       extraMSPeakInfo = in;
00146     }
00147 
00148     std::string getExtraPeakInfo()
00149     {
00150       return extraMSPeakInfo;
00151     }
00152 
00153     // precursor mass of the ms2 scane:
00154     void setPrecursorMZ(double in)
00155     {
00156       precursorMZ = in;
00157     }
00158 
00159     double getPrecursorMZ()
00160     {
00161       return precursorMZ;
00162     }
00163 
00164     // precursor mass charge state:
00165     void setPrecursorCHRG(int in)
00166     {
00167       CHRG = in;
00168     }
00169 
00170     int getPrecursorCHRG()
00171     {
00172       return CHRG;
00173     }
00174 
00175     // check if this peak has been determined as precursor:
00176     bool getPrecursorActivation()
00177     {
00178       return precursorMass;
00179     }
00180 
00181     int get_Chrg()
00182     {
00183       return CHRG;
00184     }
00185 
00186     void set_Chrg(int z)
00187     {
00188       CHRG = z;
00189     }
00190 
00191     int get_Scan()
00192     {
00193       return SCAN;
00194     }
00195 
00196     float get_intensity()
00197     {
00198       return INTENSITY;
00199     }
00200 
00201     double get_MZ()
00202     {
00203       return MZ;
00204     }
00205 
00206     int get_scan_number()
00207     {
00208       return SCAN;
00209     }
00210 
00211     void set_retention_time(double IN)
00212     {
00213       TR = IN;
00214     }
00215 
00216     double get_retention_time()
00217     {
00218       return TR;
00219     }
00220 
00221     unsigned int get_charge_state()
00222     {
00223       return CHRG;
00224     }
00225 
00226     unsigned int get_nr_isotopes()
00227     {
00228       return NRISOTOPES;
00229     }
00230 
00231     float get_score()
00232     {
00233       return SCORE;
00234     }
00235 
00236     double getSignalToNoise()
00237     {
00238       return SignalToNoise;
00239     }
00240 
00241     void setSignalToNoise(double in)
00242     {
00243       SignalToNoise = in;
00244     }
00245 
00246   };
00247 
00248 } // ns
00249 
00250 #endif // OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_MSPEAK_H

OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:42 using doxygen 1.7.1