 Technical Note
 Open Access
 Published:
Outlier Detection using Projection Quantile Regression for Mass Spectrometry Data with Low Replication
BMC Research Notes volume 5, Article number: 236 (2012)
Abstract
Background
Mass spectrometry (MS) data are often generated from various biological or chemical experiments and there may exist outlying observations, which are extreme due to technical reasons. The determination of outlying observations is important in the analysis of replicated MS data because elaborate preprocessing is essential for successful analysis with reliable results and manual outlier detection as one of preprocessing steps is timeconsuming. The heterogeneity of variability and low replication are often obstacles to successful analysis, including outlier detection. Existing approaches, which assume constant variability, can generate many false positives (outliers) and/or false negatives (nonoutliers). Thus, a more powerful and accurate approach is needed to account for the heterogeneity of variability and low replication.
Findings
We proposed an outlier detection algorithm using projection and quantile regression in MS data from multiple experiments. The performance of the algorithm and program was demonstrated by using both simulated and reallife data. The projection approach with linear, nonlinear, or nonparametric quantile regression was appropriate in heterogeneous highthroughput data with low replication.
Conclusion
Various quantile regression approaches combined with projection were proposed for detecting outliers. The choice among linear, nonlinear, and nonparametric regressions is dependent on the degree of heterogeneity of the data. The proposed approach was illustrated with MS data with two or more replicates.
Findings
Background
Mass spectrometry (MS) data are often generated from various biological or chemical experiments. Such vast data is usually analyzed automatically in a computer process consisting of preprocessing, significance test, classification, and clustering. Elaborate preprocessing is essential for successful analysis with reliable results. One preprocessing step is required to detect outliers, which which are extreme due to technical reasons. The plausible outlying observations detected can be examined carefully, and then corrected or eliminated if necessary. However, as the manual examination of all observations for outlier detection is timeconsuming, plausible outlying observations must be detected automatically.
Identification of statistical outliers is the subject of some controversy in statistics[1]. Several outlier detection algorithms have been proposed for univariate data, including Grubbs’ test[2] and Dixon’s Q test[3]. These tests were designed to analyze data under the normality assumption, so that they may produce unreliable outcomes in the case of few replicates. Furthermore, they are not applicable for duplicated samples. Another naive approach to detect outliers statistically constructs lower and upper fences of differences between two samples, Q_{1}  1.5 IQR and Q_{3} + 1.5 IQR, where Q_{1} is the lower 25% quantile, Q_{3} is the upper 25% quantile, and IQR = Q_{3}  Q_{1}. They are claimed to be outliers if they are smaller than the lower fence or larger than the upper fence. However, this may generate a spurious result because variability is heterogeneous in highthroughput data even generated from MS experiments.
Figure1 shows the logscale scatter plot of the technically duplicated samples under the same biological condition from a MS experiment. The variability differs according to the intensity levels in the plot, so that the naive outlier detection method, ignoring the heterogeneity of variability, may often miss true outliers at high levels and select false outliers at low levels. If a number of technical replicates for each peptide under the same biological condition can be obtained in MS experiments, the examination of outliers can be conducted for each peptide. However, a small number of replicates is usually conducted for MS experiments due to the high cost of experiments and the limited supply of biological samples.
Cho et al.[4] proposed a more elaborate approach for detecting outliers with low false positive and negative rates in MS data to solve the problem when the number of technical replicates is two. The algorithm was developed by utilizing quantile regression for duplicate MS experiments. The R package (called OutlierD) that was also developed can only be used for duplicate experiments. Therefore, we here propose a new outlier detection algorithm for multiple highthroughput experiments, particularly those with few, but more than two replicates.
Classical Approaches
Suppose that there are n replicated samples and p peptides in MS data. Then let x_{ ij } be the i th replicated sample from experiments under the same biological or experimental condition, where i = 1,…,n and j = 1,…,p. For convenience, let{y}_{\mathit{\text{ij}}}=\underset{2}{\text{log}}\left({x}_{\mathit{\text{ij}}}\right). Typically, n is small and p is very large in highthroughput data, i.e., p >> n. In addition, let y_{(1)j} ≤ y_{(2)j}≤⋯≤ y_{(n)j} be ordered samples for peptide j, where{y}_{\left(1\right)j}=\underset{1\le i\le n}{\text{min}}{y}_{\mathit{\text{ij}}} and{y}_{\left(n\right)j}=\underset{1\le i\le n}{\text{max}}{y}_{\mathit{\text{ij}}}, the smallest and the largest observations, respectively.
Outliers are often detected by the classical approaches such as Dixon’s Range Test and Grubbs test. Dixon’s Range Test, also known as Dixon’s Qtest[3], utilizes order statistics as follows.
The denominator is the difference between the largest and smallest observations and the numerator is the difference between the smallest two values or the largest two values. If the test statistic Q_{ j } is smaller than the critical value given by Rorabacher[5], peptide j is flagged as an outlier. If n = 2, the statistic is always 1; thus, this test is applicable for n ≥ 3.
Grubbs’ test[2, 6] also utilizes order statistics and its test statistic is defined as follows.
where{\stackrel{\u0304}{y}}_{\xb7j} is the sample mean and s_{ j } the standard deviation for peptide j. The denominator is the standard deviation and the numerator is the difference between the smallest (or largest) value and the sample mean. If T_{ nj } or T_{1j} is smaller than the critical value, peptide j is flagged as an outlier. If n = 2, the statistic is always1/\sqrt{2}; thus, this test is also applicable for n ≥ 3.
Proposed Methods
In duplicated experiments (n = 2), two observed values, x_{1j} and x_{2j} for each j, should be theoretically identical, but are not identical in practice due to their variability. Even though they are not identical, they should not differ substantially. The tolerance of the difference between the two observed values from the same condition is not constant because their variability is heterogeneous. The variability of highthroughput data depends on intensity levels.
Cho et al.[4] proposed the construction of lower and upper fences using quantile regression in an MA plot with M and A values in vertical and horizontal axes, respectively, where M_{ j } is the difference between replicated samples for j and A_{ j } is the average, i.e.{M}_{j}={y}_{1j}{y}_{2j}=\underset{2}{\text{log}}({x}_{1j}/{x}_{2j}) and{A}_{j}=({y}_{1j}+{y}_{2j})/2=(1/2)\underset{2}{\text{log}}\left({x}_{1j}{x}_{2j}\right) to detect the outliers accounting for the heterogeneity of variability.
In multiple experiments (n ≥ 2), it is natural to investigate outliers based on all observed values in a highdimensional space. An outlier will be a very large distance from the center of the distribution of a peptide. The cutoffs of distances for classification of outliers depend on the degree of variability from the center. The degree of variability is dependent on intensity levels and the center can be defined as the 45° line from the origin. More flexibly, the center can be obtained by principal component analysis (PCA), as seen in Figure2. The first principal component (PC) becomes the center of each intensity level, i.e., a new axis for intensity levels. The experiments are replicated under the same biological and technical condition; hence, most variation can be explained by the first PC. It implies that it is enough to use the first PC practically. An outlier will have a large distance from its projection. Following the notations for applying quantile regression, we can define the distance of peptide j to the projection as M_{ j } and the length of the projection on the new axis as A_{ j }. Then the first and third quantiles can be obtained by applying quantile regression on an MA plot with M and A in the vertical and horizontal axes, repectively; hence, the upper and lower fences can be constructed to classify the outliers.
Describing this projection approach in more detail, we first subtract the sample mean of each sample from each observation to shift the sample mean to the origin because the PC go through the sample means. The first PC vector v can be found on the new sample space from{y}_{1}^{\ast},\dots ,{y}_{n}^{\ast} and the projection of each peptide on the vector v can be obtained. Then, we can calculate the length of the projection,\left{{\mathbf{y}}_{\mathbf{j}}^{\ast}}^{\prime}\mathbf{v}\right/\sqrt{{\mathbf{v}}^{\prime}\mathbf{v}}, and the length of the difference between a vector of peptide j and the projection,{\mathbf{y}}_{{\mathbf{j}}^{\ast}}({{y}_{j}^{\ast}}^{\prime}\mathbf{v}/{\mathbf{v}}^{\prime}\mathbf{v}\left)\mathbf{v}\right. The length of the projection is multiplied by the sign of{{y}_{j}^{\ast}}^{\prime}\mathbf{v} to distinguish the positive and negative directions. The signed length of the project and the length of the difference are defined as A_{ j } and M_{ j } of peptide j, respectively. Outlying peptides will have unduly large M values. Judging whether it is undue or not depends on A_{ j } because the variability of M values is heterogeneous. Like OutlierD, we obtain first and third quantiles, Q_{1} and Q_{1}, depending on intensity levels, and then construct the upper and lower fences to classify outliers from normal observations. Quantile regression[7] is utilized on an MA plot to obtain the first and third quantile estimates, Q_{1}(A) and Q_{3}(A), respectively, depending on the intensity levels A. The qquantile linear quantile regression with {(A_{ j }M_{ j }),j = 1,…,p} is used to find the parameters minimizing
where 0 < q < 1, and g(A_{ j };θ_{0}θ_{1}) = θ_{0} + θ_{1}A_{ j }. Using Equation (3), the 0.25 and 0.75 quantile estimates, Q_{1}(A) and Q_{3}(A), are calculated depending on the levels A. Then, the lower and upper fences are constructed: Q_{1}(A)  kIQR(A) and Q_{3}(A) + kIQR(A), where IQR(A) = Q_{3}(A)  Q_{1}(A) and k is a tuning parameter. We set k to 1.5 as the default value in our algorithm and software program because the value is practically often used. A larger k value selects fewer peptides, while a smaller k selects more outliers. The value can be adjusted empirically according to the magnitude of the variation of the data.
We can obtain more flexible quantile estimates by nonlinear and nonparametric quantile regression approaches[8]. For nonlinear quantile regression, the asymptotic function[9] can be employed:
where θ_{1} is the asymptote, θ_{2} is the log rate, and θ_{3} is the value of A at which the response becomes zero. In addition, Selfstarting, Frank, Asymptotic with Offset and Copula functions can be employed. For nonparametric quantile regression, we utilize smoothing spline with the total variation regularization for univariate data to our algorithm[10]. A smoothing parameter plays a role in adjusting the degree of smoothness. We set it to 1 as the default, but it can be changed by users. The algorithm using projection can be summarized as follows.
Proposed Algorithm

