ProteoWizard
SpectrumList_ChargeFromIsotope.hpp
Go to the documentation of this file.
1//
2// $Id$
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
30typedef struct {
31 int charge;
32 std::vector <int> indexList;
35
36typedef struct {
37 // three score types
38 double mzPvalue;
42 // ranks of chains based on different score types
43 int mzRank;
47 // need index to the chain
50
51typedef struct {
52 double rtime;
54} rtimeMap;
55
56typedef struct {
57 double mz;
58 double intensity;
59} pairData;
60
61
62namespace pwiz {
63namespace analysis {
64
65using 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
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:
96 double sigVal_;
103
104 int nSamples; // number of samples per simulation
109 double mzTol;
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
124int nChoosek(int,int);
125double getKLscore( const isotopeChain, const std::vector <double> &, const std::vector <double> & );
126
127#endif // _SPECTRUMLIST_CHARGEFROMISOTOPE_HPP_
#define PWIZ_API_DECL
Definition Export.hpp:32
double getKLscore(const isotopeChain, const std::vector< double > &, const std::vector< double > &)
int nChoosek(int, int)
SpectrumList implementation that assigns (probable) charge states to tandem mass spectra.
void getParentIndices(const SpectrumPtr, std::vector< int > &) const
SpectrumListPtr instantiatePeakPicker(const std::vector< int > &, const double, const double, const double) const
SpectrumList_ChargeFromIsotope(const msdata::MSData &msd, int maxCharge=3, int minCharge=1, int parentsBefore=2, int parentsAfter=0, double isolationWindow=1.25, int defaultChargeMax=0, int defaultChargeMin=0)
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
virtual msdata::SpectrumPtr spectrum(size_t index, bool getBinaryData=true) const
retrieve a spectrum by index
SpectrumListPtr instantiatePeakPicker(const std::vector< int > &) const
void simulateKL(const double, const int, const int)
Inheritable pass-through implementation for wrapping a SpectrumList.
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition MSData.hpp:711
boost::shared_ptr< Spectrum > SpectrumPtr
Definition MSData.hpp:573
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition MSData.hpp:850