ProteoWizard
SpectrumList_Demux.hpp
Go to the documentation of this file.
1//
2// $Id$
3//
4//
5// Original author: Jarrett Egertson <jegertso .@. uw.edu>
6//
7// Licensed under the Apache License, Version 2.0 (the "License");
8// you may not use this file except in compliance with the License.
9// You may obtain a copy of the License at
10//
11// http://www.apache.org/licenses/LICENSE-2.0
12//
13// Unless required by applicable law or agreed to in writing, software
14// distributed under the License is distributed on an "AS IS" BASIS,
15// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16// See the License for the specific language governing permissions and
17// limitations under the License.
18//
19
20#ifndef _SPECTRUMLIST_DEMUX_HPP
21#define _SPECTRUMLIST_DEMUX_HPP
22
24#include <boost/smart_ptr/scoped_ptr.hpp>
26
27namespace pwiz {
28namespace analysis {
29
30 /// SpectrumList decorator implementation that can demultiplex spectra of several precursor windows acquired in the same scan.
31 /**
32 * SpectrumList_Demux can separate multiplexed spectra into several demultiplexed spectra by inferring from adjacent multiplexed spectra. This method
33 * can handle variable fill times, requiring that the user specify whether the fill times have varied.
34 */
36 {
37 public:
38
39 /// User-defined options for demultiplexing
40 struct Params
41 {
42 /// Optimization methods available
43 enum class Optimization
44 {
45 NONE,
46 OVERLAP_ONLY
47 };
48
49 /// Converts an optimization enum to a string
50 static const std::string& optimizationToString(Optimization opt);
51
52 /// Converts a string to an optimization enum (returns NONE enum if no enum matches the string)
53 static Optimization stringToOptimization(const std::string& s);
54
56 massError(10, pwiz::chemistry::MZTolerance::PPM),
57 demuxBlockExtra(0.0),
58 nnlsMaxIter(50),
59 nnlsEps(1e-10),
60 applyWeighting(true),
61 regularizeSums(true),
62 variableFill(false),
63 optimization(Optimization::NONE)
64
65 {}
66
67 /// Error scalar for extracting MS/MS peaks.
69
70 /// Multiplier to expand or reduce the # of spectra considered when demux'ing.
71 /// If 0, a fully determined system of equation is built. If > 1.0, the number
72 /// of rows included in the system is extended demuxBlockExtra * (# scans in 1 duty cycle)
73
75
76 /// Maximum iterations for NNLS solve
78
79 /// Epsilon value for convergence criterion of NNLS solver
80 double nnlsEps;
81
82 /// Weight the spectra nearby to the input spectrum more heavily in the solve
83 /// than the outer ones
85
86 /// After demux solve, scale the sum of the intensities contributed form each
87 /// of the input windows to match the non-demux'd intensity
89
90 /// Set to true if fill times are allowed to vary for each scan window
92
93 /// Optimizations can be chosen when experimental design is known
95 };
96
97 /// Generates an abstract SpectrumList_Demux decorator from inner SpectrumList
98 /// @param inner The inner SpectrumList
99 /// @param p User-defined options
101
103
104 /// \name SpectrumList Interface
105 ///@{
106
107 msdata::SpectrumPtr spectrum(size_t index, bool getBinaryData = false) const;
108 msdata::SpectrumPtr spectrum(size_t index, msdata::DetailLevel detailLevel) const;
109 size_t size() const;
110 const msdata::SpectrumIdentity& spectrumIdentity(size_t index) const;
111 ///@}
112
113 private:
114 class Impl;
115 boost::scoped_ptr<Impl> impl_;
116 };
117
119
120} // namespace analysis
121} // namespace pwiz
122
123#endif // _SPECTRUMLIST_DEMUX_HPP
#define PWIZ_API_DECL
Definition Export.hpp:32
SpectrumList decorator implementation that can demultiplex spectra of several precursor windows acqui...
msdata::SpectrumPtr spectrum(size_t index, bool getBinaryData=false) const
retrieve a spectrum by index
size_t size() const
returns the number of spectra
SpectrumList_Demux(const msdata::SpectrumListPtr &inner, const Params &p=Params())
Generates an abstract SpectrumList_Demux decorator from inner SpectrumList.
const msdata::SpectrumIdentity & spectrumIdentity(size_t index) const
access to a spectrum index
msdata::SpectrumPtr spectrum(size_t index, msdata::DetailLevel detailLevel) const
retrieve a spectrum by index
Inheritable pass-through implementation for wrapping a SpectrumList.
SpectrumList_Demux::Params::Optimization DemuxOptimization
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition MSData.hpp:711
boost::shared_ptr< Spectrum > SpectrumPtr
Definition MSData.hpp:573
User-defined options for demultiplexing.
static Optimization stringToOptimization(const std::string &s)
Converts a string to an optimization enum (returns NONE enum if no enum matches the string)
int nnlsMaxIter
Maximum iterations for NNLS solve.
Optimization
Optimization methods available.
double nnlsEps
Epsilon value for convergence criterion of NNLS solver.
bool variableFill
Set to true if fill times are allowed to vary for each scan window.
static const std::string & optimizationToString(Optimization opt)
Converts an optimization enum to a string.
bool applyWeighting
Weight the spectra nearby to the input spectrum more heavily in the solve than the outer ones.
Optimization optimization
Optimizations can be chosen when experimental design is known.
bool regularizeSums
After demux solve, scale the sum of the intensities contributed form each of the input windows to mat...
pwiz::chemistry::MZTolerance massError
Error scalar for extracting MS/MS peaks.
double demuxBlockExtra
Multiplier to expand or reduce the # of spectra considered when demux'ing.
struct for expressing m/z tolerance in either amu or ppm
Identifying information for a spectrum.
Definition MSData.hpp:471