1.
Shift the sample means ({\stackrel{\u0304}{y}}_{1},\dots ,{\stackrel{\u0304}{y}}_{n}) to the origin (0,…,0), i.e., {y}_{\mathit{\text{ij}}}^{\ast}={y}_{\mathit{\text{ij}}}{\stackrel{\u0304}{y}}_{i}.

2.
Find the first PC vector v using PCA on the space of {\mathbf{y}}_{\mathbf{1}}^{\ast},\dots ,{\mathbf{y}}_{\mathbf{n}}^{\ast}.

3.
Obtain the projection of a vector {\mathbf{y}}_{\mathbf{j}}^{\mathbf{\ast}}=({y}_{1j}^{\ast},\dots ,{y}_{\mathit{\text{nj}}}^{\ast}) of each peptide j on v, where j = 1,…,p.

4.
Compute the signed length of the projection {A}_{j}=\text{sign}\left({{\mathbf{y}}_{\mathbf{j}}^{\mathbf{\ast}}}^{\mathbf{\prime}}\mathbf{v}\right)\left{{\mathbf{y}}_{\mathbf{j}}^{\ast}}^{\mathbf{\prime}}\mathbf{v}\right/\sqrt{{\mathbf{v}}^{\prime}\mathbf{v}} and the length of the difference between a vector of peptide j and the projection {M}_{j}={\mathbf{y}}_{\mathbf{j}}^{\mathbf{\ast}}({{\mathbf{y}}_{\mathbf{j}}^{\ast}}^{\prime}\mathbf{v}/{\mathbf{v}}^{\prime}\mathbf{v}\left)\mathbf{v}\right, where j = 1,2,…,p.

5.
Obtain the first and third quantile values Q _{1}(A) and Q _{3}(A), on an MA plot using a quantile regression approach. Then calculate IQR(A) = Q _{3}(A)−Q _{1}(A).

6.
Construct the lower and upper fences, LB(A) = Q _{1}(A)  k IQR(A) and UB(A) = Q _{3}(A) + k IQR(A), where k is a tuning parameter.

7.
Declare peptide j as an outlier if it is located above the upper fence or under the lower fence.
This projection approach utilizes all the replicates simultaneously, and a highdimensional problem reduces to twodimensional one that can easily be solved. Shifts from biased experiments can be ignored due to the use of PCA.
Results and discussion
We conducted a simulation study to investigate the performance of the proposed approaches. We also applied it to reallife data with three replicates of liquid chromatography/tandem MS (LCMS/MS) experiments.
Simulated data
Suppose that there are replicated samples with p = 1000 peptides. We considered two or more replicates, i.e., n ≥ 2. Assimilating reality, we first drew the means μ_{ j } from U(5,35) and computed the variances{\sigma}_{j}^{2} with the following relationships between the mean μ and variance σ^{2}.
where B_{ j }∼Bernoulli(1/2) and Z_{ j }∼N(1/μ_{ j },0.01). The relationships between the means and the variances are shown in Figure3. For 950 nonoutliers (j = 1,…,950), we assumed that{Y}_{\mathit{\text{ij}}}\sim N({\mu}_{j},{\sigma}_{j}^{2}) for i = 1,…,n. For 50 outliers (j = 951,…,1000), we assumed that{Y}_{\mathit{\text{ij}}}\sim N({\mu}_{j}^{\prime},{\sigma}_{j}^{2}) for one of the samples and{Y}_{\mathit{\text{ij}}}\sim N({\mu}_{j},{\sigma}_{j}^{2}) for the other samples, where μ_{ j }∼ U(5,35) and{\mu}_{j}^{\prime}=μ_{ j } + (2B_{ j }−1)U(1,2) for constant variance and{\mu}_{j}^{\prime}= μ_{ j } + (2B_{ j }−1)(120/μ_{ j })U(1,2) for other variances. Thus, an artificial data set for each n was generated with 950 nonoutliers and 50 outliers. Then, the data were used to check the sensitivities (the probabilities of detecting outliers correctly), specificities (the probabilities of detecting nonoutliers correctly), and accuracies (the probabilities of detecting outliers or nonoutliers correctly) of the quantile and projection quantile approaches for n = 2 and the Dixon test, Grubbs’s test, and projection quantile approaches for n = 3,…,8. Constant, linear, nonlinear, and nonparametric quantile regressions were accounted for the quantile and projection quantile approaches. This procedure was repeated 1000 times independently.
Table1 presents the sensitivities, specificities, and accuracies of the quantile and projection quantile methods for the simulated data from duplicated experiments (n = 2) and Figure4 shows their confidence intervals. The classical methods were not applied because they work only for n > 2. Under the constant variance, all the methods performed well. Under the linear, nonlinear, and nonparametric variances, the quantile and projection quantile methods with constant quantile regression performed worse than those with the other quantile regression due to the heterogeneity of the variability, as shown in Cho et al.[4]. When comparing the quantile and projection quantile methods, the latter sometimes had somewhat lower sensitivities than the former. However, the quantile and projection quantile methods are mostly comparable.
Table2 presents the sensitivities, specificities, and accuracies of the classical and projection quantile methods for the simulated data from three to eight experiments (3 ≤ n ≤ 8) and Additional File1 shows their confidence intervals. The results are not shown for n ≥ 9. With multiple experiments, the projection quantile methods with constant, linear, nonlinear, and nonparametric quantile regression performed like those with duplicated experiments. When n = 3, the classical methods had very low sensitivities, resulting in the lower accuracies. With increasing n, the sensitivities of the classical methods increased. When n = 7 or 8, Glubbs’ test was comparable to the projection quantile methods with linear, nonlinear, and nonparametric quantile regression. This implies that the classical methods require a sufficiently large number of replicates. In reality, experiments are often repeated three or more times; thus, the projection quantile method is practically very useful.
Reallife data
We here illustrate the projection quantile approach with reallife data obtained from three replicates of LC/MS/MS experiments with 922 peptides (n = 3 and p = 922). The details of the experiments can be found in Min et al.[11] and Cho et al.[4]. Here, the primary goal of the analysis is to detect outliers automatically in the preprocessing step prior to further analysis.
To use the projection approach, we first investigate how much the first PC explains the variation in the data. The first PC takes 96.9% of the variation and the second and third PCs take 1.73% and 1.34%, respectively. This supports that it is enough to use only the first PC. The projection approach with constant, linear, nonlinear, and nonparametric quantile regression selected 74, 69, 99, and 67, respectively. The 3D scatter plot of the data, shown in Figure5, revealed the variability of the data to be heterogeneous. Constant quantile regression tended to select more peptides at low levels as outliers, whereas the others selected more peptides at the higher levels.
This implies that the projection approach assuming a constant variance can generate many false positives and/or false negatives and, therefore, that more flexible quantile regression is more appropriate than constant quantile regression.
Conclusion
We propose an approach for detecting outliers automatically in low replicated, highthroughput data generated from MS experiments. Because of the practical problems such as cost and time, LC/MS data is usually generated by repeating the experiment three or four times under the same technical or biological condition. Outliers can be investigated within each peptide when there are many replicates; however, withinpeptide approaches such as Dixon and Grubbs’ tests are crude in the case of few replicates. A quantile regression approach on an MA plot was proposed in Cho et al.[4] when there are only two replicates. Thus, our proposed method can be used when there are two or somewhat more replicates.
The projection approach using various quantile regressions was examined for outlier detection. The projection approach with linear, nonlinear, or nonparametric quantile regression was more appropriate than the others in heterogeneous highthroughput data. The choice among linear, nonlinear, and nonparametric is dependent on the degree of heterogeneity of the data. In addition, our software program provides a number of options. A single method may not be the best in any situation. Therefore, the data can be applied empirically with various options. Moreover, experimental confirmation is needed after applying our automatic outlier detection. Nevertheless, it is useful because manual examination of all observations is timeconsuming without prescreening.
Availability and Requirements
Project name: Outlier Detection for Mass Spectrometry
Project homepage: http://statlab.korea.ac.kr/OutlierDM/
Operating system(s): Windows, Unixlike systems (Linux, Mac OS X)
Programming language: R (the version of R should be ¿ = 2.14.0)
License: GNU GPL version 2 or later
Author’s contributions
Cho designed and directed this research. Eo wrote and optimized the R code and maintained the software program. Cho and Eo wrote the manuscript. All authors contributed ideas, and read and approved the manuscript.
References
 1.
Barnett V, Lewis T: Outliers in Statistical Data. 1984, Hoboken, NJ, USA: Wiley Series in Probability & Statistics, John Wiley & Sons
 2.
Grubbs FE: Sample criteria for testing outlying observations. The Annals of Mathematical Statistics. 1950, 21: 2758. 10.1214/aoms/1177729885.
 3.
Dixon WJ: Analysis of extreme values. The Annals of Mathematical Statistics. 1950, 21: 488506. 10.1214/aoms/1177729747.
 4.
Cho H, Kim YJ, Jung HJ, Lee SW, Lee JW: OutlierD: an R package for outlier detection using quantile regression on mass spectrometry data. Bioinformatics. 2008, 24 (6): 882884. 10.1093/bioinformatics/btn012.
 5.
Rorabacher DB: Statistical Treatment for Rejection of Deviant Values: Critical Values for Dixon’s Q parameter and Related Subrange Ratios at the 95% Confidence Level. Anal Chem. 1991, 63: 139146. 10.1021/ac00002a010.
 6.
Grubbs FE: Procedures for Detecting Outlying Observations in Samples. Technometrics. 1969, 11: 121. 10.1080/00401706.1969.10490657.
 7.
Koenker R, Bassett G: Regression quantiles. Econometrics. 1978, 46: 3350. 10.2307/1913643.
 8.
