Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Static Public Member Functions

SpectraSTSimilarityScore Class Reference
[Spectrum Comparison]

Similarity score of SpectraST. More...

#include <OpenMS/COMPARISON/SPECTRA/SpectraSTSimilarityScore.h>

Inheritance diagram for SpectraSTSimilarityScore:
PeakSpectrumCompareFunctor DefaultParamHandler

List of all members.

Public Member Functions

SpectraSTSimilarityScoreoperator= (const SpectraSTSimilarityScore &source)
 assignment operator
DoubleReal operator() (const PeakSpectrum &spec1, const PeakSpectrum &spec2) const
 : calculates the dot product of the two spectra
DoubleReal operator() (const BinnedSpectrum &bin1, const BinnedSpectrum &bin2) const
 : calculates the dot product of the two spectra
DoubleReal operator() (const PeakSpectrum &spec) const
 : calculates the dot product of itself
bool preprocess (PeakSpectrum &spec, Real remove_peak_intensity_threshold=2.01, UInt cut_peaks_below=1000, Size min_peak_number=5, Size max_peak_number=150)
 Preprocesses the spectrum.
BinnedSpectrum transform (const PeakSpectrum &spec)
 spectrum is transformed into a binned spectrum with bin size 1 and spread 1 and the intensities are normalized.
DoubleReal dot_bias (const BinnedSpectrum &bin1, const BinnedSpectrum &bin2, DoubleReal dot_product=-1) const
 Calculates how much of the dot prudct is dominated by a few peaks.
DoubleReal delta_D (DoubleReal top_hit, DoubleReal runner_up)
 calculates the normalized distance between top_hit and runner_up.
DoubleReal compute_F (DoubleReal dot_product, DoubleReal delta_D, DoubleReal dot_bias)
 : computes the overall all score

 SpectraSTSimilarityScore ()
 default constructor
 SpectraSTSimilarityScore (const SpectraSTSimilarityScore &source)
 copy constructor
virtual ~SpectraSTSimilarityScore ()
 destructor

Static Public Member Functions

static PeakSpectrumCompareFunctorcreate ()
static const String getProductName ()
 Reimplemented from PeakSpectrumCompareFunctor.

Detailed Description

Similarity score of SpectraST.

Unlike the other similarity scores this score is used for matching a spectrum against a whole library, although the dot poduct 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


Constructor & Destructor Documentation

default constructor

copy constructor

virtual ~SpectraSTSimilarityScore (  )  [virtual]

destructor


Member Function Documentation

DoubleReal compute_F ( DoubleReal  dot_product,
DoubleReal  delta_D,
DoubleReal  dot_bias 
)

: computes the overall all score

Parameters:
dot_product of a match
delta_D should be calculated after all dot products for a unidentified spectrum are computed
dot_bias 
Returns:
the SpectraST similarity score
static PeakSpectrumCompareFunctor* create (  )  [inline, static]
DoubleReal delta_D ( DoubleReal  top_hit,
DoubleReal  runner_up 
)

calculates the normalized distance between top_hit and runner_up.

Parameters:
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.
Returns:
normalized distance
Exceptions:
DividedByZero exception if top_hit is 0.
Note:
Range of the dot products is between 0 and 1.
DoubleReal dot_bias ( const BinnedSpectrum bin1,
const BinnedSpectrum bin2,
DoubleReal  dot_product = -1 
) const

Calculates how much of the dot prudct is dominated by a few peaks.

Parameters:
dot_product if -1 this value will be calculated as well.
bin1 first spectrum in binned representation
bin2 second spectrum in binned representation
static const String getProductName (  )  [inline, static]

Reimplemented from PeakSpectrumCompareFunctor.

Reimplemented from PeakSpectrumCompareFunctor.

DoubleReal operator() ( const BinnedSpectrum bin1,
const BinnedSpectrum bin2 
) const

: calculates the dot product of the two spectra

DoubleReal operator() ( const PeakSpectrum spec  )  const [virtual]

: calculates the dot product of itself

Implements PeakSpectrumCompareFunctor.

DoubleReal operator() ( const PeakSpectrum spec1,
const PeakSpectrum spec2 
) const [virtual]

: calculates the dot product of the two spectra

Implements PeakSpectrumCompareFunctor.

SpectraSTSimilarityScore& operator= ( const SpectraSTSimilarityScore source  ) 

assignment operator

bool preprocess ( PeakSpectrum spec,
Real  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.

Returns:
true if spectrum passes filtering
BinnedSpectrum transform ( const PeakSpectrum spec  ) 

spectrum is transformed into a binned spectrum with bin size 1 and spread 1 and the intensities are normalized.


OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:51 using doxygen 1.7.1