OpenMS
|
Similarity score of SpectraST. More...
#include <OpenMS/COMPARISON/SpectraSTSimilarityScore.h>
Public Member Functions | |
SpectraSTSimilarityScore () | |
default constructor More... | |
SpectraSTSimilarityScore (const SpectraSTSimilarityScore &source) | |
copy constructor More... | |
~SpectraSTSimilarityScore () override | |
destructor More... | |
SpectraSTSimilarityScore & | operator= (const SpectraSTSimilarityScore &source) |
assignment operator More... | |
double | operator() (const PeakSpectrum &spec1, const PeakSpectrum &spec2) const override |
: calculates the dot product of the two spectra More... | |
double | operator() (const BinnedSpectrum &bin1, const BinnedSpectrum &bin2) const |
: calculates the dot product of the two spectra More... | |
double | operator() (const PeakSpectrum &spec) const override |
: calculates the dot product of itself More... | |
bool | preprocess (PeakSpectrum &spec, float remove_peak_intensity_threshold=2.01, UInt cut_peaks_below=1000, Size min_peak_number=5, Size max_peak_number=150) |
Preprocesses the spectrum. More... | |
BinnedSpectrum | transform (const PeakSpectrum &spec) |
spectrum is transformed into a binned spectrum with bin size 1 and spread 1 and the intensities are normalized. More... | |
double | dot_bias (const BinnedSpectrum &bin1, const BinnedSpectrum &bin2, double dot_product=-1) const |
Calculates how much of the dot product is dominated by a few peaks. More... | |
double | delta_D (double top_hit, double runner_up) |
calculates the normalized distance between top_hit and runner_up. More... | |
double | compute_F (double dot_product, double delta_D, double dot_bias) |
computes the overall all score More... | |
Public Member Functions inherited from PeakSpectrumCompareFunctor | |
PeakSpectrumCompareFunctor () | |
default constructor More... | |
PeakSpectrumCompareFunctor (const PeakSpectrumCompareFunctor &source) | |
copy constructor More... | |
~PeakSpectrumCompareFunctor () override | |
destructor More... | |
PeakSpectrumCompareFunctor & | operator= (const PeakSpectrumCompareFunctor &source) |
assignment operator More... | |
Public Member Functions inherited from DefaultParamHandler | |
DefaultParamHandler (const String &name) | |
Constructor with name that is displayed in error messages. More... | |
DefaultParamHandler (const DefaultParamHandler &rhs) | |
Copy constructor. More... | |
virtual | ~DefaultParamHandler () |
Destructor. More... | |
DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
Assignment operator. More... | |
virtual bool | operator== (const DefaultParamHandler &rhs) const |
Equality operator. More... | |
void | setParameters (const Param ¶m) |
Sets the parameters. More... | |
const Param & | getParameters () const |
Non-mutable access to the parameters. More... | |
const Param & | getDefaults () const |
Non-mutable access to the default parameters. More... | |
const String & | getName () const |
Non-mutable access to the name. More... | |
void | setName (const String &name) |
Mutable access to the name. More... | |
const std::vector< String > & | getSubsections () const |
Non-mutable access to the registered subsections. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from DefaultParamHandler | |
static void | writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const String &key_prefix="") |
Writes all parameters to meta values. More... | |
Protected Member Functions inherited from DefaultParamHandler | |
virtual void | updateMembers_ () |
This method is used to update extra member variables at the end of the setParameters() method. More... | |
void | defaultsToParam_ () |
Updates the parameters after the defaults have been set in the constructor. More... | |
Protected Attributes inherited from DefaultParamHandler | |
Param | param_ |
Container for current parameters. More... | |
Param | defaults_ |
Container for default parameters. This member should be filled in the constructor of derived classes! More... | |
std::vector< String > | subsections_ |
Container for registered subsections. This member should be filled in the constructor of derived classes! More... | |
String | error_name_ |
Name that is displayed in error messages during the parameter checking. More... | |
bool | check_defaults_ |
If this member is set to false no checking if parameters in done;. More... | |
bool | warn_empty_defaults_ |
If this member is set to false no warning is emitted when defaults are empty;. More... | |
Similarity score of SpectraST.
Unlike the other similarity scores this score is used for matching a spectrum against a whole library, although the dot product seems to be an effective method for scoring on its own. For calculating the SpectraST score, first preprocess the spectra if not already done. Transform them and calculate the dot product and the dot bias. Afterwards get the best two hits and calculate delta_D. Now for every spectrum from the library you can calculate the final score.
The details of the score can be found in: H. Lam et al., Development and validation of a spectral library searching method for peptide identification from MS/MS, Proteomics, 7 , 655-667, 2007
default constructor
SpectraSTSimilarityScore | ( | const SpectraSTSimilarityScore & | source | ) |
copy constructor
|
override |
destructor
double compute_F | ( | double | dot_product, |
double | delta_D, | ||
double | dot_bias | ||
) |
computes the overall all score
dot_product | of a match |
delta_D | should be calculated after all dot products for a unidentified spectrum are computed |
dot_bias |
double delta_D | ( | double | top_hit, |
double | runner_up | ||
) |
calculates the normalized distance between top_hit and runner_up.
top_hit | is the best score for a given match. |
runner_up | a match with a worse score than top_hit, e.g. the second best score. |
DividedByZero | exception if top_hit is 0. |
double dot_bias | ( | const BinnedSpectrum & | bin1, |
const BinnedSpectrum & | bin2, | ||
double | dot_product = -1 |
||
) | const |
Calculates how much of the dot product is dominated by a few peaks.
dot_product | if -1 this value will be calculated as well. |
bin1 | first spectrum in binned representation |
bin2 | second spectrum in binned representation |
double operator() | ( | const BinnedSpectrum & | bin1, |
const BinnedSpectrum & | bin2 | ||
) | const |
: calculates the dot product of the two spectra
|
overridevirtual |
: calculates the dot product of itself
Implements PeakSpectrumCompareFunctor.
|
overridevirtual |
: calculates the dot product of the two spectra
Implements PeakSpectrumCompareFunctor.
SpectraSTSimilarityScore& operator= | ( | const SpectraSTSimilarityScore & | source | ) |
assignment operator
bool preprocess | ( | PeakSpectrum & | spec, |
float | remove_peak_intensity_threshold = 2.01 , |
||
UInt | cut_peaks_below = 1000 , |
||
Size | min_peak_number = 5 , |
||
Size | max_peak_number = 150 |
||
) |
Preprocesses the spectrum.
The preprocessing removes peak below a intensity threshold, reject spectra that does not have enough peaks, and cuts peaks exceeding the max_peak_number most intense peaks.
BinnedSpectrum transform | ( | const PeakSpectrum & | spec | ) |
spectrum is transformed into a binned spectrum with bin size 1 and spread 1 and the intensities are normalized.