Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Protected Member Functions

SpectrumAlignmentScore Class Reference
[Spectrum Comparison]

Similarity score via spectra alignment. More...

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

Inheritance diagram for SpectrumAlignmentScore:
PeakSpectrumCompareFunctor DefaultParamHandler

List of all members.

Public Member Functions

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

SpectrumAlignmentScoreoperator= (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 PeakSpectrumCompareFunctorcreate ()
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

Detailed Description

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:

NameTypeDefaultRestrictionsDescription
tolerance float0.3  Defines the absolute (in Da) or relative (in ppm) tolerance
is_relative_tolerance stringfalse true, falseif true, the tolerance value is interpreted as ppm
use_linear_factor stringfalse true, falseif true, the intensities are weighted with the relative m/z difference
use_gaussian_factor stringfalse true, falseif true, the intensities are weighted with the relative m/z difference using a gaussian

Note:

Constructor & Destructor Documentation

default constructor

copy constructor

virtual ~SpectrumAlignmentScore (  )  [virtual]

destructor


Member Function Documentation

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