|
static std::vector< std::pair
< double, double > > | removeOutliersRANSAC (std::vector< std::pair< double, double > > &pairs, double rsq_limit, double coverage_limit, size_t max_iterations, double max_rt_threshold, size_t sampling_size) |
| This function removes potential outliers in a linear regression dataset. More...
|
|
static std::vector< std::pair
< double, double > > | ransac (std::vector< std::pair< double, double > > &pairs, size_t n, size_t k, double t, size_t d, bool test=false) |
| This function provides a generic implementation of the RANSAC outlier detection algorithm. Is implemented and tested after the SciPy reference: http://wiki.scipy.org/Cookbook/RANSAC. More...
|
|
static std::vector< std::pair
< double, double > > | removeOutliersIterative (std::vector< std::pair< double, double > > &pairs, double rsq_limit, double coverage_limit, bool use_chauvenet, std::string method) |
| This function removes potential outliers in a linear regression dataset. More...
|
|
static double | chauvenet_probability (std::vector< double > &residuals, int pos) |
| This function computes Chauvenet's criterion probability for a vector and a value whose position is submitted. More...
|
|
static bool | chauvenet (std::vector< double > &residuals, int pos) |
| This function computes Chauvenet's criterion for a vector and a value whose position is submitted. More...
|
|
|
static double | llsm_rsq (std::vector< std::pair< double, double > > &pairs) |
| Interface for GSL or OpenMS::MATH linear regression implementation standard least-squares fit to a straight line takes as input a standard vector of a standard pair of points in a 2D space and returns the coefficients of the linear regression Y(c,x) = c0 + c1 * x. More...
|
|
static std::pair< double, double > | llsm_fit (std::vector< std::pair< double, double > > &pairs) |
|
static double | llsm_rss (std::vector< std::pair< double, double > > &pairs, std::pair< double, double > &coefficients) |
|
static std::vector< std::pair
< double, double > > | llsm_rss_inliers (std::vector< std::pair< double, double > > &pairs, std::pair< double, double > &coefficients, double max_threshold) |
|
static int | jackknifeOutlierCandidate (std::vector< double > &x, std::vector< double > &y) |
| This function computes a candidate outlier peptide by iteratively leaving one peptide out to find the one which results in the maximum R^2 of a first order linear regression of the remaining ones. The data points are submitted as two vectors of doubles (x- and y-coordinates). More...
|
|
static int | residualOutlierCandidate (std::vector< double > &x, std::vector< double > &y) |
| This function computes a candidate outlier peptide by computing the residuals of all points to the linear fit and selecting the one with the largest deviation. The data points are submitted as two vectors of doubles (x- and y-coordinates). More...
|
|
The MRMRTNormalizer will find retention time peptides in data.
This tool will take a description of RT peptides and their normalized retention time to write out a transformation file on how to transform the RT space into the normalized space.
The principle is adapted from the following publication: Escher, C. et al. (2012), Using iRT, a normalized retention time for more targeted measurement of peptides. Proteomics, 12: 1111-1121.
static std::vector<std::pair<double, double> > removeOutliersIterative |
( |
std::vector< std::pair< double, double > > & |
pairs, |
|
|
double |
rsq_limit, |
|
|
double |
coverage_limit, |
|
|
bool |
use_chauvenet, |
|
|
std::string |
method |
|
) |
| |
|
static |
This function removes potential outliers in a linear regression dataset.
Two thresholds need to be defined, first a lower R^2 limit to accept the regression for the RT normalization and second, the lower limit of peptide coverage. The algorithms then selects candidate outlier peptides and applies the Chauvenet's criterion on the assumption that the residuals are normal distributed to determine whether the peptides can be removed. This is done iteratively until both limits are reached.
- Parameters
-
pairs | Input data (paired data of type <experimental_rt, theoretical_rt>) |
rsq_limit | Minimal R^2 required |
coverage_limit | Minimal coverage required (the number of points falls below this fraction, the algorithm aborts) |
use_chauvenet | Whether to only remove outliers that fulfill Chauvenet's criterion for outliers (otherwise it will remove any outlier candidate regardless of the criterion) |
method | Outlier detection method ("iter_jackknife" or "iter_residual") |
- Returns
- A vector of pairs is returned if the R^2 limit was reached without reaching the coverage limit. If the limits are reached, an exception is thrown.
- Exceptions
-
Exception::UnableToFit | is thrown if fitting cannot be performed (rsq_limit and coverage_limit cannot be fulfilled) |
Referenced by OpenSwathWorkflow::RTNormalization().