ProteoWizard
Classes | Public Member Functions | Private Attributes | List of all members
pwiz::analysis::MSXDemultiplexer Class Reference

Implementation of the IDemultiplexer interface that is able to handle both MSX experiments, including ones with overlap. More...

#include <MSXDemultiplexer.hpp>

Inheritance diagram for pwiz::analysis::MSXDemultiplexer:
pwiz::analysis::IDemultiplexer

Classes

struct  Params
 User-defined options for demultiplexing. More...
 

Public Member Functions

 MSXDemultiplexer (Params p=Params())
 Constructs an MSXDemultiplexer with optional user-specified parameters. More...
 
virtual ~MSXDemultiplexer ()
 
IDemultiplexer interface
void Initialize (msdata::SpectrumList_const_ptr slc, IPrecursorMaskCodec::const_ptr pmc) override
 Initializes the demultiplexer using the demux scheme provided by an IPrecursorMaskCodec. More...
 
void BuildDeconvBlock (size_t index, const std::vector< size_t > &muxIndices, DemuxTypes::MatrixPtr &masks, DemuxTypes::MatrixPtr &signal) override
 Translates a spectrum into a set of matrices to be solved by NNLS. More...
 
void GetMatrixBlockIndices (size_t indexToDemux, std::vector< size_t > &muxIndices, double demuxBlockExtra) const override
 Figures out which spectra to include in the system of equations to demux. More...
 
const std::vector< size_t > & SpectrumIndices () const override
 Returns the indices to the demultiplexed windows in the solution matrix corresponding to the windows extracted from the spectrum whose index was provided to BuildDeconvBlock() More...
 
- Public Member Functions inherited from pwiz::analysis::IDemultiplexer
virtual ~IDemultiplexer ()
 

Private Attributes

msdata::SpectrumList_const_ptr sl_
 A SpectrumList that provides access to the spectra specified in the muxIndices list provided to BuildDeconvBlock() More...
 
IPrecursorMaskCodec::const_ptr pmc_
 An IPrecursorMaskCodec that provides information about the experiment's scheme and can generate the masks for given mux spectra. More...
 
Params params_
 A set of user-defined options. More...
 
std::vector< size_t > spectrumIndices_
 A cache of the indices provided by SpectrumIndices() More...
 

Additional Inherited Members

- Public Types inherited from pwiz::analysis::IDemultiplexer
typedef boost::shared_ptr< IDemultiplexerptr
 Shared pointer definition. More...
 
typedef boost::shared_ptr< const IDemultiplexerconst_ptr
 Constant shared pointer definition. More...
 

Detailed Description

Implementation of the IDemultiplexer interface that is able to handle both MSX experiments, including ones with overlap.

For analyzing overlap data without MSX it is recommended to use the OverlapDemultiplexer instead for better chromatographic interpolation.

Definition at line 31 of file MSXDemultiplexer.hpp.

Constructor & Destructor Documentation

◆ MSXDemultiplexer()

pwiz::analysis::MSXDemultiplexer::MSXDemultiplexer ( Params  p = Params())
explicit

Constructs an MSXDemultiplexer with optional user-specified parameters.

Parameters
pOptions to use in demultiplexing (see Params for available options)

◆ ~MSXDemultiplexer()

virtual pwiz::analysis::MSXDemultiplexer::~MSXDemultiplexer ( )
virtual

Member Function Documentation

◆ Initialize()

void pwiz::analysis::MSXDemultiplexer::Initialize ( msdata::SpectrumList_const_ptr  slc,
IPrecursorMaskCodec::const_ptr  pmc 
)
overridevirtual

Initializes the demultiplexer using the demux scheme provided by an IPrecursorMaskCodec.

Implements pwiz::analysis::IDemultiplexer.

◆ BuildDeconvBlock()

void pwiz::analysis::MSXDemultiplexer::BuildDeconvBlock ( size_t  index,
const std::vector< size_t > &  muxIndices,
DemuxTypes::MatrixPtr masks,
DemuxTypes::MatrixPtr signal 
)
overridevirtual

Translates a spectrum into a set of matrices to be solved by NNLS.

Parameters
[in]indexIndex of the requested spectrum to be demultiplexed
[in]muxIndicesThe indices to mulitplexed spectra to use for demultiplexing. These spectra should be near in time to the spectrum to demultiplex and there should be enough to provide a unique solution.
[out]masksThe design matrix with rows corresponding to individual spectra and columns corresponding to MS1 isolation windows
[out]signalA transition (MS1 isolation -> MS2 point/centroid) to be deconvolved formatted as a column vector (or a set of transitions formatted as a matrix)

Implements pwiz::analysis::IDemultiplexer.

◆ GetMatrixBlockIndices()

void pwiz::analysis::MSXDemultiplexer::GetMatrixBlockIndices ( size_t  indexToDemux,
std::vector< size_t > &  muxIndices,
double  demuxBlockExtra 
) const
overridevirtual

Figures out which spectra to include in the system of equations to demux.

This skips over MS1 spectra and returns the indices of a range of MS2 spectra that can be used to demultiplex the chosen spectrum. This handles the case where the chosen spectrum is at the beginning or end of a file and chooses a sufficient number of nearby MS2 spectra accordingly. More indices will be included if the user has chosen to add additional demux blocks.

Postcondition
The returned indices are sorted
Parameters
[in]indexToDemuxIndex of the requested spectrum
[out]muxIndicesIndices of the multiplexed MS2 spectra to be used for demultiplexing
[in]demuxBlockExtraAmount to pad the block size by

Implements pwiz::analysis::IDemultiplexer.

◆ SpectrumIndices()

const std::vector<size_t>& pwiz::analysis::MSXDemultiplexer::SpectrumIndices ( ) const
overridevirtual

Returns the indices to the demultiplexed windows in the solution matrix corresponding to the windows extracted from the spectrum whose index was provided to BuildDeconvBlock()

Returns
Returns the demux indices for the solved spectrum

Implements pwiz::analysis::IDemultiplexer.

Member Data Documentation

◆ sl_

msdata::SpectrumList_const_ptr pwiz::analysis::MSXDemultiplexer::sl_
private

A SpectrumList that provides access to the spectra specified in the muxIndices list provided to BuildDeconvBlock()

Definition at line 76 of file MSXDemultiplexer.hpp.

◆ pmc_

IPrecursorMaskCodec::const_ptr pwiz::analysis::MSXDemultiplexer::pmc_
private

An IPrecursorMaskCodec that provides information about the experiment's scheme and can generate the masks for given mux spectra.

Definition at line 79 of file MSXDemultiplexer.hpp.

◆ params_

Params pwiz::analysis::MSXDemultiplexer::params_
private

A set of user-defined options.

Definition at line 82 of file MSXDemultiplexer.hpp.

◆ spectrumIndices_

std::vector<size_t> pwiz::analysis::MSXDemultiplexer::spectrumIndices_
private

A cache of the indices provided by SpectrumIndices()

Definition at line 85 of file MSXDemultiplexer.hpp.


The documentation for this class was generated from the following file: