20#ifndef _PRECURSORMASKCODEC_HPP
21#define _PRECURSORMASKCODEC_HPP
Interface for generating and accessing precursor masks for a demultiplexing scheme.
A method of hashing an isolation window to a unique long value mz is and m/z of a unique point in the...
Implementation of the IPrecursorMaskCodec interface that is able to handle both overlapping MSX exper...
int GetSpectraPerCycle() const override
Returns the number of spectra required to cover all precursor isolation windows.
PrecursorMaskCodec(msdata::SpectrumList_const_ptr slPtr, bool variableFill=false)
Construct a PrecursorMaskCodec for interpreting overlapping and MSX experiments for demultiplexing.
std::vector< IsolationWindow > isolationWindows_
This is effectively the index to isolation window map for translating isolation windows to.
size_t spectraPerCycle_
Number of spectra required to cover all precursor windows.
int GetOverlapsPerCycle() const override
Returns the number of overlap repeats per cycle. So for no overlap, this returns 1....
void GetMask(T &&arrayType, msdata::Spectrum_const_ptr sPtr, double weight) const
Template for retrieving masks from array-like objects with [] accessors.
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 s...
msdata::ProcessingMethod processingMethod_
Cached processing method to return from GetProcessingMethod()
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 des...
size_t GetDemuxBlockSize() const override
Returns the number of windows required to demultiplex.
msdata::ProcessingMethod GetProcessingMethod() const override
Returns a descriptor of the processing done by this PrecursorMaskCodec.
size_t precursorsPerSpectrum_
Number of precursors (or isolation windows) per multiplexed spectrum.
void ReadDemuxScheme(msdata::SpectrumList_const_ptr spectrumList)
Interpret the experimental design of the multiplexed experiment and cache values for building the des...
virtual ~PrecursorMaskCodec()
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 s...
IsolationWindow GetIsolationWindow(size_t i) const override
Returns the precursor window for a given index.
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 colum...
bool variableFill_
Whether this data acquired with variable fill times or not. This is set by the user.
size_t overlapsPerSpectrum_
Number of overlap windows per multiplexed spectrum.
void IdentifyOverlap(std::vector< IsolationWindow > &demuxWindows)
Identifies any overlap in a DemuxWindow set and splits any overlapping regions such that a non-overla...
int GetPrecursorsPerSpectrum() const override
Returns the number of precursor isolations per spectrum. This is verified to be constant for all spec...
size_t GetNumDemuxWindows() const override
Returns the total number of demux'd precursor windows. This is the number of possible indices returne...
Matrix< DemuxScalar, Dynamic, Dynamic > MatrixType
boost::shared_ptr< const msdata::Spectrum > Spectrum_const_ptr
boost::shared_ptr< const msdata::SpectrumList > SpectrumList_const_ptr
A container that wraps DemuxWindow to preserve the full precision window boundaries.
Simple container that is useful for breaking up DemuxWindows into their edges and resolving overlap.
MZHash mzHash
Hashed m/z value for fast and simple comparison operations.
DemuxBoundary(double mz)
Constructs a DemuxBoundary from an m/z floating point value.
bool operator==(const DemuxBoundary &rhs) const
DemuxBoundaries are equated only by their hashes.
double mz
Full precision m/z value.
bool operator<(const DemuxBoundary &rhs) const
DemuxBoundaries are sorted to the precision of their hash.
Description of the default peak processing method. This element describes the base method used in the...