ProteoWizard
SpectrumList_ChargeFromIsotope.hpp
Go to the documentation of this file.
1 //
2 // $Id: SpectrumList_ChargeFromIsotope.hpp 6389 2014-06-13 19:46:19Z frenchwr $
3 //
4 //
5 // Original author: William French <william.r.french <a.t> vanderbilt.edu>
6 //
7 // Copyright 2008 Vanderbilt University - Nashville, TN 37232
8 //
9 // Licensed under the Apache License, Version 2.0 (the "License");
10 // you may not use this file except in compliance with the License.
11 // You may obtain a copy of the License at
12 //
13 // http://www.apache.org/licenses/LICENSE-2.0
14 //
15 // Unless required by applicable law or agreed to in writing, software
16 // distributed under the License is distributed on an "AS IS" BASIS,
17 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 // See the License for the specific language governing permissions and
19 // limitations under the License.
20 //
21 
22 
23 #ifndef _SPECTRUMLIST_CHARGEFROMISOTOPE_HPP_
24 #define _SPECTRUMLIST_CHARGEFROMISOTOPE_HPP_
25 
29 
30 typedef struct {
31  int charge;
32  std::vector <int> indexList;
34 } isotopeChain;
35 
36 typedef struct {
37  // three score types
38  double mzPvalue;
41  double overallPvalue;
42  // ranks of chains based on different score types
43  int mzRank;
46  int sumRanks;
47  // need index to the chain
49 } scoreChain;
50 
51 typedef struct {
52  double rtime;
53  int indexMap;
54 } rtimeMap;
55 
56 typedef struct {
57  double mz;
58  double intensity;
59 } pairData;
60 
61 
62 namespace pwiz {
63 namespace analysis {
64 
65 using namespace msdata;
66 
67 /// SpectrumList implementation that assigns (probable) charge states to tandem mass spectra
69 {
70  public:
72  int maxCharge = 3,
73  int minCharge = 1,
74  int parentsBefore = 2,
75  int parentsAfter = 0,
76  double isolationWindow = 1.25,
77  int defaultChargeMax = 0,
78  int defaultChargeMin = 0);
79 
80  virtual msdata::SpectrumPtr spectrum(size_t index, bool getBinaryData = true) const;
81 
82  void getMS1RetentionTimes();
83  void simulateSSE(const int,const int);
84  void simulateKL(const double,const int,const int);
85  void simulateTotIntensity(const int);
86  void getParentIndices(const SpectrumPtr,std::vector <int> &) const;
87  void getParentPeaks(const SpectrumPtr,const std::vector <int> &,const double,const double,const double,std::vector< std::vector <double> > &,std::vector< std::vector <double> > &) const;
88 
89  SpectrumListPtr instantiatePeakPicker( const std::vector <int> & ) const;
90  SpectrumListPtr instantiatePeakPicker( const std::vector <int> &, const double, const double, const double ) const;
91 
92  private:
93  bool override_;
96  double sigVal_;
103 
104  int nSamples; // number of samples per simulation
109  double mzTol;
110  double massNeutron;
112 
113  std::vector <double> simulatedSSEs;
114  std::vector <double> simulatedKLs;
115  std::vector <int> simulatedIntensityRankSum;
116  std::vector <rtimeMap> MS1retentionTimes;
117 
118 };
119 
120 
121 } // namespace analysis
122 } // namespace pwiz
123 
124 int nChoosek(int,int);
125 double getKLscore( const isotopeChain, const std::vector <double> &, const std::vector <double> & );
126 
127 #endif // _SPECTRUMLIST_CHARGEFROMISOTOPE_HPP_
boost::shared_ptr< Spectrum > SpectrumPtr
Definition: MSData.hpp:569
SpectrumList implementation that assigns (probable) charge states to tandem mass spectra.
double getKLscore(const isotopeChain, const std::vector< double > &, const std::vector< double > &)
Inheritable pass-through implementation for wrapping a SpectrumList.
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition: MSData.hpp:707
#define PWIZ_API_DECL
Definition: Export.hpp:32
std::vector< int > indexList
int nChoosek(int, int)
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition: MSData.hpp:845