Koenker R: Quantile Regression. 2005, Cambridge, United Kingdom: Econometric Society Monograph Series, Cambridge University Press
 9.
R Development Core Team: R: A Language and Environment for Statistical Computing. 2011, Vienna, Austria: R Foundation for Statistical Computing, [ISBN 3900051070]. [http://www.Rproject.org/],
 10.
Koenker R, Ng P, Portnoy S: Quantile Smoothing Splines. Biometrika. 1994, 81: 673680. 10.1093/biomet/81.4.673.
 11.
Min HK, Hyung SW, Shin JW, Nam HS, Ahm SH, Jung HJ, Lee SW: Ultrahighpressure dual online solid phase extraction/capillary reversephase liquid chromatography/tandem mass spectrometry (DOSPE/cRPLC/MS/MS): A versatile separation platform for highthroughput and highly sensitive proteomic analyses. Electrophoresis. 2007, 28: 10121021. 10.1002/elps.200600501.
Acknowledgements
This research was supported by the Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education, Science and Technology (20100007936).
Author information
Affiliations
Corresponding author
Additional information
Competing interests
The authors declare that they have no competing interests.
Electronic supplementary material
13104_2012_1809_MOESM1_ESM.pdf
Additional file 1: Confidence intervals of the sensitivities, specificities, and accuracies for multiple experiments. File: CI3.pdf  Mean plus or minus one standard error of the sensitivities, specificities, and accuracies of the classical and projection quantile methods for the simulated data from multiple experiments (3 ≤ n ≤ 8). (PDF 58 KB)
Authors’ original submitted files for images
Below are the links to the authors’ original submitted files for images.
Rights and permissions
Open Access This article is published under license to BioMed Central Ltd. This is an Open Access article is distributed under the terms of the Creative Commons Attribution License ( https://creativecommons.org/licenses/by/2.0 ), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
About this article
Cite this article
Eo, SH., Pak, D., Choi, J. et al. Outlier Detection using Projection Quantile Regression for Mass Spectrometry Data with Low Replication. BMC Res Notes 5, 236 (2012). https://doi.org/10.1186/175605005236
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/175605005236
Keywords
 Quantile Regression
 Outlier Detection
 Mass Spectrometry Data
 Mass Spectrometry Experiment
 Quantile Estimate