ProteoWizard
Public Member Functions | Public Attributes | List of all members
pwiz::analysis::DemuxWindow Struct Reference

A container for describing the isolation windows that are dedicated to columns of the design matrix for demultiplexing. More...

#include <IPrecursorMaskCodec.hpp>

Public Member Functions

 DemuxWindow (const msdata::Precursor &p)
 Constructs a DemuxWindow from a Precursor by using its isolation window.
 
 DemuxWindow (MZHash mzLow, MZHash mzHigh)
 Constructs a DemuxWindow for a given mass range.
 
bool operator< (const DemuxWindow &rhs) const
 Isolation windows are sorted by their start value.
 
bool Contains (const DemuxWindow &inner) const
 Can be used to find whether the mass range of another DemuxWindow is a subset of this one.
 
bool ContainsCenter (const DemuxWindow &inner) const
 Used to find whether a window's center is contained within this window.
 
bool operator== (const DemuxWindow &rhs) const
 Can be used to find whether two windows are identical within the error of the hash.
 
bool operator!= (const DemuxWindow &rhs) const
 Can be used to find whether two windows are identical within the error of the hash.
 

Public Attributes

MZHash mzLow
 Start m/z of the window range.
 
MZHash mzHigh
 End m/z of the window range.
 

Detailed Description

A container for describing the isolation windows that are dedicated to columns of the design matrix for demultiplexing.

Ideally, a ProteoWizard Precursor container could be used instead with manipulation of its internal data since a demultiplexed spectrum is in many ways able to be thought of as an isolated spectrum with narrower isolation boundaries. However, this is used as a slimmer container in favor of the existing ProteoWizard Precursor because in the case of overlapping spectra the Precursor object would have to be copied and manipulated to split the isolation ranges.

Definition at line 124 of file IPrecursorMaskCodec.hpp.

Constructor & Destructor Documentation

◆ DemuxWindow() [1/2]

pwiz::analysis::DemuxWindow::DemuxWindow ( const msdata::Precursor p)
inlineexplicit

Constructs a DemuxWindow from a Precursor by using its isolation window.

Definition at line 131 of file IPrecursorMaskCodec.hpp.

132 {
133 double target = precursor_target(p);
136 }
static MZHash Hash(double mz)
Hash a floating-point m/z value to an integer.
double precursor_upper_offset(const msdata::Precursor &p)
double precursor_target(const msdata::Precursor &p)
double precursor_lower_offset(const msdata::Precursor &p)
MZHash mzLow
Start m/z of the window range.
MZHash mzHigh
End m/z of the window range.

References pwiz::analysis::IsoWindowHasher::Hash(), mzHigh, mzLow, pwiz::analysis::precursor_lower_offset(), pwiz::analysis::precursor_target(), and pwiz::analysis::precursor_upper_offset().

◆ DemuxWindow() [2/2]

pwiz::analysis::DemuxWindow::DemuxWindow ( MZHash  mzLow,
MZHash  mzHigh 
)
inlineexplicit

Constructs a DemuxWindow for a given mass range.

Definition at line 139 of file IPrecursorMaskCodec.hpp.

140 {
141 }

Member Function Documentation

◆ operator<()

bool pwiz::analysis::DemuxWindow::operator< ( const DemuxWindow rhs) const
inline

Isolation windows are sorted by their start value.

Definition at line 144 of file IPrecursorMaskCodec.hpp.

144{ return this->mzLow < rhs.mzLow; }

References mzLow.

◆ Contains()

bool pwiz::analysis::DemuxWindow::Contains ( const DemuxWindow inner) const
inline

Can be used to find whether the mass range of another DemuxWindow is a subset of this one.

Definition at line 147 of file IPrecursorMaskCodec.hpp.

148 {
149 return inner.mzLow >= this->mzLow && inner.mzHigh <= this->mzHigh;
150 }

References mzHigh, and mzLow.

Referenced by operator==().

◆ ContainsCenter()

bool pwiz::analysis::DemuxWindow::ContainsCenter ( const DemuxWindow inner) const
inline

Used to find whether a window's center is contained within this window.

Definition at line 153 of file IPrecursorMaskCodec.hpp.

154 {
155 auto center = static_cast<MZHash>(llround(inner.mzLow + (inner.mzHigh - inner.mzLow) / 2.0));
156 return center >= this->mzLow && center <= this->mzHigh;
157 }

References mzHigh, and mzLow.

◆ operator==()

bool pwiz::analysis::DemuxWindow::operator== ( const DemuxWindow rhs) const
inline

Can be used to find whether two windows are identical within the error of the hash.

Definition at line 160 of file IPrecursorMaskCodec.hpp.

160{ return rhs.Contains(*this) && this->Contains(rhs); }
bool Contains(const DemuxWindow &inner) const
Can be used to find whether the mass range of another DemuxWindow is a subset of this one.

References Contains().

◆ operator!=()

bool pwiz::analysis::DemuxWindow::operator!= ( const DemuxWindow rhs) const
inline

Can be used to find whether two windows are identical within the error of the hash.

Definition at line 163 of file IPrecursorMaskCodec.hpp.

163{ return !(*this == rhs); }

Member Data Documentation

◆ mzLow

MZHash pwiz::analysis::DemuxWindow::mzLow

Start m/z of the window range.

Definition at line 126 of file IPrecursorMaskCodec.hpp.

Referenced by Contains(), ContainsCenter(), DemuxWindow(), and operator<().

◆ mzHigh

MZHash pwiz::analysis::DemuxWindow::mzHigh

End m/z of the window range.

Definition at line 128 of file IPrecursorMaskCodec.hpp.

Referenced by Contains(), ContainsCenter(), and DemuxWindow().


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