![]() |
OpenMS
|
Compact peak lists of the spectra of one run: per peak only its m/z and its intensity-rank bin. More...
#include <OpenMS/ANALYSIS/ID/FragmentIonLikelihoodModel.h>
Public Member Functions | |
| void | reset (Size spectra) |
Remove all peak lists and make room for spectra empty ones. | |
| void | clear () |
| Remove all peak lists and release their memory. | |
| Size | size () const |
| Number of peak lists (spectra) | |
| void | assign (Size index, const MSSpectrum &spectrum) |
Store the peaks of spectrum as list index, replacing what was there. | |
| Size | peaks (Size index) const |
Number of peaks of list index. | |
| double | mz (Size index, Size peak) const |
m/z of peak peak of list index | |
| Size | rankBin (Size index, Size peak) const |
Intensity-rank bin (see rankBin()) of peak peak of list index. | |
| Int | findNearest (Size index, double mz, double tolerance) const |
The peak of list index nearest to mz, if it lies within [mz - tolerance, mz + tolerance]. | |
| Size | totalPeaks () const |
| Number of peaks over all lists. | |
| Size | memoryUsage () const |
| Bytes held by the peak lists (peak data, list headers) | |
Private Attributes | |
| std::vector< std::vector< float > > | mz_ |
| m/z per peak, ascending, per spectrum | |
| std::vector< std::vector< std::uint8_t > > | rank_bins_ |
| intensity-rank bin per peak, per spectrum | |
Compact peak lists of the spectra of one run: per peak only its m/z and its intensity-rank bin.
Five bytes per peak (m/z as float, rank bin as byte) instead of a copy of the spectra, so the peak lists of a whole run can be kept from preprocessing until the PSMs are annotated. The float m/z deviates from the double by at most 0.06 ppm, far below any fragment tolerance.
| void assign | ( | Size | index, |
| const MSSpectrum & | spectrum | ||
| ) |
Store the peaks of spectrum as list index, replacing what was there.
The intensity ranks are taken among the peaks of spectrum (1 = most intense; ties by ascending m/z). Different indices may be assigned concurrently.
| Exception::IndexOverflow | if index is not below size() |
| Exception::IllegalArgument | if spectrum is not sorted by m/z |
Referenced by NuXLIonLikelihood::setSpectra().
| void clear | ( | ) |
Remove all peak lists and release their memory.
The peak of list index nearest to mz, if it lies within [mz - tolerance, mz + tolerance].
Same rule as MSSpectrum::findNearest(mz, tolerance): of two equally near peaks the lower one.
| Size memoryUsage | ( | ) | const |
Bytes held by the peak lists (peak data, list headers)
Number of peaks of list index.
Referenced by NuXLIonLikelihood::matchHypothesis_().
Intensity-rank bin (see rankBin()) of peak peak of list index.
| void reset | ( | Size | spectra | ) |
Remove all peak lists and make room for spectra empty ones.
Referenced by NuXLIonLikelihood::setSpectra().
|
inline |
Number of peak lists (spectra)
Referenced by NuXLIonLikelihood::matchHypothesis_().
| Size totalPeaks | ( | ) | const |
Number of peaks over all lists.
|
private |
m/z per peak, ascending, per spectrum
|
private |
intensity-rank bin per peak, per spectrum