ProteoWizard
|
Extracts sets of centroided peaks from spectra using a user-defined list of peaks to extract. More...
#include <SpectrumPeakExtractor.hpp>
Public Member Functions | |
SpectrumPeakExtractor (const std::vector< double > &peakMzList, const pwiz::chemistry::MZTolerance &massError) | |
Generates a SpectrumPeakExtractor. | |
void | operator() (msdata::Spectrum_const_ptr spectrum, MatrixType &matrix, size_t rowNum, double weight=1.0) const |
Extracts centroided peaks from an input spectrum. | |
size_t | numPeaks () const |
Returns the number of peaks extracted. | |
Private Attributes | |
boost::shared_array< std::pair< double, double > > | _ranges |
defines the set of m/z windows to search, one for each peak in the search list. | |
size_t | _numPeakBins |
the number of peaks given in the search list peakMzList. This is also the number of centroids that will be output. | |
double | _maxDelta |
the m/z half-window size to bin around a peak based on the set ppm error. | |
double | _minValue |
the minimum m/z that will be searched for peaks across the full m/z range. | |
double | _maxValue |
the maximum m/z that will be searched for peaks across the full m/z range. | |
Extracts sets of centroided peaks from spectra using a user-defined list of peaks to extract.
Definition at line 33 of file SpectrumPeakExtractor.hpp.
pwiz::analysis::SpectrumPeakExtractor::SpectrumPeakExtractor | ( | const std::vector< double > & | peakMzList, |
const pwiz::chemistry::MZTolerance & | massError | ||
) |
Generates a SpectrumPeakExtractor.
peakMzList | The m/z values around which will be searched to centroid peaks. The size of this list defines how many peak centroids will be output. |
ppmError | The tolerance that defines how far around a nominal peak to search relative to its m/z. |
void pwiz::analysis::SpectrumPeakExtractor::operator() | ( | msdata::Spectrum_const_ptr | spectrum, |
MatrixType & | matrix, | ||
size_t | rowNum, | ||
double | weight = 1.0 |
||
) | const |
Extracts centroided peaks from an input spectrum.
The peaks extracted are chosen from the peakMzList provided during initialization of the SpectrumPeakExtractor. Peaks are extracted to a user-defined row of a user-provided matrix.
[in] | spectrum | Spectrum from which peaks are searched and binned. |
[out] | matrix | The matrix into which peaks will be extracted. |
[in] | rowNum | The index of the matrix row to extract peaks to. |
[in] | weight | The relative weight to apply to this row (multiplies the output row by the given scalar). |
size_t pwiz::analysis::SpectrumPeakExtractor::numPeaks | ( | ) | const |
Returns the number of peaks extracted.
Referenced by SpectrumPeakExtractorTest::ExtractPeaksTest().
|
private |
defines the set of m/z windows to search, one for each peak in the search list.
Definition at line 59 of file SpectrumPeakExtractor.hpp.
|
private |
the number of peaks given in the search list peakMzList. This is also the number of centroids that will be output.
Definition at line 61 of file SpectrumPeakExtractor.hpp.
|
private |
the m/z half-window size to bin around a peak based on the set ppm error.
Definition at line 63 of file SpectrumPeakExtractor.hpp.
|
private |
the minimum m/z that will be searched for peaks across the full m/z range.
Definition at line 65 of file SpectrumPeakExtractor.hpp.
|
private |
the maximum m/z that will be searched for peaks across the full m/z range.
Definition at line 67 of file SpectrumPeakExtractor.hpp.