ProteoWizard
pwiz
analysis
spectrum_processing
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
26
#include "
pwiz/utility/misc/Export.hpp
"
27
#include "
pwiz/utility/misc/IntegerSet.hpp
"
28
#include "
pwiz/data/msdata/SpectrumListWrapper.hpp
"
29
30
typedef
struct
{
31
int
charge
;
32
std::vector <int>
indexList
;
33
int
parentIndex
;
34
}
isotopeChain
;
35
36
typedef
struct
{
37
// three score types
38
double
mzPvalue
;
39
double
intensityPvalue
;
40
double
intensitySumPvalue
;
41
double
overallPvalue
;
42
// ranks of chains based on different score types
43
int
mzRank
;
44
int
intensityRank
;
45
int
intensitySumRank
;
46
int
sumRanks
;
47
// need index to the chain
48
int
chainIndex
;
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
68
class
PWIZ_API_DECL
SpectrumList_ChargeFromIsotope
:
public
msdata::SpectrumListWrapper
69
{
70
public
:
71
SpectrumList_ChargeFromIsotope
(
const
msdata::MSData
& msd,
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_
;
94
int
maxCharge_
;
95
int
minCharge_
;
96
double
sigVal_
;
97
int
nChainsCheck_
;
98
int
parentsBefore_
;
99
int
parentsAfter_
;
100
int
defaultChargeMax_
;
101
int
defaultChargeMin_
;
102
double
defaultIsolationWidth_
;
103
104
int
nSamples
;
// number of samples per simulation
105
int
maxIsotopePeaks
;
106
int
minIsotopePeaks
;
107
int
maxNumberPeaks
;
108
int
minNumberPeaks
;
109
double
mzTol
;
110
double
massNeutron
;
111
double
upperLimitPadding
;
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_
pwiz::analysis::SpectrumList_ChargeFromIsotope::nChainsCheck_
int nChainsCheck_
Definition:
SpectrumList_ChargeFromIsotope.hpp:97
pwiz::analysis::SpectrumList_ChargeFromIsotope::sigVal_
double sigVal_
Definition:
SpectrumList_ChargeFromIsotope.hpp:96
pwiz::msdata::SpectrumListPtr
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition:
MSData.hpp:711
pairData::mz
double mz
Definition:
SpectrumList_ChargeFromIsotope.hpp:57
rtimeMap
Definition:
SpectrumList_ChargeFromIsotope.hpp:51
pairData::intensity
double intensity
Definition:
SpectrumList_ChargeFromIsotope.hpp:58
pwiz
Definition:
ChromatogramList_Filter.hpp:36
pwiz::analysis::SpectrumList_ChargeFromIsotope::parentsAfter_
int parentsAfter_
Definition:
SpectrumList_ChargeFromIsotope.hpp:99
pwiz::analysis::SpectrumList_ChargeFromIsotope::simulatedSSEs
std::vector< double > simulatedSSEs
Definition:
SpectrumList_ChargeFromIsotope.hpp:113
pwiz::msdata::SpectrumListWrapper
Inheritable pass-through implementation for wrapping a SpectrumList.
Definition:
SpectrumListWrapper.hpp:37
pwiz::analysis::SpectrumList_ChargeFromIsotope::maxCharge_
int maxCharge_
Definition:
SpectrumList_ChargeFromIsotope.hpp:94
scoreChain::intensityPvalue
double intensityPvalue
Definition:
SpectrumList_ChargeFromIsotope.hpp:39
pwiz::analysis::SpectrumList_ChargeFromIsotope::upperLimitPadding
double upperLimitPadding
Definition:
SpectrumList_ChargeFromIsotope.hpp:111
pwiz::analysis::SpectrumList_ChargeFromIsotope::defaultIsolationWidth_
double defaultIsolationWidth_
Definition:
SpectrumList_ChargeFromIsotope.hpp:102
pwiz::analysis::SpectrumList_ChargeFromIsotope::simulatedKLs
std::vector< double > simulatedKLs
Definition:
SpectrumList_ChargeFromIsotope.hpp:114
pwiz::analysis::SpectrumList_ChargeFromIsotope::minIsotopePeaks
int minIsotopePeaks
Definition:
SpectrumList_ChargeFromIsotope.hpp:106
scoreChain::sumRanks
int sumRanks
Definition:
SpectrumList_ChargeFromIsotope.hpp:46
scoreChain::intensitySumPvalue
double intensitySumPvalue
Definition:
SpectrumList_ChargeFromIsotope.hpp:40
scoreChain::overallPvalue
double overallPvalue
Definition:
SpectrumList_ChargeFromIsotope.hpp:41
PWIZ_API_DECL
#define PWIZ_API_DECL
Definition:
Export.hpp:32
pairData
Definition:
SpectrumList_ChargeFromIsotope.hpp:56
scoreChain::mzRank
int mzRank
Definition:
SpectrumList_ChargeFromIsotope.hpp:43
pwiz::analysis::SpectrumList_ChargeFromIsotope::minCharge_
int minCharge_
Definition:
SpectrumList_ChargeFromIsotope.hpp:95
Export.hpp
pwiz::analysis::SpectrumList_ChargeFromIsotope::nSamples
int nSamples
Definition:
SpectrumList_ChargeFromIsotope.hpp:104
pwiz::analysis::SpectrumList_ChargeFromIsotope::defaultChargeMin_
int defaultChargeMin_
Definition:
SpectrumList_ChargeFromIsotope.hpp:101
isotopeChain::charge
int charge
Definition:
SpectrumList_ChargeFromIsotope.hpp:31
pwiz::analysis::SpectrumList_ChargeFromIsotope::maxNumberPeaks
int maxNumberPeaks
Definition:
SpectrumList_ChargeFromIsotope.hpp:107
pwiz::analysis::SpectrumList_ChargeFromIsotope::simulatedIntensityRankSum
std::vector< int > simulatedIntensityRankSum
Definition:
SpectrumList_ChargeFromIsotope.hpp:115
pwiz::msdata::SpectrumPtr
boost::shared_ptr< Spectrum > SpectrumPtr
Definition:
MSData.hpp:573
pwiz::analysis::SpectrumList_ChargeFromIsotope::mzTol
double mzTol
Definition:
SpectrumList_ChargeFromIsotope.hpp:109
rtimeMap::indexMap
int indexMap
Definition:
SpectrumList_ChargeFromIsotope.hpp:53
scoreChain::intensityRank
int intensityRank
Definition:
SpectrumList_ChargeFromIsotope.hpp:44
pwiz::analysis::SpectrumList_ChargeFromIsotope::maxIsotopePeaks
int maxIsotopePeaks
Definition:
SpectrumList_ChargeFromIsotope.hpp:105
isotopeChain::parentIndex
int parentIndex
Definition:
SpectrumList_ChargeFromIsotope.hpp:33
pwiz::analysis::SpectrumList_ChargeFromIsotope
SpectrumList implementation that assigns (probable) charge states to tandem mass spectra.
Definition:
SpectrumList_ChargeFromIsotope.hpp:68
pwiz::analysis::SpectrumList_ChargeFromIsotope::massNeutron
double massNeutron
Definition:
SpectrumList_ChargeFromIsotope.hpp:110
isotopeChain::indexList
std::vector< int > indexList
Definition:
SpectrumList_ChargeFromIsotope.hpp:32
pwiz::analysis::SpectrumList_ChargeFromIsotope::parentsBefore_
int parentsBefore_
Definition:
SpectrumList_ChargeFromIsotope.hpp:98
scoreChain::intensitySumRank
int intensitySumRank
Definition:
SpectrumList_ChargeFromIsotope.hpp:45
pwiz::analysis::SpectrumList_ChargeFromIsotope::defaultChargeMax_
int defaultChargeMax_
Definition:
SpectrumList_ChargeFromIsotope.hpp:100
pwiz::msdata::MSData
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition:
MSData.hpp:849
getKLscore
double getKLscore(const isotopeChain, const std::vector< double > &, const std::vector< double > &)
IntegerSet.hpp
rtimeMap::rtime
double rtime
Definition:
SpectrumList_ChargeFromIsotope.hpp:52
isotopeChain
Definition:
SpectrumList_ChargeFromIsotope.hpp:30
scoreChain::chainIndex
int chainIndex
Definition:
SpectrumList_ChargeFromIsotope.hpp:48
scoreChain::mzPvalue
double mzPvalue
Definition:
SpectrumList_ChargeFromIsotope.hpp:38
pwiz::analysis::SpectrumList_ChargeFromIsotope::minNumberPeaks
int minNumberPeaks
Definition:
SpectrumList_ChargeFromIsotope.hpp:108
scoreChain
Definition:
SpectrumList_ChargeFromIsotope.hpp:36
pwiz::analysis::SpectrumList_ChargeFromIsotope::MS1retentionTimes
std::vector< rtimeMap > MS1retentionTimes
Definition:
SpectrumList_ChargeFromIsotope.hpp:116
nChoosek
int nChoosek(int, int)
pwiz::analysis::SpectrumList_ChargeFromIsotope::override_
bool override_
Definition:
SpectrumList_ChargeFromIsotope.hpp:93
SpectrumListWrapper.hpp
Generated by
1.8.17