![]() |
OpenMS
|
Abstract base interface for spectral-library scoring strategies consumed by matchSpectrum. More...
#include <OpenMS/ANALYSIS/OPENSWATH/TargetedSpectraExtractor.h>
Public Member Functions | |
| virtual | ~Comparator ()=default |
| virtual void | generateScores (const MSSpectrum &spec, std::vector< std::pair< Size, double > > &scores, double min_score) const =0 |
Score spec against every entry of the cached library; keep only matches >= min_score. | |
| virtual void | init (const std::vector< MSSpectrum > &library, const std::map< std::string, DataValue > &options)=0 |
| Load the reference library and (re)configure the comparator. | |
| const std::vector< MSSpectrum > & | getLibrary () const |
| Return the reference library passed to the most recent init call. | |
Protected Attributes | |
| std::vector< MSSpectrum > | library_ |
Abstract base interface for spectral-library scoring strategies consumed by matchSpectrum.
Implementations cache a reference library on init and then score query spectra against it via generateScores. The scoring direction is "higher is better" — the matchSpectrum caller sorts the returned pairs by descending score and keeps the top entries. Implementations are free to interpret the options map however they see fit; the caller passes user-supplied parameters through verbatim.
|
virtualdefault |
|
pure virtual |
Score spec against every entry of the cached library; keep only matches >= min_score.
| [in] | spec | Query spectrum. |
| [out] | scores | (library_index, score) pairs for matches that clear the threshold; unsorted. |
| [in] | min_score | Lower bound on the kept score (inclusive). |
Implemented in TargetedSpectraExtractor::BinnedSpectrumComparator.
|
inline |
Return the reference library passed to the most recent init call.
|
pure virtual |
Load the reference library and (re)configure the comparator.
| [in] | library | Reference spectra to score against in subsequent generateScores calls. |
| [in] | options | Implementation-specific knobs. BinnedSpectrumComparator consults "bin_size", "peak_spread", "bin_offset" — see its override for details. |
Implemented in TargetedSpectraExtractor::BinnedSpectrumComparator.
|
protected |