Similarity score via spectra alignment. More...
#include <OpenMS/COMPARISON/SPECTRA/SpectrumAlignmentScore.h>
Public Member Functions | |
| SpectrumAlignmentScore () | |
| default constructor | |
| SpectrumAlignmentScore (const SpectrumAlignmentScore &source) | |
| copy constructor | |
| virtual | ~SpectrumAlignmentScore () |
| destructor | |
| SpectrumAlignmentScore & | operator= (const SpectrumAlignmentScore &source) |
| assignment operator | |
| double | operator() (const PeakSpectrum &spec1, const PeakSpectrum &spec2) const |
| function call operator, calculates the similarity | |
| double | operator() (const PeakSpectrum &spec) const |
| calculates self similarity | |
Static Public Member Functions | |
| static PeakSpectrumCompareFunctor * | create () |
| static const String | getProductName () |
Protected Member Functions | |
| double | getFactor_ (double mz_tolerance, double mz_difference, bool is_gaussian=false) const |
| returns the factor associated with the m/z tolerance and m/z difference of the peaks | |
Similarity score via spectra alignment.
This class implements a simple scoring based on the alignment of spectra. This alignment is implemented in the SpectrumAlignment class and performs a dynamic programming alignment of the peaks, minimizing the distances between the aligned peaks and maximizing the number of peak pairs.
The scoring is done via the simple formula score = sum / (sqrt(sum1 * sum2)). sum is the product of the intensities of the aligned peaks, with the given exponent (default is 2). sum1 and sum2 are the sum of the intensities squared for each peak of both spectra respectively.
A binned version of this scoring is implemented in the ZhangSimilarityScoring class.
Parameters of this class are:| Name | Type | Default | Restrictions | Description |
|---|---|---|---|---|
| tolerance | float | 0.3 | Defines the absolute (in Da) or relative (in ppm) tolerance | |
| is_relative_tolerance | string | false | true, false | if true, the tolerance value is interpreted as ppm |
| use_linear_factor | string | false | true, false | if true, the intensities are weighted with the relative m/z difference |
| use_gaussian_factor | string | false | true, false | if true, the intensities are weighted with the relative m/z difference using a gaussian |
default constructor
| SpectrumAlignmentScore | ( | const SpectrumAlignmentScore & | source | ) |
copy constructor
| virtual ~SpectrumAlignmentScore | ( | ) | [virtual] |
destructor
| static PeakSpectrumCompareFunctor* create | ( | ) | [inline, static] |
| double getFactor_ | ( | double | mz_tolerance, | |
| double | mz_difference, | |||
| bool | is_gaussian = false | |||
| ) | const [protected] |
returns the factor associated with the m/z tolerance and m/z difference of the peaks
| static const String getProductName | ( | ) | [inline, static] |
Reimplemented from PeakSpectrumCompareFunctor.
| double operator() | ( | const PeakSpectrum & | a, | |
| const PeakSpectrum & | b | |||
| ) | const [virtual] |
function call operator, calculates the similarity
Implements PeakSpectrumCompareFunctor.
| double operator() | ( | const PeakSpectrum & | a | ) | const [virtual] |
calculates self similarity
Implements PeakSpectrumCompareFunctor.
| SpectrumAlignmentScore& operator= | ( | const SpectrumAlignmentScore & | source | ) |
assignment operator
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:51 using doxygen 1.7.1 |