Implementation of the IPrecursorMaskCodec interface that is able to handle both overlapping MSX experiments.
More...
#include <PrecursorMaskCodec.hpp>
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.
◆ PrecursorMaskCodec()
Construct a PrecursorMaskCodec for interpreting overlapping and MSX experiments for demultiplexing.
- Parameters
-
[in] | slPtr | SpectrumList to demux |
[in] | variableFill | Set to true if fill times are allowed to vary for each scan window |
◆ ~PrecursorMaskCodec()
virtual pwiz::analysis::PrecursorMaskCodec::~PrecursorMaskCodec |
( |
| ) |
|
|
inlinevirtual |
◆ GetMask() [1/3]
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.
- Parameters
-
[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. |
- Returns
- Design matrix row describing which precursor isolation windows are present in the given spectrum.
Implements pwiz::analysis::IPrecursorMaskCodec.
◆ GetMask() [2/3]
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.
- Parameters
-
[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. |
- Precondition
- Out array must be same size as GetDemuxBlockSize()
Implements pwiz::analysis::IPrecursorMaskCodec.
◆ SpectrumToIndices()
void pwiz::analysis::PrecursorMaskCodec::SpectrumToIndices |
( |
msdata::Spectrum_const_ptr |
sPtr, |
|
|
std::vector< size_t > & |
indices |
|
) |
| const |
|
overridevirtual |
Identifies the precursor windows within a spectrum and returns the indices to the design matrix columns corresponding to those windows.
- Parameters
-
[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.
◆ GetIsolationWindow()
IsolationWindow pwiz::analysis::PrecursorMaskCodec::GetIsolationWindow |
( |
size_t |
i | ) |
const |
|
overridevirtual |
Returns the precursor window for a given index.
- Parameters
-
[in] | i | Index of the column of the design matrix corresponding to the precursor window. |
- Returns
- A DemuxWindow describing the m/z range of the precursor window.
Implements pwiz::analysis::IPrecursorMaskCodec.
◆ GetNumDemuxWindows()
size_t pwiz::analysis::PrecursorMaskCodec::GetNumDemuxWindows |
( |
| ) |
const |
|
overridevirtual |
◆ GetSpectraPerCycle()
int pwiz::analysis::PrecursorMaskCodec::GetSpectraPerCycle |
( |
| ) |
const |
|
overridevirtual |
◆ GetPrecursorsPerSpectrum()
int pwiz::analysis::PrecursorMaskCodec::GetPrecursorsPerSpectrum |
( |
| ) |
const |
|
overridevirtual |
◆ GetOverlapsPerCycle()
int pwiz::analysis::PrecursorMaskCodec::GetOverlapsPerCycle |
( |
| ) |
const |
|
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.
◆ GetDemuxBlockSize()
size_t pwiz::analysis::PrecursorMaskCodec::GetDemuxBlockSize |
( |
| ) |
const |
|
overridevirtual |
◆ GetProcessingMethod()
◆ ReadDemuxScheme()
Interpret the experimental design of the multiplexed experiment and cache values for building the design matrix when later given spectra.
◆ IdentifyCycle()
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.
- Parameters
-
[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. |
- Postcondition
- demuxWindows is sorted and contains no duplicate elements
◆ IdentifyOverlap()
void pwiz::analysis::PrecursorMaskCodec::IdentifyOverlap |
( |
std::vector< IsolationWindow > & |
demuxWindows | ) |
|
|
protected |
Identifies any overlap in a DemuxWindow set and splits any overlapping regions such that a non-overlapping DemuxWindow set is produced.
- Parameters
-
[in] | demuxWindows | Set of possibly overlapping DemuxWindows. |
[out] | demuxWindows | Set of non-overlapping DemuxWindows produced from the input demuxWindows. |
- Precondition
- demuxWindows is sorted and has no duplicate elements.
- Postcondition
- demuxWindows is output as a vector of size equal to or greater than the input vector.
◆ GetMask() [3/3]
Template for retrieving masks from array-like objects with [] accessors.
Rvalue references are used for compatibility with Eigen types. See IPrecursorMaskCodec::GetMask
- Parameters
-
[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. |
◆ isolationWindows_
std::vector<IsolationWindow> pwiz::analysis::PrecursorMaskCodec::isolationWindows_ |
|
private |
This is effectively the index to isolation window map for translating isolation windows to.
Definition at line 106 of file PrecursorMaskCodec.hpp.
◆ spectraPerCycle_
size_t pwiz::analysis::PrecursorMaskCodec::spectraPerCycle_ |
|
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.
◆ precursorsPerSpectrum_
size_t pwiz::analysis::PrecursorMaskCodec::precursorsPerSpectrum_ |
|
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.
◆ overlapsPerSpectrum_
size_t pwiz::analysis::PrecursorMaskCodec::overlapsPerSpectrum_ |
|
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.
◆ variableFill_
bool pwiz::analysis::PrecursorMaskCodec::variableFill_ |
|
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.
◆ processingMethod_
The documentation for this class was generated from the following file: