Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
OpenSwath::Scoring Namespace Reference

Scoring functions used by MRMScoring. More...

Typedefs

Type defs
typedef std::map< int, doubleXCorrArrayType
 Cross Correlation array. More...
 

Functions

Helper functions
OPENSWATHALGO_DLLAPI double NormalizedManhattanDist (double x[], double y[], int n)
 Calculate the normalized Manhattan distance between two arrays. More...
 
OPENSWATHALGO_DLLAPI double RootMeanSquareDeviation (double x[], double y[], int n)
 Calculate the RMSD (root means square deviation) More...
 
OPENSWATHALGO_DLLAPI double SpectralAngle (double x[], double y[], int n)
 Calculate the Spectral angle (acosine of the normalized dotproduct) More...
 
OPENSWATHALGO_DLLAPI XCorrArrayType calcxcorr_legacy_mquest_ (std::vector< double > &data1, std::vector< double > &data2, bool normalize)
 
OPENSWATHALGO_DLLAPI XCorrArrayType normalizedCrossCorrelation (std::vector< double > &data1, std::vector< double > &data2, int maxdelay, int lag)
 
OPENSWATHALGO_DLLAPI XCorrArrayType calculateCrossCorrelation (std::vector< double > &data1, std::vector< double > &data2, int maxdelay, int lag)
 Calculate crosscorrelation on std::vector data without normalization. More...
 
OPENSWATHALGO_DLLAPI XCorrArrayType::iterator xcorrArrayGetMaxPeak (XCorrArrayType &array)
 Find best peak in an cross-correlation (highest apex) More...
 
OPENSWATHALGO_DLLAPI void standardize_data (std::vector< double > &data)
 Standardize a vector (subtract mean, divide by standard deviation) More...
 
OPENSWATHALGO_DLLAPI void normalize_sum (double x[], unsigned int n)
 divide each element of x by the sum of the vector More...
 

Detailed Description

Scoring functions used by MRMScoring.

Many helper functions to calculate crosscorrelations between data

Typedef Documentation

◆ XCorrArrayType

typedef std::map<int, double> XCorrArrayType

Cross Correlation array.

Function Documentation

◆ calculateCrossCorrelation()

OPENSWATHALGO_DLLAPI XCorrArrayType OpenSwath::Scoring::calculateCrossCorrelation ( std::vector< double > &  data1,
std::vector< double > &  data2,
int  maxdelay,
int  lag 
)

Calculate crosscorrelation on std::vector data without normalization.

◆ calcxcorr_legacy_mquest_()

OPENSWATHALGO_DLLAPI XCorrArrayType OpenSwath::Scoring::calcxcorr_legacy_mquest_ ( std::vector< double > &  data1,
std::vector< double > &  data2,
bool  normalize 
)

Calculate crosscorrelation on std::vector data - Deprecated! Legacy code, this is a 1:1 port of the function from mQuest

◆ normalize_sum()

OPENSWATHALGO_DLLAPI void OpenSwath::Scoring::normalize_sum ( double  x[],
unsigned int  n 
)

divide each element of x by the sum of the vector

◆ normalizedCrossCorrelation()

OPENSWATHALGO_DLLAPI XCorrArrayType OpenSwath::Scoring::normalizedCrossCorrelation ( std::vector< double > &  data1,
std::vector< double > &  data2,
int  maxdelay,
int  lag 
)

Calculate crosscorrelation on std::vector data (which is first normalized) NOTE: this replaces calcxcorr

Referenced by MRMTransitionGroupPicker::computeQuality_().

◆ NormalizedManhattanDist()

OPENSWATHALGO_DLLAPI double OpenSwath::Scoring::NormalizedManhattanDist ( double  x[],
double  y[],
int  n 
)

Calculate the normalized Manhattan distance between two arrays.

Equivalent to the function "delta_ratio_sum" from mQuest to calculate similarity between library intensity and experimental ones.

The delta_ratio_sum is calculated as follows:

\[ d = \sqrt{\frac{1}{N} \sum_{i=0}^N |\frac{x_i}{\mu_x} - \frac{y_i}{\mu_y}|) } \]

◆ RootMeanSquareDeviation()

OPENSWATHALGO_DLLAPI double OpenSwath::Scoring::RootMeanSquareDeviation ( double  x[],
double  y[],
int  n 
)

Calculate the RMSD (root means square deviation)

The RMSD is calculated as follows:

\[ RMSD = \sqrt{\frac{1}{N} \sum_{i=0}^N (x_i - y_i)^2 } \]

◆ SpectralAngle()

OPENSWATHALGO_DLLAPI double OpenSwath::Scoring::SpectralAngle ( double  x[],
double  y[],
int  n 
)

Calculate the Spectral angle (acosine of the normalized dotproduct)

The spectral angle is calculated as follows:

\[ \theta = acos \left( \frac{\sum_{i=0}^N (x_i * y_i))}{\sqrt{\sum_{i=0}^N (x_i * x_i) \sum_{i=0}^N (y_i * y_i)} } \right) \]

◆ standardize_data()

OPENSWATHALGO_DLLAPI void OpenSwath::Scoring::standardize_data ( std::vector< double > &  data)

Standardize a vector (subtract mean, divide by standard deviation)

◆ xcorrArrayGetMaxPeak()

OPENSWATHALGO_DLLAPI XCorrArrayType::iterator OpenSwath::Scoring::xcorrArrayGetMaxPeak ( XCorrArrayType array)

Find best peak in an cross-correlation (highest apex)

Referenced by MRMTransitionGroupPicker::computeQuality_().


OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:15 using doxygen 1.8.13