ProteoWizard
|
Implementation of the IPrecursorMaskCodec interface that is able to handle both overlapping MSX experiments. More...
#include <PrecursorMaskCodec.hpp>
Classes | |
struct | DemuxBoundary |
Simple container that is useful for breaking up DemuxWindows into their edges and resolving overlap. More... | |
Public Member Functions | |
PrecursorMaskCodec (msdata::SpectrumList_const_ptr slPtr, bool variableFill=false) | |
Construct a PrecursorMaskCodec for interpreting overlapping and MSX experiments for demultiplexing. More... | |
virtual | ~PrecursorMaskCodec () |
IPrecursorMaskCodec interface | |
Eigen::VectorXd | GetMask (msdata::Spectrum_const_ptr sPtr, double weight) const override |
Generates a design matrix row describing which precursor isolation windows are present in the given spectrum. More... | |
void | GetMask (msdata::Spectrum_const_ptr sPtr, DemuxTypes::MatrixType &m, size_t rowNum, double weight) const override |
Generates a design matrix row describing which precursor isolation windows are present in the given spectrum and places it into the specified row of the user-provided matrix. More... | |
void | SpectrumToIndices (msdata::Spectrum_const_ptr spectrumPtr, std::vector< size_t > &indices) const override |
Identifies the precursor windows within a spectrum and returns the indices to the design matrix columns corresponding to those windows. More... | |
IsolationWindow | GetIsolationWindow (size_t i) const override |
Returns the precursor window for a given index. More... | |
size_t | GetNumDemuxWindows () const override |
Returns the total number of demux'd precursor windows. This is the number of possible indices returned by SpectrumToIndices(). More... | |
int | GetSpectraPerCycle () const override |
Returns the number of spectra required to cover all precursor isolation windows. More... | |
int | GetPrecursorsPerSpectrum () const override |
Returns the number of precursor isolations per spectrum. This is verified to be constant for all spectra. More... | |
int | GetOverlapsPerCycle () const override |
Returns the number of overlap repeats per cycle. So for no overlap, this returns 1. For an overlap that splits each precursor in two, this returns 2. Etc. More... | |
size_t | GetDemuxBlockSize () const override |
Returns the number of windows required to demultiplex. More... | |
msdata::ProcessingMethod | GetProcessingMethod () const override |
Returns a descriptor of the processing done by this PrecursorMaskCodec. More... | |
![]() | |
virtual | ~IPrecursorMaskCodec () |
Protected Member Functions | |
void | ReadDemuxScheme (msdata::SpectrumList_const_ptr spectrumList) |
Interpret the experimental design of the multiplexed experiment and cache values for building the design matrix when later given spectra. More... | |
void | IdentifyCycle (msdata::SpectrumList_const_ptr spectrumList, std::vector< IsolationWindow > &demuxWindows) |
Identifies the repeating scan pattern in the experiment and extracts features of the experimental design in order to interpret the intended demux scheme. More... | |
void | IdentifyOverlap (std::vector< IsolationWindow > &demuxWindows) |
Identifies any overlap in a DemuxWindow set and splits any overlapping regions such that a non-overlapping DemuxWindow set is produced. More... | |
Private Member Functions | |
template<class T > | |
void | GetMask (T &&arrayType, msdata::Spectrum_const_ptr sPtr, double weight) const |
Template for retrieving masks from array-like objects with [] accessors. More... | |
Private Attributes | |
std::vector< IsolationWindow > | isolationWindows_ |
This is effectively the index to isolation window map for translating isolation windows to. More... | |
size_t | spectraPerCycle_ |
Number of spectra required to cover all precursor windows. More... | |
size_t | precursorsPerSpectrum_ |
Number of precursors (or isolation windows) per multiplexed spectrum. More... | |
size_t | overlapsPerSpectrum_ |
Number of overlap windows per multiplexed spectrum. More... | |
bool | variableFill_ |
Whether this data acquired with variable fill times or not. This is set by the user. More... | |
msdata::ProcessingMethod | processingMethod_ |
Cached processing method to return from GetProcessingMethod() More... | |
Additional Inherited Members | |
![]() | |
typedef boost::shared_ptr< IPrecursorMaskCodec > | ptr |
Shared pointer definition. More... | |
typedef boost::shared_ptr< const IPrecursorMaskCodec > | const_ptr |
Constant shared pointer definition. More... | |
Implementation of the IPrecursorMaskCodec interface that is able to handle both overlapping MSX experiments.
Some features that are only applicable when overlapping is used without MSX or MSX used without overlapping are not implemented in this class. Such features and optimizations are currently left to other more targeted implementations of IPrecursorMaskCodec. One missing feature is interpolation of overlap-only data to optimize weighting of nearby spectra before demultiplexing.
Definition at line 32 of file PrecursorMaskCodec.hpp.
|
explicit |
Construct a PrecursorMaskCodec for interpreting overlapping and MSX experiments for demultiplexing.
[in] | slPtr | SpectrumList to demux |
[in] | variableFill | Set to true if fill times are allowed to vary for each scan window |
|
inlinevirtual |
Definition at line 40 of file PrecursorMaskCodec.hpp.
References GetDemuxBlockSize(), GetIsolationWindow(), GetMask(), GetNumDemuxWindows(), GetOverlapsPerCycle(), GetPrecursorsPerSpectrum(), GetProcessingMethod(), GetSpectraPerCycle(), and SpectrumToIndices().
|
overridevirtual |
Generates a design matrix row describing which precursor isolation windows are present in the given spectrum.
This row can be weighted by a given scalar.
[in] | sPtr | Multiplexed spectrum from which to extract precursor windows. |
[in] | weight | Scalar value by which to weight the resulting design matrix vector. This weighting is a simple scalar multiplication of the vector. |
Implements pwiz::analysis::IPrecursorMaskCodec.
Referenced by pwiz::analysis::PrecursorMaskCodec::DemuxBoundary::operator==(), and ~PrecursorMaskCodec().
|
overridevirtual |
Generates a design matrix row describing which precursor isolation windows are present in the given spectrum and places it into the specified row of the user-provided matrix.
[in] | sPtr | Multiplexed spectrum from which to extract precursor windows. |
[out] | m | Matrix in which to place the design vector. |
[in] | rowNum | Row of the matrix in which to place the design vector corresponding to the given spectrum. |
[in] | weight | Scalar value by which to weight the resulting design matrix vector. This weighting is a simple scalar multiplication of the vector. |
Implements pwiz::analysis::IPrecursorMaskCodec.
|
overridevirtual |
Identifies the precursor windows within a spectrum and returns the indices to the design matrix columns corresponding to those windows.
[in] | sPtr | Multiplexed spectrum from which to extract precursor windows. |
[out] | indices | Indices of the design matrix columns that correspond to the precursor windows in the given spectrum. |
Implements pwiz::analysis::IPrecursorMaskCodec.
Referenced by ~PrecursorMaskCodec().
|
overridevirtual |
Returns the precursor window for a given index.
[in] | i | Index of the column of the design matrix corresponding to the precursor window. |
Implements pwiz::analysis::IPrecursorMaskCodec.
Referenced by ~PrecursorMaskCodec().
|
overridevirtual |
Returns the total number of demux'd precursor windows. This is the number of possible indices returned by SpectrumToIndices().
Implements pwiz::analysis::IPrecursorMaskCodec.
Referenced by ~PrecursorMaskCodec().
|
overridevirtual |
Returns the number of spectra required to cover all precursor isolation windows.
Implements pwiz::analysis::IPrecursorMaskCodec.
Referenced by ~PrecursorMaskCodec().
|
overridevirtual |
Returns the number of precursor isolations per spectrum. This is verified to be constant for all spectra.
Implements pwiz::analysis::IPrecursorMaskCodec.
Referenced by ~PrecursorMaskCodec().
|
overridevirtual |
Returns the number of overlap repeats per cycle. So for no overlap, this returns 1. For an overlap that splits each precursor in two, this returns 2. Etc.
Implements pwiz::analysis::IPrecursorMaskCodec.
Referenced by ~PrecursorMaskCodec().
|
overridevirtual |
Returns the number of windows required to demultiplex.
Implements pwiz::analysis::IPrecursorMaskCodec.
Referenced by ~PrecursorMaskCodec().
|
overridevirtual |
Returns a descriptor of the processing done by this PrecursorMaskCodec.
WARNING: It is important that this gives a string containing "Demultiplexing" in order for SpectrumWorkerThreads.cpp to handle demultiplexing properly.
Implements pwiz::analysis::IPrecursorMaskCodec.
Referenced by ~PrecursorMaskCodec().
|
protected |
Interpret the experimental design of the multiplexed experiment and cache values for building the design matrix when later given spectra.
Referenced by pwiz::analysis::PrecursorMaskCodec::DemuxBoundary::operator==().
|
protected |
Identifies the repeating scan pattern in the experiment and extracts features of the experimental design in order to interpret the intended demux scheme.
Note that an alternative to this would be to have the experimental design specified by the user or written in some form in metadata.
[in] | spectrumList | The SpectrumListPtr containing the multiplexed experiment |
[out] | demuxWindows | The largest set of windows that the experiment can be demultiplexed into when not accounting for overlap. |
Referenced by pwiz::analysis::PrecursorMaskCodec::DemuxBoundary::operator==().
|
protected |
Identifies any overlap in a DemuxWindow set and splits any overlapping regions such that a non-overlapping DemuxWindow set is produced.
[in] | demuxWindows | Set of possibly overlapping DemuxWindows. |
[out] | demuxWindows | Set of non-overlapping DemuxWindows produced from the input demuxWindows. |
Referenced by pwiz::analysis::PrecursorMaskCodec::DemuxBoundary::operator==().
|
private |
Template for retrieving masks from array-like objects with [] accessors.
Rvalue references are used for compatibility with Eigen types. See IPrecursorMaskCodec::GetMask
[out] | arrayType | Array-like object with [] accessor |
[in] | sPtr | Multiplexed spectrum from which to extract precursor windows. |
[in] | weight | Scalar value by which to weight the resulting design matrix vector. This weighting is a simple scalar multiplication of the vector. |
|
private |
This is effectively the index to isolation window map for translating isolation windows to.
Definition at line 106 of file PrecursorMaskCodec.hpp.
|
private |
Number of spectra required to cover all precursor windows.
This is the number of spectra required to make a fully determined system of equations.
Definition at line 110 of file PrecursorMaskCodec.hpp.
|
private |
Number of precursors (or isolation windows) per multiplexed spectrum.
This is calculated in ReadDemuxScheme() and is assumed to be constant for all spectra. An error is thrown if this is ever observed to change.
Definition at line 114 of file PrecursorMaskCodec.hpp.
|
private |
Number of overlap windows per multiplexed spectrum.
E.g. having one additional round of acquisition with an overlap offset would result in two overlap regions per spectrum. Alternatively, in the case of no overlap the number of "overlap windows" is one. This is calculated in ReadDemuxScheme() and assumed to be constant for all spectra. An error is thrown if this is ever observed to change.
Definition at line 119 of file PrecursorMaskCodec.hpp.
|
private |
Whether this data acquired with variable fill times or not. This is set by the user.
Definition at line 122 of file PrecursorMaskCodec.hpp.
|
private |
Cached processing method to return from GetProcessingMethod()
Definition at line 125 of file PrecursorMaskCodec.hpp.